forked from department-of-veterans-affairs/vets-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
55 lines (52 loc) · 2.09 KB
/
.eslintrc
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
{
// All rules should be disabled or they should produce errors. No warnings.
'extends': 'airbnb',
'parser': 'babel-eslint',
'env': {
'browser': true,
'commonjs': true,
'es6': true,
'mocha': true
},
'globals': {
'__BUILDTYPE__': true
},
'rules': {
// Override airbnb style.
'arrow-body-style': 0, // Leave bracing to code reviewer discretion.
'camelcase': [2, {'properties': 'always'}],
'comma-dangle': 0, // Dangling commas are wonderful. It's JSON that's stupid.
'func-names': 2,
'no-console': 2,
'no-negated-condition': 0, // Sometimes negated conditions are easier to understand.
'no-unused-vars': [2, {'args': 'after-used', 'argsIgnorePattern': '^_', 'vars': 'local'}],
'prefer-rest-params': 2,
'quote-props': [2, 'as-needed', { 'keywords': true }],
'space-unary-ops': 2,
'max-len': [0], // No agreed upon max length and react lines get > 100 chars easily.
// Disabled rules with rationale.
'react/no-multi-comp': 0, // Leave organization to code reviewer discretion.
'react/prefer-stateless-function': 0, // Leave statelessness to code reviewer discretion.
'react/jsx-closing-bracket-location': [2, 'after-props'],
'react/jsx-curly-spacing': 2,
'react/jsx-equals-spacing': 2,
'react/jsx-indent': [2, 2],
'react/jsx-key': 2,
'react/jsx-no-bind': [0, {'ignoreRefs': true}], // TODO: Enable after fixing.
'react/jsx-pascal-case': 2,
'react/sort-prop-types': [0, {'callbacksLast': true, 'requiredFirst': true}], // TODO(awong): Too hard to turn on.
'react/jsx-sort-props': [0, {'callbacksLast': true, 'shorthandFirst': true}], // TODO(awong): Too hard to turn on.
'react/jsx-indent-props': [2, 4],
'react/jsx-no-duplicate-props': 2,
'react/no-danger': 2,
'react/no-deprecated': 2,
'react/no-direct-mutation-state': 2,
'react/no-string-refs': 0, // TODO(awong): Enable.
'react/prop-types': 0, // TODO(awong): Enable.
'react/jsx-space-before-closing': [2, 'never']
},
'parserOptions': {
'ecmaVersion': 6,
'sourceType': 'module'
}
}