forked from chickenbug/stitch-cli-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
128 lines (126 loc) · 3.42 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
//based on https://github.com/10gen/mms/blob/master/client/.eslintrc.js
const fs = require('fs');
const path = require('path');
const prettierConfig = JSON.parse(fs.readFileSync(path.join(__dirname, '.prettierrc'), 'utf8'));
module.exports = {
extends: ['airbnb', 'prettier'],
// required until class properties is supported by eslint natively.
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 6,
},
plugins: ['class-property', 'prettier'],
settings: {
'import/resolver': {
node: {
moduleDirectory: ['node_modules', '.'],
},
},
},
env: {
browser: true,
commonjs: true,
es6: true,
},
rules: {
'arrow-parens': 0,
'array-bracket-spacing': 1,
'array-callback-return': 1,
'arrow-body-style': 0,
'brace-style': 1,
camelcase: 1,
'class-property/class-property-semicolon': ['error', 'always'],
'comma-dangle': 0,
'comma-spacing': 1,
'consistent-return': 1,
'default-case': 1,
'prefer-destructuring': 0,
'dot-location': 1,
'dot-notation': 1,
eqeqeq: 1,
'func-names': 0,
'global-require': 0,
'guard-for-in': 1,
'import/newline-after-import': 0,
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['**/*.story.js', '**/__tests__/**.js'],
},
],
//indent: [1, 2],
'jsx-a11y/anchor-is-valid': 0,
'jsx-a11y/click-events-have-key-events': 0,
'jsx-a11y/href-no-hash': 0,
'jsx-a11y/no-autofocus': 0,
'jsx-a11y/tabindex-no-positive': 0,
'jsx-a11y/no-static-element-interactions': 0,
'jsx-a11y/label-has-for': 0,
'jsx-a11y/no-noninteractive-element-interactions': 0,
'key-spacing': 1,
'keyword-spacing': 2,
'linebreak-style': 0,
'max-len': [1, { code: 120, ignoreStrings: true }],
'new-parens': 1,
'newline-per-chained-call': 1,
'no-bitwise': 1,
'no-case-declarations': 2,
'no-console': 0,
'no-continue': 0,
'no-else-return': 1,
'no-extra-bind': 1,
'no-extra-boolean-cast': 1,
'no-inner-declarations': 1,
'no-lonely-if': 1,
'no-mixed-operators': 1,
'no-multi-spaces': 1,
'no-multi-assign': 1,
'no-nested-ternary': 1,
'no-param-reassign': 0,
'no-restricted-syntax': 1,
'no-restricted-properties': 1,
'no-return-assign': 1,
'no-restricted-modules': [
2,
{
patterns: ['js/common/services/api/*'],
},
],
'no-shadow': 1,
'no-template-curly-in-string': 0,
'no-underscore-dangle': 0,
'no-unneeded-ternary': 1,
'no-unused-expressions': [2, { allowShortCircuit: true }],
'no-use-before-define': 1,
'no-useless-concat': 1,
'no-useless-escape': 1,
'no-var': 1,
'no-plusplus': 0,
'object-curly-spacing': 0,
'object-shorthand': 1,
'one-var': 1,
'one-var-declaration-per-line': 1,
'operator-assignment': 1,
'padded-blocks': [1, 'never'],
'prefer-arrow-callback': 1,
'prefer-arrow-callback': 1,
'prefer-const': 1,
'prefer-rest-params': 1,
'prefer-spread': 1,
'prefer-template': 1,
'prefer-template': 1,
'quote-props': 1,
radix: 1,
'space-before-function-paren': [0, 'never'],
'space-infix-ops': 1,
'spaced-comment': 1,
strict: [1, 'safe'],
'template-curly-spacing': 1,
'vars-on-top': 0,
'wrap-iife': 1,
'prettier/prettier': [2, prettierConfig],
// Disabled/warnings for prettier support.
curly: 1,
'space-in-parens': 1,
},
};