Skip to content

Commit 82e74d4

Browse files
committed
style: migrate to prettier
1 parent 46356d6 commit 82e74d4

9 files changed

Lines changed: 3036 additions & 1478 deletions

File tree

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
pnpm-lock.yaml
3+
dist/
4+
types/typegen.types
5+
!playground/
6+
.eslint-config-inspector

.vscode/settings.json

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
2-
// Disable the default formatter, use eslint instead
3-
"prettier.enable": false,
4-
"editor.formatOnSave": false,
5-
62
// Auto fix
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
74
"editor.codeActionsOnSave": {
85
"source.fixAll.eslint": "explicit",
96
"source.organizeImports": "never"
@@ -23,30 +20,6 @@
2320
{ "rule": "*semi", "severity": "off" }
2421
],
2522

26-
// Enable eslint for all supported languages
27-
"eslint.validate": [
28-
"javascript",
29-
"javascriptreact",
30-
"typescript",
31-
"typescriptreact",
32-
"vue",
33-
"html",
34-
"markdown",
35-
"json",
36-
"jsonc",
37-
"yaml",
38-
"toml",
39-
"xml",
40-
"gql",
41-
"graphql",
42-
"astro",
43-
"css",
44-
"less",
45-
"scss",
46-
"pcss",
47-
"postcss"
48-
],
49-
5023
// markdownlint
5124
"markdownlint.config": {
5225
"no-inline-html": false

eslint.config.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import antfu from "@antfu/eslint-config";
44
export default antfu({
55
javascript: true,
66
typescript: true,
7-
stylistic: {
8-
semi: true,
9-
quotes: "double",
10-
},
11-
formatters: true,
7+
stylistic: false,
8+
// stylistic: {
9+
// semi: true,
10+
// quotes: "double",
11+
// },
12+
// formatters: true,
1213
ignores: ["src/typegen.ts", "playground/**/*"],
1314
});
1415

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
"build:tsc": "tsc --noEmit",
4343
"build:inspector": "eslint-config-inspector build --config ./playground/eslint-inspector.config.ts --basePath playground",
4444
"typecheck": "tsc --noEmit",
45-
"lint:check": "eslint .",
46-
"lint:fix": "eslint . --fix",
45+
"lint:check": "prettier . --check && eslint .",
46+
"lint:fix": "prettier . --write %% eslint . --fix",
4747
"release": "bumpp --commit \"chore(release): publish v%s\"",
4848
"update:deps": "pnpx taze minor -w -f -l -r",
4949
"prepare": "husky"
@@ -68,11 +68,13 @@
6868
"eslint-typegen": "^2.2.0",
6969
"husky": "^9.1.7",
7070
"lint-staged": "^16.1.0",
71+
"prettier": "^3.5.3",
7172
"tsdown": "^0.12.7",
7273
"tsx": "^4.20.1",
7374
"typescript": "^5.8.3"
7475
},
7576
"lint-staged": {
7677
"*": "eslint --fix"
77-
}
78+
},
79+
"prettier": {}
7880
}

0 commit comments

Comments
 (0)