|
1 | 1 | module.exports = { |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + amd: true, |
| 5 | + node: true, |
| 6 | + }, |
| 7 | + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'], |
| 8 | + plugins: ['@typescript-eslint'], |
2 | 9 | parser: '@typescript-eslint/parser', |
3 | 10 | parserOptions: { |
4 | 11 | sourceType: 'module', |
5 | 12 | }, |
6 | | - rules: { |
7 | | - 'accessor-pairs': 2, |
8 | | - 'arrow-spacing': [2, { |
9 | | - 'before': true, |
10 | | - 'after': true, |
11 | | - }], |
12 | | - 'block-spacing': [2, 'always'], |
13 | | - 'brace-style': [2, '1tbs', { |
14 | | - 'allowSingleLine': true, |
15 | | - }], |
16 | | - 'camelcase': [0, { |
17 | | - 'properties': 'always', |
18 | | - }], |
19 | | - 'comma-dangle': ['error', 'always-multiline'], |
20 | | - 'comma-spacing': [2, { |
21 | | - 'before': false, |
22 | | - 'after': true, |
23 | | - }], |
24 | | - 'comma-style': [2, 'last'], |
25 | | - 'constructor-super': 2, |
26 | | - 'curly': [2, 'multi-line'], |
27 | | - 'dot-location': [2, 'property'], |
28 | | - 'eol-last': 2, |
29 | | - 'eqeqeq': ['error', 'always', { 'null': 'ignore' }], |
30 | | - 'generator-star-spacing': [2, { |
31 | | - 'before': true, |
32 | | - 'after': true, |
33 | | - }], |
34 | | - 'handle-callback-err': [2, '^(err|error)$'], |
35 | | - 'indent': [2, 2, { |
36 | | - 'SwitchCase': 1, |
37 | | - }], |
38 | | - 'jsx-quotes': [2, 'prefer-single'], |
39 | | - 'key-spacing': [2, { |
40 | | - 'beforeColon': false, |
41 | | - 'afterColon': true, |
42 | | - }], |
43 | | - 'keyword-spacing': [2, { |
44 | | - 'before': true, |
45 | | - 'after': true, |
46 | | - }], |
47 | | - 'new-cap': [2, { |
48 | | - 'newIsCap': true, |
49 | | - 'capIsNew': false, |
50 | | - }], |
51 | | - 'new-parens': 2, |
52 | | - 'no-array-constructor': 2, |
53 | | - 'no-caller': 2, |
54 | | - 'no-console': 'off', |
55 | | - 'no-class-assign': 2, |
56 | | - 'no-cond-assign': 2, |
57 | | - 'no-const-assign': 2, |
58 | | - 'no-control-regex': 0, |
59 | | - 'no-delete-var': 2, |
60 | | - 'no-dupe-args': 2, |
61 | | - 'no-dupe-class-members': 2, |
62 | | - 'no-dupe-keys': 2, |
63 | | - 'no-duplicate-case': 2, |
64 | | - 'no-empty-character-class': 2, |
65 | | - 'no-empty-pattern': 2, |
66 | | - 'no-eval': 2, |
67 | | - 'no-ex-assign': 2, |
68 | | - 'no-extend-native': 2, |
69 | | - 'no-extra-bind': 2, |
70 | | - 'no-extra-boolean-cast': 2, |
71 | | - 'no-extra-parens': [2, 'functions'], |
72 | | - 'no-fallthrough': 2, |
73 | | - 'no-floating-decimal': 2, |
74 | | - 'no-func-assign': 2, |
75 | | - 'no-implied-eval': 2, |
76 | | - 'no-inner-declarations': [2, 'functions'], |
77 | | - 'no-invalid-regexp': 2, |
78 | | - 'no-irregular-whitespace': 2, |
79 | | - 'no-iterator': 2, |
80 | | - 'no-label-var': 2, |
81 | | - 'no-labels': [2, { |
82 | | - 'allowLoop': false, |
83 | | - 'allowSwitch': false, |
84 | | - }], |
85 | | - 'no-lone-blocks': 2, |
86 | | - 'no-mixed-spaces-and-tabs': 2, |
87 | | - 'no-multi-spaces': 2, |
88 | | - 'no-multi-str': 2, |
89 | | - 'no-multiple-empty-lines': [2, { |
90 | | - 'max': 1, |
91 | | - }], |
92 | | - 'no-native-reassign': 2, |
93 | | - 'no-negated-in-lhs': 2, |
94 | | - 'no-new-object': 2, |
95 | | - 'no-new-require': 2, |
96 | | - 'no-new-symbol': 2, |
97 | | - 'no-new-wrappers': 2, |
98 | | - 'no-obj-calls': 2, |
99 | | - 'no-octal': 2, |
100 | | - 'no-octal-escape': 2, |
101 | | - 'no-path-concat': 2, |
102 | | - 'no-proto': 2, |
103 | | - 'no-redeclare': 2, |
104 | | - 'no-regex-spaces': 2, |
105 | | - 'no-return-assign': [2, 'except-parens'], |
106 | | - 'no-self-assign': 2, |
107 | | - 'no-self-compare': 2, |
108 | | - 'no-sequences': 2, |
109 | | - 'no-shadow-restricted-names': 2, |
110 | | - 'no-spaced-func': 2, |
111 | | - 'no-sparse-arrays': 2, |
112 | | - 'no-this-before-super': 2, |
113 | | - 'no-throw-literal': 2, |
114 | | - 'no-trailing-spaces': 2, |
115 | | - 'no-undef-init': 2, |
116 | | - 'no-unexpected-multiline': 2, |
117 | | - 'no-unmodified-loop-condition': 2, |
118 | | - 'no-unneeded-ternary': [2, { |
119 | | - 'defaultAssignment': false, |
120 | | - }], |
121 | | - 'no-unreachable': 2, |
122 | | - 'no-unsafe-finally': 2, |
123 | | - 'no-unused-vars': [2, { |
124 | | - 'vars': 'all', |
125 | | - 'args': 'none', |
126 | | - }], |
127 | | - 'no-useless-call': 2, |
128 | | - 'no-useless-computed-key': 2, |
129 | | - 'no-useless-constructor': 2, |
130 | | - 'no-useless-escape': 0, |
131 | | - 'no-whitespace-before-property': 2, |
132 | | - 'no-with': 2, |
133 | | - 'one-var': [2, { |
134 | | - 'initialized': 'never', |
135 | | - }], |
136 | | - 'operator-linebreak': [2, 'after', { |
137 | | - 'overrides': { |
138 | | - '?': 'before', |
139 | | - ':': 'before', |
140 | | - }, |
141 | | - }], |
142 | | - 'padded-blocks': [2, 'never'], |
143 | | - 'quotes': [2, 'single', { |
144 | | - 'avoidEscape': true, |
145 | | - 'allowTemplateLiterals': true, |
146 | | - }], |
147 | | - 'semi': [2, 'never'], |
148 | | - 'semi-spacing': [2, { |
149 | | - 'before': false, |
150 | | - 'after': true, |
151 | | - }], |
152 | | - 'space-before-blocks': [2, 'always'], |
153 | | - 'space-before-function-paren': [2, 'never'], |
154 | | - 'space-in-parens': [2, 'never'], |
155 | | - 'space-infix-ops': 2, |
156 | | - 'space-unary-ops': [2, { |
157 | | - 'words': true, |
158 | | - 'nonwords': false, |
159 | | - }], |
160 | | - 'spaced-comment': [2, 'always', { |
161 | | - 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ','], |
162 | | - }], |
163 | | - 'template-curly-spacing': [2, 'never'], |
164 | | - 'use-isnan': 2, |
165 | | - 'valid-typeof': 2, |
166 | | - 'wrap-iife': [2, 'any'], |
167 | | - 'yield-star-spacing': [2, 'both'], |
168 | | - 'yoda': [2, 'never'], |
169 | | - 'prefer-const': 2, |
170 | | - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, |
171 | | - 'object-curly-spacing': [2, 'always', { |
172 | | - objectsInObjects: false, |
173 | | - }], |
174 | | - 'array-bracket-spacing': [2, 'never'], |
175 | | - }, |
176 | 13 | } |
0 commit comments