forked from ArtalkJS/Artalk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
48 lines (47 loc) · 1.33 KB
/
.eslintrc.cjs
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
const path = require('node:path')
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
env: { browser: true },
parserOptions: {
project: ['./ui/*/tsconfig.json'],
tsconfigRootDir: __dirname,
},
extends: [
'airbnb-base',
'airbnb-typescript/base',
'prettier',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:compat/recommended',
],
plugins: ['@typescript-eslint', 'import'],
rules: {
'no-alert': 'warn',
'no-unused-vars': 0,
'no-plusplus': 0,
'no-param-reassign': 0,
'no-console': 0,
'no-underscore-dangle': 0,
'class-methods-use-this': 0,
'spaced-comment': 0,
'no-lonely-if': 0,
'prefer-destructuring': 0,
'import/prefer-default-export': 0,
'import/no-extraneous-dependencies': 0,
'@typescript-eslint/lines-between-class-members': 0,
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/naming-convention': 0,
'@typescript-eslint/no-useless-constructor': 0,
'@typescript-eslint/no-unused-expressions': 0, // for `func && func()` expressions
},
settings: {
'import/resolver': {
typescript: {
project: ['ui/artalk/tsconfig.json'].map((p) => path.resolve(__dirname, p)),
},
},
polyfills: ['AbortController'],
},
}