Skip to content

Commit c43bfe7

Browse files
committed
feat(mutoe): add mutoe preferred rules
(cherry picked from commit e1785c8) (cherry picked from commit 06b8766)
1 parent 36ed449 commit c43bfe7

File tree

11 files changed

+2452
-2101
lines changed

11 files changed

+2452
-2101
lines changed

.vscode/settings.json

+17
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,22 @@
4646
"source": "./fixtures/output/**/*.*",
4747
"target": "./fixtures/input/<base>"
4848
}
49+
],
50+
"cSpell.words": [
51+
"antfu",
52+
"astro",
53+
"ependencies",
54+
"esno",
55+
"execa",
56+
"jiti",
57+
"linebreak",
58+
"lockb",
59+
"nonwords",
60+
"picocolors",
61+
"slidev",
62+
"stroustrup",
63+
"typecheck",
64+
"typegen",
65+
"vuejs"
4966
]
5067
}

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

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@mutoe/eslint-config",
33
"type": "module",
4-
"version": "4.3.0",
4+
"version": "4.3.0-1",
55
"packageManager": "[email protected]",
66
"description": "Mutoe's ESLint config (forked from antfu/eslint-config)",
77
"author": "mutoe <[email protected]> (https://github.com/mutoe/)",
@@ -99,6 +99,7 @@
9999
"@clack/prompts": "^0.10.0",
100100
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
101101
"@eslint/markdown": "^6.2.2",
102+
"@mutoe/eslint-plugin-perfectionist-vue": "^1.0.0",
102103
"@stylistic/eslint-plugin": "^4.0.0",
103104
"@typescript-eslint/eslint-plugin": "^8.24.1",
104105
"@typescript-eslint/parser": "^8.24.1",
@@ -133,7 +134,7 @@
133134
"yaml-eslint-parser": "^1.2.3"
134135
},
135136
"devDependencies": {
136-
"@antfu/eslint-config": "3.6.0",
137+
"@antfu/eslint-config": "4.3.0",
137138
"@antfu/ni": "^23.3.1",
138139
"@eslint-react/eslint-plugin": "^1.26.2",
139140
"@eslint/config-inspector": "^1.0.0",

0 commit comments

Comments
 (0)