-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
54 lines (54 loc) · 1.31 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
module.exports = {
plugins: ['@typescript-eslint', 'eslint-comments', 'promise', 'unicorn'],
extends: [
'airbnb',
'airbnb-typescript',
'airbnb/hooks',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:eslint-comments/recommended',
'plugin:promise/recommended',
'plugin:unicorn/recommended',
'prettier',
],
env: {
browser: true,
es2021: true,
node: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 13,
ecmaFeatures: { jsx: true },
files: ['*.ts', '*.tsx'],
sourceType: 'module',
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
rules: {
'linebreak-style': 0,
// Airbnb prefers forEach
'unicorn/no-array-for-each': 'off',
// Common abbreviations are known and readable
'unicorn/prevent-abbreviations': 'off',
'@typescript-eslint/indent': 'off',
// "import/no-unresolved": 0,
// "import/no-extraneous-dependencies": 0,
'unicorn/no-array-reduce': 'off',
'no-param-reassign': 'off',
},
settings: {
react: {
version: 'detect',
},
},
overrides: [
{
files: ['*.js'],
rules: {
// Allow `require()`
'@typescript-eslint/no-var-requires': 'off',
},
},
],
};