-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
91 lines (91 loc) · 2.52 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 = {
settings: {
'import/resolver': {
node: {
paths: ['src'],
},
},
},
extends: ['airbnb', 'prettier', 'prettier/react'],
plugins: ['react', 'jsx-a11y', 'import', 'prettier', 'codebox'],
globals: {
localStorage: true,
graphql: true,
},
parser: 'babel-eslint',
env: {
browser: true,
jest: true,
},
rules: {
'prettier/prettier': [
'error',
{
singleQuote: true,
printWidth: 125,
trailingComma: 'all',
semi: true,
},
],
'prefer-destructuring': [
'error',
{
array: false,
object: true,
},
],
'class-methods-use-this': 'off',
'comma-dangle': 'off',
'import/first': ['warn', 'DISABLE-absolute-first'],
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/href-no-hash': 'off',
'jsx-a11y/label-has-for': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/media-has-caption': 'off',
'max-len': 'off',
'no-mixed-operators': 'off',
'no-plusplus': 'off',
'no-use-before-define': 'off',
'react/jsx-filename-extension': [
1,
{
extensions: ['.js', '.jsx'],
},
],
'react/jsx-no-bind': 'off',
'react/no-array-index-key': 'off',
'react/no-string-refs': 'off',
'react/prefer-stateless-function': 'off',
'react/jsx-indent-props': [2, 2],
'react/no-typos': 'off', // https://github.com/yannickcr/eslint-plugin-react/issues/1389
'codebox/sort-imports': [
'error',
{
groups: [
'builtin', // builtin dependencies go first
'external', // then external dependencies
'parent', // then parent
'sibling', // ...ok, you got it
'index',
['unknown', 'absolute'], // An array inside array of groups means that these two groups share same priority for sorting
],
importTypes: [
'default', // Default imports are at top of each group
'named', // After that - named imports
'all', // Imports of the whole namespace
'none', // Plain import
],
ignoreCase: true, // Indicates whether we want to ignore case during alphabetical sorting
},
],
'codebox/sort-named-imports': [
'error',
{
ignoreCase: true, // Indicates whether we want to ignore case during alphabetical sorting
},
],
},
};