forked from ngocjohn/lunar-phase-card
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
46 lines (45 loc) · 1.18 KB
/
eslint.config.mjs
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
import typescriptEslintRecommended from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import perfectionist from 'eslint-plugin-perfectionist';
export default [
{
files: ['src/**/*.ts'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': typescriptEslintRecommended,
perfectionist,
},
rules: {
// Perfectionist sort-imports rule
'perfectionist/sort-imports': [
'error',
{
type: 'alphabetical',
order: 'asc',
ignoreCase: true,
internalPattern: ['~/**', '^~/.*'],
newlinesBetween: 'always',
maxLineLength: undefined,
groups: [
['external', 'builtin'],
['parent-type', 'sibling-type', 'index-type'],
['parent', 'sibling', 'index'],
'type',
'internal-type',
'internal',
'object',
'unknown',
],
customGroups: { type: {}, value: {} },
environment: 'node',
},
],
},
},
];