-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
57 lines (57 loc) · 1.67 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
50
51
52
53
54
55
56
57
const path = require('path');
module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
plugins: ['@typescript-eslint'],
env: {
node: true,
es2017: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
],
parserOptions: {
project: path.resolve(__dirname, './tsconfig.json'),
tsconfigRootDir: __dirname,
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
globals: {
BigInt: true,
},
ignorePatterns: [
'node_modules/',
'build/',
'imgs/',
'*.json',
'*.md',
'*.svg',
'*.txt',
'*.py',
],
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off"
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'max-len': [
'error',
{ code: 120, ignorePattern: '^.*console.(log|info|warn|error)' },
],
'comma-spacing': 'error',
'no-trailing-spaces': 'error',
'no-debugger': 'error',
'no-empty': 'error',
'no-eval': 'error',
quotes: ['error', 'single'],
radix: 'error',
'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 0, maxBOF: 0 }],
'eol-last': 'error',
'no-duplicate-imports': 'error',
'no-dupe-keys': 'error',
'semi-style': 'error',
semi: 'error',
'no-multi-spaces': 'error',
},
};