-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
49 lines (49 loc) · 1.14 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
module.exports = {
extends: 'airbnb-base',
parserOptions: {
ecmaVersion: 2020,
},
overrides: [
{
files: ['*.ts'],
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
],
rules: {
'import/extensions': ['error', 'never'],
// switch airbnb rules for typescript compatible ones
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error', { functions: true, classes: true, variables: true }],
},
settings: {
'import/extensions': ['.js', '.ts'],
'import/resolver': {
node: {
extensions: ['.js', '.ts'],
},
},
},
},
{
files: ['test/*.js'],
parserOptions: {
sourceType: 'script',
},
},
{
files: ['.eslintrc.js', 'rollup.config.js', 'test/*.js'],
env: { node: true },
},
{
files: ['test/*.js'],
env: { jest: true },
},
],
};