-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
29 lines (27 loc) · 1.05 KB
/
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
// @ts-check
import eslint from '@eslint/js';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{ ignores: ['dist/*', 'eslint.config.js', 'prebuild.js', 'postbuild.js'] },
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
...tseslint.configs.stylisticTypeChecked,
eslintPluginPrettierRecommended,
{
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-empty-function': ['error', { allow: ['private-constructors'] }],
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
'@typescript-eslint/prefer-nullish-coalescing': ['error', { ignoreConditionalTests: true }],
'no-console': 'error',
'complexity': ['warn', { max: 20 }],
},
},
);