-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
48 lines (47 loc) · 1.48 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
module.exports = {
root: true,
parserOptions: {
project: './tsconfig.eslint.json',
ecmaVersion: 2020,
sourceType: 'module',
tsconfigRootDir: __dirname,
createDefaultProgram: true,
},
extends: [
'plugin:import/recommended',
'@ravn-dev/eslint-config-ravn/base',
'@ravn-dev/eslint-config-ravn/react',
'@ravn-dev/eslint-config-ravn/typescript',
],
rules: {
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 'error',
'import/prefer-default-export': 'off',
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-non-null-assertion': 'error',
'promise/no-callback-in-promise': 'off',
'import/named': 'off',
'import/no-named-as-default-member': 'off',
},
settings: {
'import/resolver': {
node: {
extensions: ['.mjs', '.js', '.json', '.ts', '.d.ts'],
},
webpack: {
config: require.resolve('./.erb/configs/webpack.config.eslint.ts'),
},
typescript: {},
},
// Apply special parsing for TypeScript files
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx', '.d.ts'],
},
'import/extensions': ['.js', '.mjs', '.jsx', '.ts', '.tsx', '.d.ts'],
'import/external-module-folders': ['node_modules', 'node_modules/@types'],
},
};