-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
110 lines (109 loc) · 2.87 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
const off = 0;
const warn = 1;
const error = 2;
module.exports = {
extends: ['airbnb', 'plugin:import/errors', 'plugin:import/warnings'],
plugins: ['react', 'import'],
env: {
es6: true,
node: true,
browser: true,
},
rules: {
'comma-dangle': [
error,
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'only-multiline',
},
],
'function-paren-newline': [error, 'consistent'],
'global-require': off,
'implicit-arrow-linebreak': off,
'import/extensions': off,
'import/no-deprecated': warn,
'import/no-dynamic-require': off,
'import/no-unresolved': off,
'import/no-webpack-loader-syntax': off,
'import/prefer-default-export': off,
indent: [
error,
2,
{
SwitchCase: 1,
},
],
'jsx-a11y/anchor-is-valid': off,
'jsx-a11y/click-events-have-key-events': error,
'jsx-a11y/heading-has-content': off,
'jsx-a11y/href-no-hash': off,
'jsx-a11y/label-has-for': off,
'jsx-a11y/label-has-associated-control': off,
'jsx-a11y/mouse-events-have-key-events': off,
'jsx-a11y/no-autofocus': off,
'max-len': [error, 150, { ignoreComments: true, ignoreStrings: true, ignoreTemplateLiterals: true }],
'no-console': error,
'no-lonely-if': off,
'no-multiple-empty-lines': [error, { max: error, maxEOF: error }],
'no-implicit-coercion': error,
'no-shadow': off,
'no-underscore-dangle': off,
'no-unused-vars': [error, { args: 'after-used', ignoreRestSiblings: false }],
'object-curly-newline': [error, { consistent: true }],
'prefer-spread': off,
'react/jsx-filename-extension': [error, { extensions: ['.js', '.jsx'] }],
'react/jsx-no-target-blank': error,
'react/no-typos': error,
'react/no-unescaped-entities': off,
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
allowImportExportEverywhere: false,
ecmaFeatures: {
jsx: true,
modules: true,
globalReturn: false,
experimentalObjectRestSpread: true,
},
babelOptions: {
configFile: '.babelrc.js',
},
},
overrides: [
{
files: ['gatsby-node.js'],
rules: {
'import/no-extraneous-dependencies': off,
},
},
{
files: ['src/components/Resume/index.jsx', 'src/components/Portfolio/index.jsx', 'src/components/Post/index.jsx', 'src/templates/*.jsx'],
rules: {
'react/no-danger': off,
},
},
{
files: ['src/html.jsx'],
rules: {
'react/prefer-stateless-function': off,
'react/prop-types': off,
'react/no-danger': off,
},
},
{
files: ['src/**/*.test.js'],
rules: {},
},
],
settings: {
react: {
pragma: 'React',
version: '16.8.5',
}
}
};