-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
45 lines (43 loc) · 1.15 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import globals from 'globals';
import pluginJs from '@eslint/js';
import tsEslint from 'typescript-eslint';
import eslintConfigPrettier from "eslint-config-prettier";
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
export default [
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{
languageOptions: {
globals: globals.node,
ecmaVersion: 'latest',
sourceType: 'module',
parserOptions: {
project: './tsconfig.json',
},
},
},
{
ignores: [
'node_modules',
'esm',
'dist',
'coverage',
'**/backup/',
'**/backups/',
'**/*.config.{js,mjs,cjs,ts}',
],
},
pluginJs.configs.recommended,
...tsEslint.configs.all,
eslintConfigPrettier,
eslintPluginPrettierRecommended,
{
rules: {
'prettier/prettier': 'warn',
'@typescript-eslint/no-explicit-any': 'off', // 作为library项目,允许使用 any
'@typescript-eslint/prefer-readonly-parameter-types': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/no-magic-numbers': 'off',
'@typescript-eslint/max-params': 'off',
},
},
];