-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc_old.js
101 lines (96 loc) · 2.65 KB
/
.eslintrc_old.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
92
93
94
95
96
97
98
99
100
101
module.exports = {
parser: 'babel-eslint',
ignorePatterns: ['**/lib'],
env: {
browser: true,
node: true,
es6: true,
},
plugins: [
'ramda',
'sonarjs',
],
// "extends": "eslint:recommended",
extends: [
'airbnb',
'plugin:ramda/recommended',
],
rules: {
// "one-var": ["error", "never"],
// "one-var-declaration-per-line": ["error", "initializations"],
'no-use-before-define': ['error', { variables: false, functions: false }],
// "comma-dangle": "off",
// "one-var": "off",
// "strict": "off",
// "spaced-comment": "off",
'no-underscore-dangle': 'off',
'no-plusplus': 'off',
// "func-names": "off",
'func-names': ['warn', 'never'],
'max-len': ['error', { code: 200, tabWidth: 2, ignoreStrings: true }],
// "max-len": ["error", { "code": 120, "tabWidth": 4, "ignoreStrings": true }],
// "one-var-declaration-per-line": "off",
// "prefer-destructuring": ["error", {
// "array": false,
// "object": true
// }],
'no-param-reassign': 'off',
'no-return-assign': ['error', 'except-parens'],
// "no-console": "off",
'no-console': ['warn', { allow: ['warn', 'error'] }],
'no-unused-vars': 'warn',
indent: [
'error',
2,
],
'linebreak-style': [
'error',
'windows',
],
quotes: [
'error',
'single',
],
semi: [
'error',
'always',
],
// complexity rules
complexity: ['error', { max: 20 }],
'max-lines-per-function': [
'error', {
max: 50,
skipBlankLines: true,
skipComments: true,
},
],
'max-depth': ['error', 3],
// this rule is deprecated https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md
'jsx-a11y/label-has-for': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'react/jsx-indent': ['error', 2],
'react/jsx-indent-props': ['error', 2],
// 'react/jsx-filename-extension': 'off',
// 'react/jsx-one-expression-per-line':'off',
// 'react/state-in-constructor': 'off',
'react/prop-types': 'off',
'react/static-property-placement': ['error', 'static public field', {
propTypes: 'static public field',
}],
'react/destructuring-assignment': ['error', 'always', { ignoreClassFields: true }],
'import/prefer-default-export': 'off',
'import/named': 'error',
'import/no-default-export': 'error',
'import/no-unresolved': 'off',
'import/extensions': [
'error',
'never',
{
jsx: 'always',
json: 'always',
css: 'always',
},
],
'react/sort-comp': 'off',
},
};