generated from sonofmagic/npm-lib-template
-
-
Notifications
You must be signed in to change notification settings - Fork 98
feat(dev): fast prettier #657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
medz
wants to merge
6
commits into
sonofmagic:main
Choose a base branch
from
medz:feat-fast-prettier
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5008207
feat(dev): add Prettier configuration files and plugins
medz d465755
chore(dev): fix Prettier format command to write all files
medz c532f71
chore(dev): add Tailwind CSS Prettier plugin
medz 3188077
chore(dev): fix format command
medz 493d9ec
chore: add Prettier support to ESLint config
medz 4918da4
chore(dev): export ESLint config directly instead of using intermediate
medz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| *.patch | ||
| bun.lock | ||
| pnpm-lock.yaml | ||
|
|
||
| dist | ||
| node_modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "$schema": "https://json.schemastore.org/prettierrc", | ||
| "plugins": [ | ||
| "prettier-plugin-tailwindcss", | ||
| "@prettier/plugin-oxc", | ||
| "@ianvs/prettier-plugin-sort-imports" | ||
| ], | ||
| "tabWidth": 2, | ||
| "semi": true, | ||
| "singleQuote": true, | ||
| "experimentalTernaries": true, | ||
| "printWidth": 100, | ||
| "useTabs": false, | ||
| "bracketSpacing": true, | ||
| "objectWrap": "collapse", | ||
| "bracketSameLine": true, | ||
| "endOfLine": "lf", | ||
|
|
||
| "overrides": [ | ||
| { "files": ["**/*.html", "**/*.svg"], "options": { "parser": "html", "tabWidth": 4 } }, | ||
| { "files": ["**/*.vue"], "options": { "parser": "vue", "tabWidth": 4 } }, | ||
| { "files": ["**/*.css"], "options": { "parser": "css", "tabWidth": 4 } } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,7 +65,7 @@ | |
| "sync": "cnpm sync weapp-tailwindcss-webpack-plugin weapp-tailwindcss weapp-tw @weapp-tailwindcss/cli @weapp-tailwindcss/typography", | ||
| "sync:all": "turbo run sync", | ||
| "generate:readme": "tsx scripts/readme/write.ts", | ||
| "format": "prettier --check \"src/**/*.{ts,js}\" -w", | ||
| "format": "prettier --write .", | ||
| "format:test": "prettier --check \"test/**/*.test.{ts,js}\" -w", | ||
| "ls:pack": "npm pack --dry-run", | ||
| "cli:patch": "node bin/weapp-tailwindcss.js patch", | ||
|
|
@@ -108,9 +108,11 @@ | |
| "@csstools/css-parser-algorithms": "^3.0.5", | ||
| "@csstools/css-tokenizer": "^3.0.4", | ||
| "@eslint/config-inspector": "^1.1.0", | ||
| "@ianvs/prettier-plugin-sort-imports": "^4.4.2", | ||
| "@icebreakers/eslint-config": "^1.2.1", | ||
| "@icebreakers/monorepo": "^1.0.5", | ||
| "@icebreakers/stylelint-config": "^1.1.0", | ||
| "@prettier/plugin-oxc": "^0.0.3", | ||
| "@tailwindcss/postcss": "^4.1.10", | ||
| "@tailwindcss/vite": "^4.1.10", | ||
| "@tsconfig/recommended": "^1.0.10", | ||
|
|
@@ -177,6 +179,7 @@ | |
| "es-toolkit": "^1.39.4", | ||
| "esbuild": "^0.25.5", | ||
| "eslint": "^9.29.0", | ||
| "eslint-config-prettier": "^10.1.5", | ||
| "execa": "^9.6.0", | ||
| "express": "^5.1.0", | ||
| "fast-glob": "^3.3.3", | ||
|
|
@@ -210,6 +213,7 @@ | |
| "postcss-preset-env": "^10.2.3", | ||
| "postcss-scss": "^4.0.9", | ||
| "prettier": "^3.6.0", | ||
| "prettier-plugin-tailwindcss": "^0.6.13", | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 实际上我这里没有用到 prettier 和 prettier-plugin-tailwindcss 插件,因为我其实是用了 https://www.npmjs.com/package/eslint-plugin-tailwindcss 的 都集成在 @icebreakers/eslint-config 里面了 |
||
| "promisify-loader-runner": "^1.0.1", | ||
| "rimraf": "^6.0.1", | ||
| "sass": "^1.89.2", | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个命名实际上走的是 antfu 的规则命名,没有对他做什么修改