Skip to content

Commit 2dc5d37

Browse files
committed
feat(mutoe): add mutoe preferred rules
1 parent f4cd7b6 commit 2dc5d37

File tree

6 files changed

+438
-4
lines changed

6 files changed

+438
-4
lines changed

README.md

+17-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,23 @@ Based on the version of @Antfu, the following sections have been modified:
1111

1212
- Update default package name to `defineConfig`
1313
- Supplement more `package.json` properties ordering rules
14-
- (Plan) Reduce the number of default dependencies
15-
- (Plan) Some of my favorite styles
14+
- By default, all recommendation rules from unicorn are enabled
15+
- More sensible `import/order` rules
16+
- Only allow camelCase in variable names
17+
- JavaScript: allow named function as callback (for error stack trace readability)
18+
- TypeScript: consistent type assertions (use `xxx as T` instead of `<T>xxx`)
19+
- TypeScript: always need to add await before async function call
20+
- Vue: block order change to ['template', 'script', 'style']
21+
- Vue: don't allow attribute more than 3 in one line
22+
- Vue: Allow singleline html element
23+
- JSX: allow multiple element in one line
24+
- YAML: always add space inner brackets (`[]` `{}`)
25+
- Test: ignore some type wares rules for tests
26+
- Test: support optional cypress recommended rules
27+
- Style: turned off [`antfu/if-newline`](https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/if-newline.md) rule
28+
- Style: set linebreak-style to `unix`
29+
- Style: no extra parens
30+
- Style: avoid escape quotes in statement
1631

1732
---
1833

scripts/typegen.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fs from 'node:fs/promises'
22
import { flatConfigsToRulesDTS } from 'eslint-typegen/core'
33
import { builtinRules } from 'eslint/use-at-your-own-risk'
4-
import { astro, combine, comments, formatters, imports, javascript, jsdoc, jsonc, jsx, markdown, node, perfectionist, react, regexp, solid, sortPackageJson, stylistic, svelte, test, toml, typescript, unicorn, unocss, vue, yaml } from '../src'
4+
import { astro, combine, comments, formatters, imports, javascript, jsdoc, jsonc, jsx, markdown, mutoe, node, perfectionist, react, regexp, solid, sortPackageJson, stylistic, svelte, test, toml, typescript, unicorn, unocss, vue, yaml } from '../src'
55

66
const configs = await combine(
77
{
@@ -35,6 +35,8 @@ const configs = await combine(
3535
unocss(),
3636
vue(),
3737
yaml(),
38+
39+
mutoe(),
3840
)
3941

4042
const configNames = configs.map(i => i.name).filter(Boolean) as string[]

src/configs/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ export * from './unocss'
2424
export * from './vue'
2525
export * from './yaml'
2626
export * from './regexp'
27+
export * from './mutoe'

0 commit comments

Comments
 (0)