-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
80 lines (79 loc) · 2.08 KB
/
Copy patheslint.config.mjs
File metadata and controls
80 lines (79 loc) · 2.08 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import eslint from '@eslint/js';
import { defineConfig } from 'eslint/config';
import prettier from 'eslint-config-prettier/flat';
import * as importing from 'eslint-plugin-import-x';
import * as typescript from 'typescript-eslint';
export default defineConfig(
eslint.configs.recommended,
typescript.configs.recommendedTypeChecked,
typescript.configs.stylisticTypeChecked,
typescript.configs.strictTypeChecked,
importing.flatConfigs.recommended,
importing.flatConfigs.typescript,
prettier,
{
ignores: ['.planning/**'],
},
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
rules: {
'@typescript-eslint/consistent-type-imports': [
'error',
{ prefer: 'type-imports' },
],
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-misused-promises': 'warn',
'curly': ['error', 'multi-line'],
'import-x/consistent-type-specifier-style': ['error', 'prefer-top-level'],
'import-x/exports-last': 'error',
'import-x/first': 'error',
'import-x/order': [
'error',
{
'alphabetize': {
order: 'asc',
caseInsensitive: true,
},
'groups': [
['builtin', 'external'],
'internal',
['parent', 'sibling'],
'type',
],
'newlines-between': 'always',
'pathGroups': [
{
group: 'internal',
pattern: '~/**',
position: 'before',
},
],
'pathGroupsExcludedImportTypes': ['~/**'],
},
],
'no-async-promise-executor': 'off',
'sort-imports': [
'error',
{
ignoreDeclarationSort: true,
ignoreMemberSort: false,
allowSeparatedGroups: true,
},
],
},
},
{
files: ['**/src/**/*.{ts,mts}'],
rules: {
'import-x/extensions': ['error', 'always', { fix: true }],
'import-x/no-default-export': 'error',
},
},
);