Skip to content

Commit

Permalink
[core] Use pretty-quick instead of custom script (mui#34062)
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot authored and the-mgi committed Nov 17, 2022
1 parent 93f0767 commit 37178a1
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 229 deletions.
7 changes: 7 additions & 0 deletions .eslintignore
Expand Up @@ -28,3 +28,10 @@
.next
build
node_modules
.nyc_output

# These come from crowdin.
# If we would commit changes crowdin would immediately try to revert.
# If we want to format these files we'd need to do it in crowdin
docs/**/*-pt.md
docs/**/*-zh.md
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -39,8 +39,8 @@
"lint:ci": "eslint . --report-unused-disable-directives --ext .js,.ts,.tsx --max-warnings 0",
"stylelint": "stylelint --reportInvalidScopeDisables --reportNeedlessDisables docs/**/*.{js,ts,tsx}",
"markdownlint": "markdownlint-cli2 \"**/*.md\"",
"prettier": "node ./scripts/prettier.mjs",
"prettier:all": "node ./scripts/prettier.mjs write",
"prettier": "pretty-quick --ignore-path .eslintignore",
"prettier:all": "prettier --write . --ignore-path .eslintignore",
"size:snapshot": "node --max-old-space-size=4096 ./scripts/sizeSnapshot/create",
"size:why": "yarn size:snapshot --analyze",
"start": "yarn && yarn docs:dev",
Expand Down Expand Up @@ -164,6 +164,7 @@
"piscina": "^3.2.0",
"playwright": "^1.27.1",
"prettier": "^2.7.1",
"pretty-quick": "^3.1.3",
"process": "^0.11.10",
"prop-types": "^15.8.1",
"raw-loader": "4.0.2",
Expand Down
2 changes: 1 addition & 1 deletion scripts/jsonlint.mjs
Expand Up @@ -14,7 +14,7 @@ async function run() {
const eslintignoreContent = await fse.readFile(path.join(workspaceRoot, '.eslintignore'), {
encoding: 'utf8',
});
const eslintignore = eslintignoreContent.split(/\r?\n/).slice(0, -1);
const eslintignore = eslintignoreContent.split(/\r?\n/).filter(Boolean);

const filenames = await glob('**/*.json', {
cwd: workspaceRoot,
Expand Down
29 changes: 0 additions & 29 deletions scripts/listChangedFiles.mjs

This file was deleted.

41 changes: 0 additions & 41 deletions scripts/listChangedFiles.test.mjs

This file was deleted.

153 changes: 0 additions & 153 deletions scripts/prettier.mjs

This file was deleted.

62 changes: 59 additions & 3 deletions yarn.lock
Expand Up @@ -5492,6 +5492,14 @@ chalk@^2.0.0, chalk@^2.3.0:
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"

chalk@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4"
integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==
dependencies:
ansi-styles "^4.1.0"
supports-color "^7.1.0"

chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
Expand Down Expand Up @@ -7727,6 +7735,21 @@ execa@^1.0.0:
signal-exit "^3.0.0"
strip-eof "^1.0.0"

execa@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a"
integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==
dependencies:
cross-spawn "^7.0.0"
get-stream "^5.0.0"
human-signals "^1.1.1"
is-stream "^2.0.0"
merge-stream "^2.0.0"
npm-run-path "^4.0.0"
onetime "^5.1.0"
signal-exit "^3.0.2"
strip-final-newline "^2.0.0"

execa@^5.0.0:
version "5.1.1"
resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd"
Expand Down Expand Up @@ -8397,7 +8420,7 @@ get-stream@^4.0.0:
dependencies:
pump "^3.0.0"

get-stream@^5.1.0:
get-stream@^5.0.0, get-stream@^5.1.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3"
integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==
Expand Down Expand Up @@ -9034,6 +9057,11 @@ https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1:
agent-base "6"
debug "4"

human-signals@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==

human-signals@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
Expand Down Expand Up @@ -9087,7 +9115,7 @@ ignore-walk@^5.0.1:
dependencies:
minimatch "^5.0.1"

ignore@^5.0.4, ignore@^5.1.8, ignore@^5.2.0:
ignore@^5.0.4, ignore@^5.1.4, ignore@^5.1.8, ignore@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a"
integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==
Expand Down Expand Up @@ -11347,6 +11375,11 @@ moo@^0.5.0:
resolved "https://registry.yarnpkg.com/moo/-/moo-0.5.1.tgz#7aae7f384b9b09f620b6abf6f74ebbcd1b65dbc4"
integrity sha512-I1mnb5xn4fO80BH9BLcF0yLypy2UKl+Cb01Fu0hJRkJjlCRtxZMWkTdAtDd5ZqCOxtCkhmRwyI57vWT+1iZ67w==

mri@^1.1.5:
version "1.2.0"
resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b"
integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==

mrmime@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.1.tgz#5f90c825fad4bdd41dc914eff5d1a8cfdaf24f27"
Expand All @@ -11367,6 +11400,17 @@ ms@2.1.3, ms@^2.0.0, ms@^2.1.1:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==

multimatch@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-4.0.0.tgz#8c3c0f6e3e8449ada0af3dd29efb491a375191b3"
integrity sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==
dependencies:
"@types/minimatch" "^3.0.3"
array-differ "^3.0.0"
array-union "^2.1.0"
arrify "^2.0.1"
minimatch "^3.0.4"

multimatch@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-5.0.0.tgz#932b800963cea7a31a033328fa1e0c3a1874dbe6"
Expand Down Expand Up @@ -11766,7 +11810,7 @@ npm-run-path@^2.0.0:
dependencies:
path-key "^2.0.0"

npm-run-path@^4.0.1:
npm-run-path@^4.0.0, npm-run-path@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea"
integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==
Expand Down Expand Up @@ -12770,6 +12814,18 @@ pretty-format@^27.0.2:
ansi-styles "^5.0.0"
react-is "^17.0.1"

pretty-quick@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-3.1.3.tgz#15281108c0ddf446675157ca40240099157b638e"
integrity sha512-kOCi2FJabvuh1as9enxYmrnBC6tVMoVOenMaBqRfsvBHB0cbpYHjdQEpSglpASDFEXVwplpcGR4CLEaisYAFcA==
dependencies:
chalk "^3.0.0"
execa "^4.0.0"
find-up "^4.1.0"
ignore "^5.1.4"
mri "^1.1.5"
multimatch "^4.0.0"

prettyjson@^1.2.1:
version "1.2.5"
resolved "https://registry.yarnpkg.com/prettyjson/-/prettyjson-1.2.5.tgz#ef3cfffcc70505c032abc59785884b4027031835"
Expand Down

0 comments on commit 37178a1

Please sign in to comment.