|
1 | 1 | module.exports = {
|
2 | 2 | extends: ['plugin:@typescript-eslint/recommended', 'wix/react-native', 'plugin:react-hooks/recommended'],
|
3 | 3 | parser: '@typescript-eslint/parser',
|
| 4 | + // plugins: ['@typescript-eslint'], |
4 | 5 | rules: {
|
| 6 | + /* Disabled rules for typescript */ |
| 7 | + 'no-dupe-class-members': 'off', |
| 8 | + /* Other Rules */ |
| 9 | + 'no-unused-expressions': 'off', |
5 | 10 | 'arrow-parens': 'off',
|
6 | 11 | // TODO: remove after migration of legacy lifecycle methods
|
7 | 12 | camelcase: 'off',
|
8 | 13 | 'comma-dangle': ['error', 'never'],
|
9 | 14 | 'no-mixed-operators': ['off'],
|
10 | 15 | 'no-trailing-spaces': 'off',
|
11 | 16 | 'operator-linebreak': 'off',
|
12 |
| - 'max-len': ['warn', {code: 120, "ignoreComments": true, "ignoreStrings": true}], |
| 17 | + 'max-len': ['warn', {code: 120, ignoreComments: true, ignoreStrings: true}], |
13 | 18 | 'react/jsx-no-bind': [
|
14 | 19 | 'off',
|
15 | 20 | {
|
16 | 21 | ignoreRefs: true,
|
17 | 22 | allowArrowFunctions: false,
|
18 |
| - allowBind: false, |
19 |
| - }, |
| 23 | + allowBind: false |
| 24 | + } |
20 | 25 | ],
|
21 | 26 | 'function-paren-newline': ['warn', 'never'],
|
22 | 27 | 'new-cap': ['off'], // TODO: fix this in colors.js and remove this
|
23 | 28 | 'default-case': ['off'],
|
24 |
| - "@typescript-eslint/no-use-before-define": 0, |
25 |
| - "@typescript-eslint/explicit-function-return-type": 0, |
26 |
| - "@typescript-eslint/no-var-requires": 0, |
27 |
| - "@typescript-eslint/no-explicit-any": 0, |
28 |
| - "@typescript-eslint/member-delimiter-style": 0, |
29 |
| - // "@typescript-eslint/no-unused-vars": [2, {"args": "all", "argsIgnorePattern": "^_"}], |
30 |
| - "@typescript-eslint/no-unused-vars": 0, //todo: uncomment this line and use the the better unused rule above ^ |
31 |
| - "@typescript-eslint/no-non-null-assertion": 0, |
32 |
| - "@typescript-eslint/explicit-member-accessibility": 0, |
33 |
| - "@typescript-eslint/prefer-optional-chain": "error", |
34 |
| - "@typescript-eslint/ban-ts-ignore": 0, |
35 |
| - "@typescript-eslint/no-empty-function": 0, |
36 |
| - "@typescript-eslint/camelcase": 0, |
37 |
| - "@typescript-eslint/indent": 0 |
38 |
| - }, |
39 |
| - plugins: ['@typescript-eslint'], |
| 29 | + '@typescript-eslint/no-use-before-define': 0, |
| 30 | + '@typescript-eslint/explicit-function-return-type': 0, |
| 31 | + '@typescript-eslint/no-var-requires': 0, |
| 32 | + '@typescript-eslint/no-explicit-any': 0, |
| 33 | + '@typescript-eslint/member-delimiter-style': 0, |
| 34 | + '@typescript-eslint/no-unused-vars': [2, {args: 'all', argsIgnorePattern: '^_'}], |
| 35 | + // "@typescript-eslint/no-unused-vars": 0, //todo: uncomment this line and use the the better unused rule above ^ |
| 36 | + '@typescript-eslint/no-non-null-assertion': 0, |
| 37 | + '@typescript-eslint/explicit-member-accessibility': 0, |
| 38 | + '@typescript-eslint/prefer-optional-chain': 'error', |
| 39 | + '@typescript-eslint/ban-ts-ignore': 0, |
| 40 | + '@typescript-eslint/no-empty-function': 0, |
| 41 | + '@typescript-eslint/camelcase': 0, |
| 42 | + '@typescript-eslint/indent': 0 |
| 43 | + } |
40 | 44 | };
|
41 |
| - |
42 |
| -// OLD ESlint configuration |
43 |
| -// const validColors = require('./src/style/colorsPalette').colorsPalette; |
44 |
| -// const extraFixColorsMap = require('./src/style/colorsPalette').extraFixColorsMap; |
45 |
| -// const assetsDepJson = require('./eslint-rules/tests/assets_deprecation.json'); |
46 |
| -// const deprecationsJson = require('./eslint-rules/tests/component_deprecation.json'); |
47 |
| - |
48 |
| -// module.exports = { |
49 |
| -// parser: 'babel-eslint', |
50 |
| -// extends: 'wix/react-native', |
51 |
| -// // plugins: ['react', 'react-native', 'uilib'], |
52 |
| -// // extends: ['airbnb'], |
53 |
| -// rules: { |
54 |
| -// 'arrow-body-style': 'off', |
55 |
| -// 'arrow-parens': 'off', |
56 |
| -// // TODO: remove after migration of legacy lifecycle methods |
57 |
| -// 'camelcase': 'off', |
58 |
| -// 'class-methods-use-this': 'off', |
59 |
| -// 'consistent-return': 'off', |
60 |
| -// 'comma-dangle': 'off', |
61 |
| -// 'global-require': 'off', |
62 |
| -// 'max-len': [2, 130, 4, {ignoreUrls: true}], |
63 |
| -// 'no-nested-ternary': 'off', |
64 |
| -// 'no-else-return': 'off', |
65 |
| -// 'no-mixed-operators': ['off'], |
66 |
| -// 'no-param-reassign': ['warn'], |
67 |
| -// 'no-plusplus': 'off', |
68 |
| -// 'no-return-assign': 'off', |
69 |
| -// 'no-trailing-spaces': 'off', |
70 |
| -// 'no-use-before-define': 'off', |
71 |
| -// 'no-unneeded-ternary': 'off', |
72 |
| -// 'no-mixed-operators': 'off', |
73 |
| -// 'no-underscore-dangle': ['error', {'allowAfterThis': true}], |
74 |
| -// 'object-curly-spacing': 'off', |
75 |
| -// 'operator-linebreak': 'off', |
76 |
| -// 'react/forbid-prop-types': 'off', |
77 |
| -// 'react/jsx-filename-extension': 'off', |
78 |
| -// 'react/jsx-space-before-closing': 'off', |
79 |
| -// 'react/jsx-tag-spacing': 'off', |
80 |
| -// 'react/prefer-stateless-function': 'off', |
81 |
| -// 'react/prop-types': ['error', {ignore: ['children', 'style', 'testID']}], |
82 |
| -// 'react/require-default-props': 'off', |
83 |
| -// "react/sort-comp": ['warn'], |
84 |
| -// 'react/jsx-no-bind': [ |
85 |
| -// 'warn', |
86 |
| -// { |
87 |
| -// ignoreRefs: true, |
88 |
| -// allowArrowFunctions: false, |
89 |
| -// allowBind: false, |
90 |
| -// }, |
91 |
| -// ], |
92 |
| -// 'import/prefer-default-export': 'off' |
93 |
| -// }, |
94 |
| -// env: { |
95 |
| -// browser: true, |
96 |
| -// node: true, |
97 |
| -// jest: true, |
98 |
| -// }, |
99 |
| -// settings: { |
100 |
| -// 'import/resolver': { |
101 |
| -// node: { |
102 |
| -// extensions: ['.js', '.ios.js', '.android.js'], |
103 |
| -// }, |
104 |
| -// }, |
105 |
| -// }, |
106 |
| -// }; |
0 commit comments