-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.js
87 lines (86 loc) · 3.04 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
'use strict';
module.exports = {
parser: 'babel-eslint',
plugins: ['react', 'import', 'prettier'],
env: {
browser: true,
node: true,
},
extends: ['@kalo/eslint-config', 'prettier', 'prettier/react'],
settings: {
'import/ignore': ['node_modules', /.css$/],
'import/resolver': {
node: {
moduleDirectory: ['src', 'src/components', 'node_modules'],
},
},
},
globals: {
window: true,
document: true,
graphql: true,
},
rules: {
'prettier/prettier': [
2,
{
singleQuote: true,
trailingComma: 'es5',
bracketSpacing: false,
},
],
'comma-dangle': [2, 'always-multiline'],
'import/no-duplicates': 2,
'import/first': 0,
'no-duplicate-imports': 0,
'no-useless-escape': 0,
'arrow-parens': 0,
'no-unused-vars': [
2,
{
varsIgnorePattern: '^__*IGNORED',
argsIgnorePattern: '^__*IGNORED',
args: 'after-used',
},
],
'object-property-newline': [2, {allowMultiplePropertiesPerLine: true}],
// definite nice to haves...
'react/no-unused-prop-types': 0, // lots to type at this point...
'react/prop-types': 0, // lots to type at this point...
'react/no-danger': 0,
'class-methods-use-this': 0,
'jsx-a11y/img-has-alt': 0,
'jsx-a11y/label-has-for': 0,
'jsx-a11y/href-no-hash': 0,
'jsx-a11y/anchor-has-content': 0,
'jsx-a11y/no-static-element-interactions': 0,
'react/no-unescaped-entities': 0,
'react/jsx-no-target-blank': 0, // security: should certainly address this at some point!
'no-mixed-operators': 0, // one to raise in an infra meeting
// breakages which will probably be resolved by deps over time
'generator-star-spacing': 0, // babel issue
'require-yield': 0, // babel issue
'import/no-named-as-default': 0, // lots of false-positives
'import/newline-after-import': 0, // lots of false-positives (confusing)
/**
* maybe but probably not a priority
*/
'no-plusplus': 0, // maybe but probably not a priority
'no-restricted-properties': 0,
'import/extensions': 0,
'react/no-children-prop': 0,
'react/sort-comp': 0,
'operator-assignment': [0, 'never'], // incorrectly detects based on our usage
'import/no-extraneous-dependencies': 0, // we define deps used during dev as devDep
'react/jsx-filename-extension': 0, // more language extensions than just jsx...
'react/require-default-props': 0, // we should address this at some point
'import/prefer-default-export': 0, // generally prefer collections of utils than many micro-modules
'arrow-body-style': 0, // freeeedom
'no-extra-boolean-cast': 0, // no issues with a bit of extra clarity!
'prefer-arrow-callback': 0, // no issues with a bit of extra clarity (from named funcs)!
'react/no-find-dom-node': 0, // IS really useful/required *sometimes*
'react/no-multi-comp': 0, // Useful to have internal breakup of components
'new-cap': 0, // bad for performance
'no-useless-rename': 0, // sometimes good for clarity
},
};