Skip to content

Commit 4169d60

Browse files
committed
feat(mutoe): add mutoe preferred rules
(cherry picked from commit e1785c8)
1 parent cc7f17f commit 4169d60

File tree

8 files changed

+540
-5
lines changed

8 files changed

+540
-5
lines changed

README.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,22 @@ 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+
- Grouped `perfectionist/sort-imports` `perfectionist/sort-vue-attributes` rule
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), [`antfu/consistent-chaining`](https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-chaining.md) rules
28+
- Style: set linebreak-style to `unix`
29+
- Style: avoid escape quotes in statement
1630

1731
---
1832

pnpm-lock.yaml

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/typegen.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import fs from 'node:fs/promises'
33
import { builtinRules } from 'eslint/use-at-your-own-risk'
44
import { flatConfigsToRulesDTS } from 'eslint-typegen/core'
55

6-
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'
6+
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'
77

88
const configs = await combine(
99
{
@@ -37,6 +37,8 @@ const configs = await combine(
3737
unocss(),
3838
vue(),
3939
yaml(),
40+
41+
mutoe(),
4042
)
4143

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

src/configs/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export * from './jsdoc'
1010
export * from './jsonc'
1111
export * from './jsx'
1212
export * from './markdown'
13+
export * from './mutoe'
1314
export * from './node'
1415
export * from './perfectionist'
1516
export * from './react'

0 commit comments

Comments
 (0)