-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
chore: migrate from Prettier to oxfmt for code formatting #11824
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
Changes from all commits
a1ca456
6b0606f
58a2c11
7d84045
54cdc64
794c458
0f367fa
4b2ba8a
5c01fc7
296451d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,13 @@ | ||
| { | ||
| "*.{js,jsx,ts,tsx,mjs}": ["eslint --fix"], | ||
| "*.css": ["stylelint --allow-empty-input --fix"], | ||
| "*": ["prettier --ignore-unknown --write"] | ||
| "*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}": [ | ||
| "eslint --fix", | ||
| "oxfmt --no-error-on-unmatched-pattern" | ||
| ], | ||
| "*.{css,scss,less}": [ | ||
| "stylelint --allow-empty-input --fix", | ||
| "oxfmt --no-error-on-unmatched-pattern" | ||
| ], | ||
| "*.{json,jsonc,json5,md,mdx,html,yml,yaml,toml}": [ | ||
| "oxfmt --no-error-on-unmatched-pattern" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| { | ||
| "$schema": "./node_modules/oxfmt/configuration_schema.json", | ||
| "arrowParens": "always", | ||
| "bracketSameLine": true, | ||
| "bracketSpacing": false, | ||
| "ignorePatterns": [ | ||
| "dist", | ||
| "node_modules", | ||
| ".yarn", | ||
| "**/build/**", | ||
| "coverage", | ||
| ".docusaurus", | ||
| ".idea", | ||
| ".svg", | ||
| "*.svg", | ||
| "jest/vendor", | ||
| "argos/test-results", | ||
| "packages/lqip-loader/lib/", | ||
| "packages/docusaurus/lib/", | ||
| "packages/docusaurus-*/lib/*", | ||
|
|
||
| "packages/create-docusaurus/lib/*", | ||
| "!packages/docusaurus-*/lib/theme/**", | ||
|
|
||
| "packages/create-docusaurus/templates/*/docusaurus.config.js", | ||
| "packages/eslint-plugin/lib/", | ||
| "packages/stylelint-copyright/lib/", | ||
| "__fixtures__", | ||
| "website/i18n", | ||
| "website/versions.json", | ||
| "website/docusaurus.config.js", | ||
| "website/versioned_docs/", | ||
| "website/versioned_sidebars/*.json", | ||
| "examples/", | ||
| "website/static/katex/katex.min.css", | ||
| "website/changelog", | ||
| "website/_dogfooding/_swizzle_theme_tests", | ||
| "website/_dogfooding/_asset-tests/badSyntax.js", | ||
| "website/_dogfooding/_asset-tests/badSyntax.css", | ||
| "*.xml", | ||
| "*.xsl" | ||
| ], | ||
| "insertFinalNewline": true, | ||
| "printWidth": 80, | ||
| "proseWrap": "never", | ||
| "singleQuote": true, | ||
| "sortPackageJson": false, | ||
| "trailingComma": "all" | ||
| } | ||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| "main": "lib/index.js", | ||
| "types": "src/plugin-ideal-image.d.ts", | ||
| "scripts": { | ||
| "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", | ||
| "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && oxfmt \"lib/theme/**/*.js\"", | ||
|
Collaborator
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. FYI I removed the
|
||
| "watch": "run-p -c copy:watch build:watch", | ||
| "build:watch": "tsc --build --watch", | ||
| "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" | ||
|
|
||
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.
Needed to format js files for js swizzle CLI, otherwise we get an error without
--no-error-on-unmatched-patternbecause oxfmt doesn't format them