-
Notifications
You must be signed in to change notification settings - Fork 36
/
.eslintrc.js
55 lines (52 loc) · 1.26 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
const path = require('path')
const ERROR = 'error'
const WARN = 'warn'
const OFF = 'off'
module.exports = {
env: {
browser: true,
jest: true,
},
extends: ['@instacart/eslint-config'],
rules: {
'no-plusplus': [
ERROR,
{
allowForLoopAfterthoughts: true,
},
],
// Fails on non literal roles attrs. Set to error after this is released:
// https://github.com/evcohen/eslint-plugin-jsx-a11y/pull/572
'jsx-a11y/no-static-element-interactions': WARN,
'react/no-string-refs': OFF,
'react/no-find-dom-node': OFF,
'react/no-multi-comp': [ERROR, { ignoreStateless: true }],
'react/no-unused-prop-types': WARN,
'react/forbid-prop-types': [WARN, { forbid: ['any'] }],
'react/jsx-filename-extension': OFF,
'react/jsx-no-literals': OFF,
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: ['scripts/**/*.js', '**/*.spec.js'] },
],
},
globals: {
__DEV__: true,
},
settings: {
'import/resolver': {
webpack: {
config: path.resolve(__dirname, 'webpack.config.js'),
},
},
},
overrides: [
{
files: ['*.d.ts', '*.tsx'],
rules: {
'react/prefer-stateless-function': OFF,
'import/named': OFF,
},
},
],
}