-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.js
52 lines (50 loc) · 1.43 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
45
46
47
48
49
50
51
52
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
import path from 'path';
import { fileURLToPath } from 'url';
import globals from 'globals';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import importPlugin from 'eslint-plugin-import';
import prettierPlugin from 'eslint-plugin-prettier';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
export default [
{
files: ['src/**/*.ts'],
languageOptions: {
globals: {
...globals.browser,
...globals.node
},
parser: tsParser,
parserOptions: {
project: ['tsconfig.json'],
tsconfigRootDir: __dirname,
ecmaVersion: 'latest',
sourceType: 'module'
}
},
plugins: {
'@typescript-eslint': tsPlugin,
import: importPlugin,
prettier: prettierPlugin
},
rules: {
...tsPlugin.configs.recommended.rules,
'import/order': [
'error',
{
'newlines-between': 'always'
}
],
'import/default': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'import/no-named-as-default-member': 'off',
'import/no-named-as-default': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-empty-function': 'off',
'no-console': 'error'
}
},
eslintPluginPrettierRecommended
];