generated from SAP/repository-template
-
-
Notifications
You must be signed in to change notification settings - Fork 52
/
eslint.config.js
97 lines (96 loc) · 2.47 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/* eslint-disable n/no-unpublished-import */
import js from '@eslint/js'
import { defineFlatConfig } from 'eslint-define-config'
import jsdoc from 'eslint-plugin-jsdoc'
import perfectionist from 'eslint-plugin-perfectionist'
import pluginVue from 'eslint-plugin-vue'
import neostandard, { plugins } from 'neostandard'
export default defineFlatConfig([
{
ignores: ['**/dist/**'],
},
js.configs.recommended,
plugins.promise.configs['flat/recommended'],
...plugins.n.configs['flat/mixed-esm-and-cjs'],
jsdoc.configs['flat/recommended-typescript'],
{
rules: {
'jsdoc/check-tag-names': [
'warn',
{
definedTags: ['defaultValue', 'experimental', 'typeParam'],
typed: true,
},
],
},
},
...pluginVue.configs['flat/recommended'],
{
files: ['**/*.vue'],
languageOptions: {
parserOptions: {
parser: '@typescript-eslint/parser',
},
},
},
...plugins['typescript-eslint'].config(
{
extends: [
...plugins['typescript-eslint'].configs.strictTypeChecked,
...plugins['typescript-eslint'].configs.stylisticTypeChecked,
],
files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts', '*/**.vue'],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ['**/*.js', '**/*.mjs', '**/*.cjs'],
...plugins['typescript-eslint'].configs.disableTypeChecked,
}
),
perfectionist.configs['recommended-natural'],
{
files: ['**/*.vue'],
rules: {
'perfectionist/sort-vue-attributes': 'off',
},
},
...neostandard({
ts: true,
}),
{
files: [
'src/charging-station/Bootstrap.ts',
'src/charging-station/ChargingStation.ts',
'src/charging-station/Helpers.ts',
'src/charging-station/ocpp/OCPPServiceUtils.ts',
'src/charging-station/ocpp/1.6/OCPP16ResponseService.ts',
'src/performance/PerformanceStatistics.ts',
],
rules: {
'@stylistic/operator-linebreak': 'off',
},
},
{
files: ['src/scripts/*.cjs'],
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
},
{
files: ['tests/utils/Utils.test.ts'],
rules: {
'@typescript-eslint/no-unsafe-member-access': 'off',
},
},
{
files: ['ui/web/src/components/Container.vue', 'ui/web/src/components/buttons/Button.vue'],
rules: {
'vue/multi-word-component-names': 'off',
},
},
])