-
Notifications
You must be signed in to change notification settings - Fork 9
/
eslint.config.js
51 lines (50 loc) · 1.41 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
import eslint from '@eslint/js';
import tsEslint from 'typescript-eslint';
import nodePlugin from 'eslint-plugin-n';
import importPlugin from 'eslint-plugin-import';
import prettierConfig from 'eslint-config-prettier';
export default tsEslint.config(
{
ignores: [
'node_modules',
'dist',
'examples',
'images',
'content',
'dist',
'coverage',
'contentful-hugo.config.js',
'contentful-hugo.config.ts',
],
},
eslint.configs.recommended,
...tsEslint.configs.recommended,
nodePlugin.configs['flat/recommended-module'],
{
plugins: {
import: importPlugin,
},
rules: {
'@typescript-eslint/no-unused-vars': [
1,
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_' },
],
'n/no-missing-import': 0,
'n/hashbang': 0,
'import/no-commonjs': 2,
'import/consistent-type-specifier-style': 2,
'import/imports-first': 2,
'import/newline-after-import': 2,
'import/no-duplicates': 2,
'import/no-unassigned-import': 2,
'import/order': 2,
},
},
{
files: ['**/*.test.ts', '**/*.spec.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 0,
},
},
prettierConfig
);