-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
37 lines (36 loc) · 1.16 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
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import typescript from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
import prettier from 'eslint-plugin-prettier';
import eslintConfigPrettier from 'eslint-config-prettier';
export default [
js.configs.recommended,
{
files: ['**/*.{js,jsx,ts,tsx}'],
ignores: ['dist/**', 'node_modules/**'],
languageOptions: {
parser: typescriptParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: fileURLToPath(new URL('.', import.meta.url)),
},
},
plugins: {
'@typescript-eslint': typescript,
prettier: prettier,
},
rules: {
...typescript.configs.recommended.rules,
...eslintConfigPrettier.rules,
'prettier/prettier': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'error',
},
},
];