-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
69 lines (69 loc) · 1.64 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
// Nau standard eslint rules, save it as .eslintrc.js
module.exports = {
root: true,
extends: [
'eslint:recommended',
// 'plugin:react/recommended',
],
rules: {
'block-scoped-var': 1,
camelcase: 2,
'comma-style': [2, 'last'],
'comma-dangle': 0, // We allow trailing commas in list for benefit of version control diff
'comma-spacing': [2, { before: false, after: true }],
curly: [2, 'all'],
'dot-notation': 0,
eqeqeq: [2, 'allow-null'],
indent: [2, 'tab', { SwitchCase: 1 }],
'linebreak-style': [2, 'unix'],
'new-cap': [2, { capIsNew: false }], // must: new ClassFunction(); but allow: Component() (JSX component)
'no-bitwise': 2,
'no-caller': 2,
'no-console': 0,
'no-eval': 2,
'no-invalid-this': 0,
'no-iterator': 2,
'no-loop-func': 2,
'no-multi-str': 2,
'no-mixed-spaces-and-tabs': [2, 'smart-tabs'],
'no-new': 2,
'no-proto': 2,
'no-script-url': 2,
'no-sequences': 2,
'no-shadow': 2,
'no-with': 2,
'one-var': [2, { initialized: 'never' }],
quotes: [2, 'single'],
semi: [2, 'always'],
'keyword-spacing': 2,
'space-before-blocks': 2,
'space-infix-ops': 2,
'space-unary-ops': [2, { words: true }],
strict: 0,
'valid-jsdoc': 2,
'jsx-quotes': [2, 'prefer-double'],
// 'react/jsx-no-bind' : 2,
// 'react/prop-types' : 0,
},
globals: {},
env: {
mocha: true,
browser: true,
es6: true,
node: true,
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
classes: true,
impliedStrict: true,
// 'jsx': true,
},
},
plugins: [
// react (install eslint-plugin-react)
// babel (install eslint-plugin-babel)
],
};