UNPKG

1.43 kBJavaScriptView Raw
1// @flow
2
3module.exports = {
4 env: {
5 browser: true,
6 node: true,
7 },
8 rules: {
9 'no-buffer-constructor': 2,
10 'no-duplicate-imports': 2,
11
12 'no-div-regex': 2,
13
14 'no-empty-function': 0, // 全てはここから始まる
15
16 'no-implicit-globals': 2,
17 'no-implied-eval': 2,
18 'no-invalid-this': 2,
19 'no-iterator': 2,
20 'no-labels': 2,
21 'no-lone-blocks': 2,
22 'no-loop-func': 2,
23 'no-magic-numbers': 0, // sometimes this is ok (foo.length - 1 == index of last one)
24
25 'no-param-reassign': 0,
26
27 // variables
28 'no-catch-shadow': 2,
29 'no-delete-var': 2,
30 'no-label-var': 2,
31 'no-shadow-restricted-names': 2,
32 'no-shadow': 2,
33 'no-undef-init': 2,
34 'no-undef': 2,
35 'no-undefined': 0,
36
37 // strict, cjsでも書きたいときがあるが切り分けが難しいので無効
38 strict: 0,
39
40 // CommonJS
41 // うるさいだけ http://eslint.org/docs/rules/callback-return
42 'handle-callback-err': [1, 'err'],
43 'no-mixed-requires': [2, { grouping: true, allowCall: false }],
44 'no-path-concat': 2,
45 'no-new-require': 2,
46
47 'callback-return': 0,
48 'no-process-env': 0,
49 'no-process-exit': 2,
50 'no-sync': 0,
51
52 'global-require': 1,
53
54 'require-await': 2,
55
56 'vars-on-top': 2,
57
58 // よくわからない
59 'no-restricted-properties': 0,
60
61 // es6
62 'prefer-template': 2,
63 'require-yield': 2,
64 'symbol-description': 2,
65 },
66}