forked from wix/react-native-ui-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
91 lines (89 loc) · 2.85 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
module.exports = {
extends: 'wix/react-native',
parser: 'babel-eslint',
rules: {
'arrow-parens': 'off',
// TODO: remove after migration of legacy lifecycle methods
camelcase: 'off',
'comma-dangle': ['error', 'never'],
'no-mixed-operators': ['off'],
'no-trailing-spaces': 'off',
'operator-linebreak': 'off',
'max-len': ['warn', {code: 120}],
'react/jsx-no-bind': [
'warn',
{
ignoreRefs: true,
allowArrowFunctions: false,
allowBind: false,
},
],
'function-paren-newline': ['warn', 'never'],
'new-cap': ['off'], // TODO: fix this in colors.js and remove this
'default-case': ['off']
},
};
// OLD ESlint configuration
// const validColors = require('./src/style/colorsPalette').colorsPalette;
// const extraFixColorsMap = require('./src/style/colorsPalette').extraFixColorsMap;
// const assetsDepJson = require('./eslint-rules/tests/assets_deprecation.json');
// const deprecationsJson = require('./eslint-rules/tests/component_deprecation.json');
// module.exports = {
// parser: 'babel-eslint',
// extends: 'wix/react-native',
// // plugins: ['react', 'react-native', 'uilib'],
// // extends: ['airbnb'],
// rules: {
// 'arrow-body-style': 'off',
// 'arrow-parens': 'off',
// // TODO: remove after migration of legacy lifecycle methods
// 'camelcase': 'off',
// 'class-methods-use-this': 'off',
// 'consistent-return': 'off',
// 'comma-dangle': 'off',
// 'global-require': 'off',
// 'max-len': [2, 130, 4, {ignoreUrls: true}],
// 'no-nested-ternary': 'off',
// 'no-else-return': 'off',
// 'no-mixed-operators': ['off'],
// 'no-param-reassign': ['warn'],
// 'no-plusplus': 'off',
// 'no-return-assign': 'off',
// 'no-trailing-spaces': 'off',
// 'no-use-before-define': 'off',
// 'no-unneeded-ternary': 'off',
// 'no-mixed-operators': 'off',
// 'no-underscore-dangle': ['error', {'allowAfterThis': true}],
// 'object-curly-spacing': 'off',
// 'operator-linebreak': 'off',
// 'react/forbid-prop-types': 'off',
// 'react/jsx-filename-extension': 'off',
// 'react/jsx-space-before-closing': 'off',
// 'react/jsx-tag-spacing': 'off',
// 'react/prefer-stateless-function': 'off',
// 'react/prop-types': ['error', {ignore: ['children', 'style', 'testID']}],
// 'react/require-default-props': 'off',
// "react/sort-comp": ['warn'],
// 'react/jsx-no-bind': [
// 'warn',
// {
// ignoreRefs: true,
// allowArrowFunctions: false,
// allowBind: false,
// },
// ],
// 'import/prefer-default-export': 'off'
// },
// env: {
// browser: true,
// node: true,
// jest: true,
// },
// settings: {
// 'import/resolver': {
// node: {
// extensions: ['.js', '.ios.js', '.android.js'],
// },
// },
// },
// };