-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
73 lines (72 loc) · 1.79 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
70
71
72
73
const path = require('path');
module.exports = {
parser: '@typescript-eslint/parser',
env: {
es6: true,
node: true,
},
extends: [
'eslint:recommended',
'prettier',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:@typescript-eslint/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'import', 'prettier'],
rules: {
curly: ['error', 'all'],
quotes: ['error', 'single'],
'no-alert': 'error',
'no-console': 'error',
'no-redeclare': 'error',
'no-var': 'error',
'no-irregular-whitespace': 'off',
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
],
'newlines-between': 'always',
},
],
'import/default': 'off',
'import/no-named-as-default': 'off',
'no-template-curly-in-string': 'error',
'prefer-destructuring': 'error',
'prefer-const': 'error',
'prefer-arrow-callback': 'error',
'prettier/prettier': 'error',
semi: 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/ban-ts-comment': 'warn',
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts'],
},
'import/resolver': {
typescript: {
project: path.resolve('./tsconfig.json'),
},
},
'import/external-module-folders': ['node_modules', 'node_modules/@types'],
},
};