-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
44 lines (42 loc) · 1.08 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
import shigen from '@shigen/eslint-plugin';
import stylistic from '@stylistic/eslint-plugin';
import ts from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
/** @type { import("eslint").Linter.FlatConfig[] } */
export default [
{
files: ['**/*.?(c|m)@(j|t)s'],
ignores: ['dist/**/*'],
plugins: {
stylistic,
shigen,
},
rules: {
'stylistic/array-bracket-newline': ['error', 'consistent'],
'stylistic/array-element-newline': ['error', 'consistent'],
'stylistic/comma-dangle': ['error', 'always-multiline'],
'stylistic/semi': ['error'],
'stylistic/quotes': ['error', 'single', { allowTemplateLiterals: true }],
'shigen/group-imports': ['error'],
'shigen/sort-imports': ['error', {
typesInGroup: 'top',
inlineTypes: 'end',
}],
},
},
{
files: ['**/*.?(c|m)ts'],
languageOptions: {
parser: tsParser,
parserOptions: {
project: ['tsconfig.json', 'test/tsconfig.json'],
},
},
plugins: {
ts,
},
rules: {
'ts/consistent-type-imports': ['error', { fixStyle: 'inline-type-imports' }],
},
},
];