1010- ✨ Support Vue, React, Svelte.
1111- 🎯 Designed to work with TypeScript, Vue out-of-box
1212- 🏆 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.
1414
1515## Usage
1616
@@ -72,6 +72,20 @@ Add the following settings to your `.vscode/settings.json`:
7272 " source.organizeImports" : " never"
7373 },
7474
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+
7589 // Enable eslint for all supported languages
7690 " eslint.validate" : [
7791 " html" ,
@@ -113,8 +127,8 @@ npm i -D lint-staged simple-git-hooks
113127
114128### interface Options
115129
116- ```` ts
117- interface OptionsConfig {
130+ ``` ts
131+ interface OptionsConfig extends OptionsComponentExts {
118132 /**
119133 * The current working directory
120134 *
@@ -146,6 +160,15 @@ interface OptionsConfig {
146160 */
147161 typescript? : boolean | OptionsTypescript
148162
163+ /**
164+ * Enable JSX related rules.
165+ *
166+ * Currently only stylistic rules are included.
167+ *
168+ * @default true
169+ */
170+ jsx? : boolean
171+
149172 /**
150173 * Enable test support.
151174 *
@@ -171,7 +194,7 @@ interface OptionsConfig {
171194 * Enable react rules.
172195 *
173196 * Requires installing:
174- * - `eslint-plugin- react`
197+ * - `@ eslint-react/eslint-plugin `
175198 * - `eslint-plugin-react-hooks`
176199 * - `eslint-plugin-react-refresh`
177200 *
@@ -207,13 +230,20 @@ interface OptionsConfig {
207230 unocss? : boolean | OptionsUnoCSS
208231
209232 /**
210- * Whether to use prettierrc
233+ * Enable stylistic rules.
211234 *
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.
213242 *
243+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/
214244 * @default true
215245 */
216- usePrettierrc ? : boolean
246+ regexp ? : boolean | ( OptionsRegExp & OptionsOverrides )
217247
218248 /**
219249 * Use external formatters to format files.
@@ -227,32 +257,25 @@ interface OptionsConfig {
227257 * "yaml": false
228258 * "toml": false
229259 * }
230- */
231- formatter? : OptionsFormatters
232-
233- /**
234- * Default prettier rules
235260 *
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.
246262 */
247- prettierRules ? : PartialPrettierExtendedOptions
263+ formatter ? : boolean | OptionsFormatters
248264
249265 /**
250266 * Control to disable some rules in editors.
251267 * @default auto-detect based on the process.env
252268 */
253269 isInEditor? : boolean
270+
271+ /**
272+ * Automatically rename plugins in the config.
273+ *
274+ * @default true
275+ */
276+ autoRenamePlugins? : boolean
254277}
255- ````
278+ ```
256279
257280## Thanks
258281
0 commit comments