-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
47 lines (46 loc) · 1.46 KB
/
.eslintrc.cjs
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
const OFF = 0;
const WARN = 1;
const ERROR = 2;
module.exports = {
root: true,
reportUnusedDisableDirectives: true,
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./test/tsconfig.json'],
tsconfigRootDir: __dirname,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'airbnb-base',
'airbnb-typescript/base',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:unicorn/recommended',
'prettier',
],
plugins: ['prettier'],
rules: {
'@typescript-eslint/explicit-module-boundary-types': ERROR,
'import/prefer-default-export': OFF,
// usually transpiled out
'no-continue': WARN,
'no-restricted-syntax': OFF,
// stage1 uses underscores in synthetic event handler names
'no-underscore-dangle': OFF,
'prettier/prettier': WARN,
'unicorn/filename-case': OFF,
'unicorn/no-abusive-eslint-disable': WARN,
// forEach has better perf in modern browsers
'unicorn/no-array-for-each': OFF,
'unicorn/no-null': OFF,
'unicorn/prefer-add-event-listener': OFF,
'unicorn/prefer-dom-node-append': OFF,
'unicorn/prefer-module': WARN,
// can't be polyfilled and browser support is still lacking
'unicorn/prefer-optional-catch-binding': OFF,
'unicorn/prefer-query-selector': OFF,
'unicorn/prefer-top-level-await': WARN,
'unicorn/prevent-abbreviations': OFF,
},
};