-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
124 lines (120 loc) · 2.56 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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import eslint from "@eslint/js";
import tslint from "typescript-eslint";
import globals from "globals";
import stylistic from "@stylistic/eslint-plugin";
import sveltelint from "eslint-plugin-svelte";
import svelteConfig from "./svelte.config.js";
export default tslint.config(
{
ignores: [ "**/vite-env.d.ts", "dist/**" ]
},
eslint.configs.recommended,
tslint.configs.strict,
tslint.configs.stylistic,
stylistic.configs.recommended,
sveltelint.configs[ "flat/recommended" ],
{
plugins: {
"@stylistic": stylistic
},
languageOptions: {
globals: {
...globals.node,
...globals.browser
},
parserOptions: {
parser: tslint.parser,
project: [ "./tsconfig.json" ],
svelteConfig,
projectService: true,
extraFileExtensions: [ ".svelte" ]
}
},
rules: {
// Règles de base
"no-shadow": "off",
"camelcase": [
"error",
{
properties: "never",
ignoreImports: true,
ignoreDestructuring: false
}
],
"no-unused-vars": "off",
"no-param-reassign": [
"error",
{
props: false
}
],
// Règles de style
"@stylistic/semi": [ "error", "always" ],
"@stylistic/indent": [
"error",
"tab",
{
SwitchCase: 1
}
],
"@stylistic/quotes": [ "error", "double" ],
"@stylistic/no-tabs": [
"error",
{
allowIndentationTabs: true
}
],
"@stylistic/eol-last": [ "error", "never" ],
"@stylistic/brace-style": [
"error",
"allman",
{
allowSingleLine: true
}
],
"@stylistic/arrow-parens": [ "error", "always" ],
"@stylistic/comma-dangle": [
"error",
{
arrays: "never",
objects: "never",
imports: "never",
exports: "never",
functions: "never",
importAttributes: "never",
dynamicImports: "never"
}
],
"@stylistic/object-curly-newline": [
"error",
{
ImportDeclaration: {
minProperties: 0
}
}
],
"@stylistic/comma-style": [ "error", "last" ],
"@stylistic/space-in-parens": [ "error", "always" ],
"@stylistic/array-bracket-spacing": [ "error", "always" ],
"@stylistic/template-curly-spacing": [ "error", "always" ],
"@stylistic/member-delimiter-style": [
"error",
{
overrides: {
interface: {
multiline: {
delimiter: "semi",
requireLast: true
}
}
}
}
],
"@stylistic/computed-property-spacing": [ "error", "always" ],
// Règles pour Svelte ESLint
"svelte/no-at-html-tags": "off",
// Règles pour TypeScript ESLint
"@typescript-eslint/no-empty-function": "off"
}
}
);