-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.eslintrc.js
More file actions
60 lines (60 loc) · 1.86 KB
/
Copy path.eslintrc.js
File metadata and controls
60 lines (60 loc) · 1.86 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
50
51
52
53
54
55
56
57
58
59
60
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
project: './tsconfig.json',
},
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'@typescript-eslint/recommended',
'@typescript-eslint/recommended-requiring-type-checking',
],
root: true,
env: {
node: true,
jest: true,
es2022: true,
},
ignorePatterns: ['.eslintrc.js', 'dist/', 'node_modules/', 'apps/', 'contracts/'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/prefer-const': 'error',
'@typescript-eslint/no-var-requires': 'error',
'prefer-const': 'error',
'no-var': 'error',
'no-console': 'warn',
'no-debugger': 'error',
'no-duplicate-imports': 'error',
'no-unused-expressions': 'error',
'prefer-template': 'error',
'template-curly-spacing': ['error', 'never'],
'object-curly-spacing': ['error', 'always'],
'array-bracket-spacing': ['error', 'never'],
'comma-dangle': ['error', 'never'],
'semi': ['error', 'always'],
'quotes': ['error', 'single', { avoidEscape: true }],
'indent': ['error', 2, { SwitchCase: 1 }],
'max-len': ['warn', { code: 120, ignoreComments: true }],
'eol-last': ['error', 'always'],
'no-trailing-spaces': 'error',
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1 }],
},
overrides: [
{
files: ['**/*.test.ts', '**/*.spec.ts'],
env: {
jest: true,
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'no-console': 'off',
},
},
],
};