1 | module.exports = {
|
2 | parser: 'babel-eslint',
|
3 | rules: {
|
4 |
|
5 | 'valid-jsdoc': [2, {
|
6 | prefer: {
|
7 | arg: 'param',
|
8 | argument: 'param',
|
9 | class: 'constructor',
|
10 | return: 'return',
|
11 | virtual: 'abstract'
|
12 | },
|
13 | preferType: {
|
14 | Boolean: 'boolean',
|
15 | Number: 'number',
|
16 | Object: 'object',
|
17 | String: 'string'
|
18 | },
|
19 | requireReturn: false,
|
20 | requireReturnType: true,
|
21 | requireParamDescription: true,
|
22 | requireReturnDescription: true
|
23 | }],
|
24 |
|
25 |
|
26 | 'array-callback-return': [2],
|
27 | 'block-scoped-var': [2],
|
28 | 'curly': [2, 'multi-line'],
|
29 | 'dot-location': [2, 'property'],
|
30 | 'dot-notation': [2],
|
31 | 'eqeqeq': [2],
|
32 | 'no-alert': [2],
|
33 | 'no-div-regex': [2],
|
34 | 'no-else-return': [2],
|
35 | 'no-eq-null': [2],
|
36 | 'no-eval': [2],
|
37 | 'no-extend-native': [2],
|
38 | 'no-extra-bind': [2],
|
39 | 'no-global-assign': [2],
|
40 | 'no-implied-eval': [2],
|
41 | 'no-invalid-this': [2],
|
42 | 'no-iterator': [2],
|
43 | 'no-lone-blocks': [2],
|
44 | 'no-loop-func': [2],
|
45 | 'no-multi-spaces': [2],
|
46 | 'no-multi-str': [2],
|
47 | 'no-new': [2],
|
48 | 'no-proto': [2],
|
49 | 'no-return-assign': [2],
|
50 | 'no-script-url': [2],
|
51 | 'no-self-compare': [2],
|
52 | 'no-sequences': [2],
|
53 | 'no-throw-literal': [2],
|
54 | 'no-unmodified-loop-condition': [2],
|
55 | 'no-unused-expressions': [2],
|
56 | 'no-useless-call': [2],
|
57 | 'no-useless-concat': [2],
|
58 | 'no-useless-escape': [2],
|
59 | 'no-warning-comments': [1, {
|
60 | location: 'anywhere'
|
61 | }],
|
62 | 'no-with': [2],
|
63 | 'radix': [2],
|
64 | 'wrap-iife': [2],
|
65 | 'yoda': [2],
|
66 |
|
67 |
|
68 | 'no-unused-vars': [2, {args: 'after-used', varsIgnorePattern: '^_'}],
|
69 | 'no-catch-shadow': [2],
|
70 | 'no-shadow': [2],
|
71 | 'no-undefined': [2],
|
72 | 'no-use-before-define': [2],
|
73 |
|
74 |
|
75 | 'strict': [2, 'never'],
|
76 |
|
77 |
|
78 | 'array-bracket-spacing': [2, 'never'],
|
79 | 'block-spacing': [2, 'always'],
|
80 | 'brace-style': [2],
|
81 | 'camelcase': [2, {
|
82 | properties: 'never'
|
83 | }],
|
84 | 'comma-dangle': [2, 'never'],
|
85 | 'comma-spacing': [2],
|
86 | 'comma-style': [2],
|
87 | 'eol-last': [2, 'always'],
|
88 | 'func-call-spacing': [2, 'never'],
|
89 | 'func-style': [2, 'expression'],
|
90 | 'indent': [2, 4],
|
91 | 'jsx-quotes': [2, 'prefer-double'],
|
92 | 'key-spacing': [2, {
|
93 | beforeColon: false,
|
94 | afterColon: true,
|
95 | mode: 'strict'
|
96 | }],
|
97 | 'keyword-spacing': [2, {
|
98 | before: true,
|
99 | after: true
|
100 | }],
|
101 | 'linebreak-style': [2, 'unix'],
|
102 | 'max-len': [2, {
|
103 | code: 120,
|
104 | tabWidth: 4,
|
105 | ignoreUrls: true
|
106 | }],
|
107 | 'new-parens': [2],
|
108 | 'newline-per-chained-call': [2],
|
109 | 'no-lonely-if': [2],
|
110 | 'no-mixed-operators': [2],
|
111 | 'no-multiple-empty-lines': [2, {
|
112 | max: 2,
|
113 | maxBOF: 0,
|
114 | maxEOF: 0
|
115 | }],
|
116 | 'no-negated-condition': [2],
|
117 | 'no-tabs': [2],
|
118 | 'no-trailing-spaces': [2, {skipBlankLines: true}],
|
119 | 'no-unneeded-ternary': [2],
|
120 | 'object-curly-spacing': [2],
|
121 | 'object-property-newline': [2, {
|
122 | allowMultiplePropertiesPerLine: true
|
123 | }],
|
124 | 'one-var': [2, 'never'],
|
125 | 'operator-linebreak': [2, 'after'],
|
126 | 'quote-props': [2, 'consistent-as-needed'],
|
127 | 'quotes': [2, 'single', {
|
128 | allowTemplateLiterals: true,
|
129 | avoidEscape: true
|
130 | }],
|
131 | 'require-jsdoc': [2],
|
132 | 'semi': [2, 'always'],
|
133 | 'semi-spacing': [2],
|
134 | 'space-before-function-paren': [2, 'always'],
|
135 | 'space-in-parens': [2],
|
136 | 'space-infix-ops': [2],
|
137 | 'space-unary-ops': [2],
|
138 | 'spaced-comment': [2]
|
139 | },
|
140 | env: {
|
141 | commonjs: true
|
142 | },
|
143 | extends: ['eslint:recommended']
|
144 | };
|