-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
49 lines (49 loc) · 1.03 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 = {
env: {
browser: true,
node: true,
commonjs: true,
es2021: true,
'jest/globals': true,
},
extends: [
'airbnb-base',
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:jest/recommended',
'prettier/@typescript-eslint',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
project: './tsconfig.json',
},
plugins: ['@typescript-eslint'],
ignorePatterns: ['.eslintrc.js'],
rules: {
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
ts: 'never',
},
],
},
settings: {
jest: {
version: 26,
},
'import/parsers': { '@typescript-eslint/parser': ['.ts'] },
'import/resolver': {
typescript: './tsconfig.json',
node: {
extensions: ['.js', '.ts'],
moduleDirectory: ['node_modules', 'src/'],
},
},
},
};