-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
50 lines (47 loc) · 1.54 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
module.exports = {
env: {
browser: false,
es6: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking'
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
generators: false,
experimentalObjectRestSpread: true,
},
project: './tsconfig.eslint.json',
},
plugins: ['@typescript-eslint'],
rules: {
// turn off unwanted rules:
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/camelcase': 'off', // There are a few exceptions, like variables from the backend and stuff
'@typescript-eslint/no-floating-promises': 'off', // just feels a bit verbose with the vscode API
// activate extra rules:
eqeqeq: ['error', 'smart'],
curly: ['error'],
'@typescript-eslint/no-unnecessary-type-assertion': ['error'],
'@typescript-eslint/no-extra-non-null-assertion': ['error'],
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
args: 'none',
},
],
'@typescript-eslint/no-unnecessary-condition': ['error'],
'@typescript-eslint/strict-boolean-expressions': ['error'],
// here is frontend/backend exclusive rules
'require-atomic-updates': 'off', // Currently a bit too buggy. See https://github.com/eslint/eslint/issues/11899
},
}