-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.eslintrc.js
More file actions
49 lines (48 loc) · 1.35 KB
/
.eslintrc.js
File metadata and controls
49 lines (48 loc) · 1.35 KB
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: { es2021: true, node: true },
// "env": { "browser": true, "es2021": true },
// "extends": ["standard", "airbnb-base"],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'airbnb-base', 'airbnb-typescript/base'],
parser: '@typescript-eslint/parser',
// "parserOptions": { "ecmaVersion": "latest", "sourceType": "module" },
ignorePatterns: ['package.json'],
parserOptions: {
ecmaVersion: 'latest',
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
// "plugins": ["@typescript-eslint", "prettier"],
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/no-var-requires': 0,
'no-console': 'error',
'linebreak-style': 0,
semi: 'off',
'no-shadow': ['error', { hoist: 'functions' }],
'arrow-body-style': 'off',
'max-len': [
'error',
{
code: 160,
tabWidth: 2,
ignoreComments: true, // "comments": 80
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
},
],
'no-restricted-syntax': 'off',
'import/prefer-default-export': 'off',
},
settings: {
'import/resolver': {
typescript: {
project: './tsconfig.json',
},
node: {
extensions: ['.ts', '.tsx', '.js'],
moduleDirectory: ['src', 'node_modules'],
},
},
},
};