10
10
- ✨ Support Vue, React, Svelte.
11
11
- 🎯 Designed to work with TypeScript, Vue out-of-box
12
12
- 🏆 Reasonable defaults, best practices, only one-line of config
13
- - 🎨 Use ESlint and Prettier to format HTML, CSS, LESS, SCSS, YAML, TOML, Markdown, JSON, JSONC.
13
+ - 🎨 Use ESlint to format HTML, CSS, LESS, SCSS, YAML, TOML, Markdown, JSON, JSONC.
14
14
15
15
## Usage
16
16
@@ -72,6 +72,20 @@ Add the following settings to your `.vscode/settings.json`:
72
72
" source.organizeImports" : " never"
73
73
},
74
74
75
+ // Silent the stylistic rules in you IDE, but still auto fix them
76
+ " eslint.rules.customizations" : [
77
+ { " rule" : " style/*" , " severity" : " off" },
78
+ { " rule" : " format/*" , " severity" : " off" },
79
+ { " rule" : " *-indent" , " severity" : " off" },
80
+ { " rule" : " *-spacing" , " severity" : " off" },
81
+ { " rule" : " *-spaces" , " severity" : " off" },
82
+ { " rule" : " *-order" , " severity" : " off" },
83
+ { " rule" : " *-dangle" , " severity" : " off" },
84
+ { " rule" : " *-newline" , " severity" : " off" },
85
+ { " rule" : " *quotes" , " severity" : " off" },
86
+ { " rule" : " *semi" , " severity" : " off" }
87
+ ],
88
+
75
89
// Enable eslint for all supported languages
76
90
" eslint.validate" : [
77
91
" html" ,
@@ -113,8 +127,8 @@ npm i -D lint-staged simple-git-hooks
113
127
114
128
### interface Options
115
129
116
- ```` ts
117
- interface OptionsConfig {
130
+ ``` ts
131
+ interface OptionsConfig extends OptionsComponentExts {
118
132
/**
119
133
* The current working directory
120
134
*
@@ -146,6 +160,15 @@ interface OptionsConfig {
146
160
*/
147
161
typescript? : boolean | OptionsTypescript
148
162
163
+ /**
164
+ * Enable JSX related rules.
165
+ *
166
+ * Currently only stylistic rules are included.
167
+ *
168
+ * @default true
169
+ */
170
+ jsx? : boolean
171
+
149
172
/**
150
173
* Enable test support.
151
174
*
@@ -171,7 +194,7 @@ interface OptionsConfig {
171
194
* Enable react rules.
172
195
*
173
196
* Requires installing:
174
- * - `eslint-plugin- react`
197
+ * - `@ eslint-react/eslint-plugin `
175
198
* - `eslint-plugin-react-hooks`
176
199
* - `eslint-plugin-react-refresh`
177
200
*
@@ -207,13 +230,20 @@ interface OptionsConfig {
207
230
unocss? : boolean | OptionsUnoCSS
208
231
209
232
/**
210
- * Whether to use prettierrc
233
+ * Enable stylistic rules.
211
234
*
212
- * If true, the rules in prettierrc will override the default rules
235
+ * @see https://eslint.style/
236
+ * @default true
237
+ */
238
+ stylistic? : boolean | (StylisticConfig & OptionsOverrides )
239
+
240
+ /**
241
+ * Enable regexp rules.
213
242
*
243
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/
214
244
* @default true
215
245
*/
216
- usePrettierrc ? : boolean
246
+ regexp ? : boolean | ( OptionsRegExp & OptionsOverrides )
217
247
218
248
/**
219
249
* Use external formatters to format files.
@@ -227,32 +257,25 @@ interface OptionsConfig {
227
257
* "yaml": false
228
258
* "toml": false
229
259
* }
230
- */
231
- formatter? : OptionsFormatters
232
-
233
- /**
234
- * Default prettier rules
235
260
*
236
- * @default
237
- * ```json
238
- * {
239
- * "arrowParens": "avoid",
240
- * "htmlWhitespaceSensitivity": "ignore"
241
- * "printWidth": 80,
242
- * "semi": false,
243
- * "singleQuote": true,
244
- * }
245
- * ```
261
+ * When set to `true`, it will enable all formatters.
246
262
*/
247
- prettierRules ? : PartialPrettierExtendedOptions
263
+ formatter ? : boolean | OptionsFormatters
248
264
249
265
/**
250
266
* Control to disable some rules in editors.
251
267
* @default auto-detect based on the process.env
252
268
*/
253
269
isInEditor? : boolean
270
+
271
+ /**
272
+ * Automatically rename plugins in the config.
273
+ *
274
+ * @default true
275
+ */
276
+ autoRenamePlugins? : boolean
254
277
}
255
- ````
278
+ ```
256
279
257
280
## Thanks
258
281
0 commit comments