-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy patheslint.config.js
58 lines (56 loc) · 1.32 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// SPDX-FileCopyrightText: 2017-2024 City of Espoo
//
// SPDX-License-Identifier: LGPL-2.1-or-later
import eslint from '@eslint/js'
import importPlugin from 'eslint-plugin-import'
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
import typescriptEslint from 'typescript-eslint'
export default [
{ ignores: ['dist/*', '.yarn/*'] },
eslint.configs.recommended,
...typescriptEslint.configs.recommendedTypeChecked,
...typescriptEslint.configs.stylistic,
{
languageOptions: {
parserOptions: {
project: 'tsconfig.json'
}
}
},
{
files: ['**/*.js'],
...typescriptEslint.configs.disableTypeChecked
},
{
plugins: {
import: importPlugin
}
},
importPlugin.flatConfigs.typescript,
{
rules: {
'@typescript-eslint/no-empty-object-type': [
'error',
{ allowInterfaces: 'always' }
],
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_'
}
],
'import/order': [
'warn',
{
alphabetize: {
order: 'asc'
},
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
'newlines-between': 'always'
}
]
}
},
eslintPluginPrettierRecommended
]