-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
39 lines (38 loc) · 872 Bytes
/
.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
const jsRules = {
'no-underscore-dangle': 0,
'import/prefer-default-export': 0,
'import/no-extraneous-dependencies': [2, { devDependencies: true }],
'import/extensions': ['error', 'ignorePackages', { js: 'never', ts: 'never' }],
};
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
},
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
extends: ['airbnb-base', 'prettier'],
rules: jsRules,
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.ts'],
},
},
},
overrides: [
{
files: ['*.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
plugins: ['@typescript-eslint'],
extends: ['airbnb-base', 'airbnb-typescript/base', 'prettier'],
rules: { ...jsRules },
},
],
};