-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy patheslint.config.mjs
More file actions
62 lines (59 loc) · 1.63 KB
/
eslint.config.mjs
File metadata and controls
62 lines (59 loc) · 1.63 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import { globalIgnores, defineConfig } from 'eslint/config';
import jest from 'eslint-plugin-jest';
import { importX } from 'eslint-plugin-import-x';
import globals from 'globals';
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
export default defineConfig(
globalIgnores(['**/build/']),
eslint.configs.recommended,
// eslint-disable-next-line import-x/no-named-as-default-member
tseslint.configs.recommended,
importX.flatConfigs.recommended,
importX.flatConfigs.typescript,
eslintPluginPrettierRecommended,
{
languageOptions: {
globals: {
...globals.node,
...jest.environments.globals.globals,
},
},
rules: {
'import-x/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'**/__tests__/**/*',
'eslint.config.mjs',
'babel.config.js',
],
},
],
'@typescript-eslint/no-import-type-side-effects': 'error',
'@typescript-eslint/consistent-type-imports': [
'error',
{
disallowTypeAnnotations: false,
fixStyle: 'inline-type-imports',
},
],
'@typescript-eslint/prefer-ts-expect-error': 'error',
},
},
{
files: ['integrationTests/__fixtures__/**/*'],
rules: {
'no-console': 'off',
},
},
{
files: ['**/*.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
},
},
);