forked from eclipse-basyx/basyx-typescript-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mts
65 lines (58 loc) · 1.64 KB
/
eslint.config.mts
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
import js from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import prettier from 'eslint-plugin-prettier';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import ts from 'typescript-eslint';
export default [
{
ignores: ['node_modules', 'dist', 'src/generated'],
},
{
languageOptions: {
ecmaVersion: 'latest',
globals: {
process: 'readonly',
},
},
},
// js
js.configs.recommended,
// ts
...ts.configs.recommended,
// Sort imports
{
plugins: {
'simple-import-sort': simpleImportSort,
},
rules: {
'simple-import-sort/imports': [
'error',
{
groups: [
[
'^\\u0000', // all side effects (0 at start)
'^[^/\\.].*\u0000$', // external types (0 at end)
'^\\..*\u0000$', // internal types (0 at end)
'^@?\\w', // Starts with @
'^[^.]', // any
'^\\.', // local
],
],
},
],
'simple-import-sort/exports': 'error',
'@typescript-eslint/no-explicit-any': ['warn', { ignoreRestArgs: true }],
},
},
// Prettier
{
plugins: {
prettier,
},
rules: {
'prettier/prettier': 'error',
},
},
// Disable rules that conflict with Prettier
eslintConfigPrettier,
];