-
-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy patheslint.config.js
More file actions
48 lines (47 loc) · 1.39 KB
/
eslint.config.js
File metadata and controls
48 lines (47 loc) · 1.39 KB
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
// @ts-check
import configs from '@yeoman/eslint';
import { config } from 'typescript-eslint';
import imports from 'eslint-plugin-import-x';
import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript';
export default config(
...configs,
{ ignores: ['test/fixtures/'] },
{
rules: {
'@typescript-eslint/no-this-alias': 'off',
'no-undef': 'off',
'prefer-destructuring': 'off',
'unicorn/no-array-for-each': 'off',
'unicorn/no-array-push-push': 'off',
'unicorn/no-array-reduce': 'off',
'unicorn/no-this-assignment': 'off',
'unicorn/prefer-spread': 'off',
'unicorn/prevent-abbreviations': 'off',
},
},
{
extends: [imports.flatConfigs.recommended, imports.flatConfigs.typescript],
languageOptions: {
// import plugin does not use ecmaVersion and sourceType from languageOptions object
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
},
settings: {
'import-x/resolver-next': [createTypeScriptImportResolver()],
},
rules: {
'import-x/extensions': ['error', 'ignorePackages', { checkTypeImports: true, fix: true }],
'import-x/namespace': 'off',
'import-x/no-named-as-default-member': 'off',
},
},
{
files: ['bin/bin.cjs'],
rules: {
'import-x/extensions': 'off',
'import-x/no-unresolved': 'off',
},
},
);