-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
35 lines (34 loc) · 1012 Bytes
/
eslint.config.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
const parser = require('@typescript-eslint/parser');
const typescriptPlugin = require('@typescript-eslint/eslint-plugin');
module.exports = [
{
files: ['**/*.ts'],
languageOptions: {
parser: parser,
parserOptions: {
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
},
plugins: {
'@typescript-eslint': typescriptPlugin,
},
rules: {
'no-extra-semi': 'off',
'no-irregular-whitespace': ['error', {skipTemplates: true}],
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/explicit-function-return-type': [
'warn',
{
allowExpressions: true,
allowTypedFunctionExpressions: true,
},
],
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/await-thenable': 'error',
eqeqeq: ['error', 'always', {null: 'ignore'}],
},
},
];