-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
65 lines (63 loc) · 1.75 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
53
54
55
56
57
58
59
60
61
62
63
64
65
import esLint from '@eslint/js';
import prettierRecommended from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
import tsESLint from 'typescript-eslint';
import prettierConfig from './.prettier.config.js';
const config = tsESLint.config(
{
ignores: [
// Backup files
'.composer.bak/',
// Build output directory
'coverage/',
'build/',
'bundle/',
'dist/',
'out/',
// Cache files
'.eslintcache',
'.rollup.cache/',
// Config files
'.prettier.config.js',
'commitlint.config.js',
'eslint.config.js',
'rollup.config.js',
'lint-staged.config.js'
]
},
esLint.configs.recommended,
...tsESLint.configs.recommended,
prettierRecommended,
{
files: ['**/*.{js,ts}'],
languageOptions: {
globals: {
...globals.es2021,
...globals.jest,
...globals.node,
...globals.serviceworker,
...globals.worker
}
},
rules: {
'import/no-duplicates': 'off',
'no-console': ['error', { allow: ['error', 'warn'] }],
'prettier/prettier': ['error', prettierConfig],
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-check': 'allow-with-description',
'ts-expect-error': 'allow-with-description',
'ts-ignore': 'allow-with-description',
'ts-nocheck': 'allow-with-description'
}
],
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }]
}
}
);
export default config;