-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
36 lines (36 loc) · 1 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
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
jest: true
},
extends: ['standard', 'plugin:import/typescript'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module'
},
plugins: ['prettier', '@typescript-eslint'],
rules: {
'prettier/prettier': 'error',
'no-console': 'warn',
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-param-reassign': 'warn',
'space-before-function-paren': 'off',
'multiline-ternary': 'off',
'@typescript-eslint/explicit-function-return-type': 'off'
},
overrides: [
{
// enable the rule specifically for TypeScript files
files: ['*.ts'],
rules: {
'@typescript-eslint/explicit-function-return-type': ['error'],
'@typescript-eslint/no-this-alias': ['error'],
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-empty-function': ['error']
}
}
]
}