Skip to content

Commit

Permalink
chore: import prettier config from monorepo, closes #4268
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-watters authored and kyranjamie committed Oct 26, 2023
1 parent 5c85448 commit 733e503
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 51 deletions.
12 changes: 1 addition & 11 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
const defaultConfig = require('@stacks/prettier-config');
const defaultConfig = require('@leather-wallet/prettier-config');

module.exports = {
...defaultConfig,
plugins: [require.resolve('@trivago/prettier-plugin-sort-imports')],
importOrder: [
'^react',
'<THIRD_PARTY_MODULES>',
'^@shared/(.*)$',
'^@(app|content-script|inpage|background)/(.*)$',
'^[./]',
],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
};
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@
"@babel/preset-react": "7.22.15",
"@babel/preset-typescript": "7.23.0",
"@btckit/types": "0.0.19",
"@leather-wallet/prettier-config": "0.0.1",
"@ls-lint/ls-lint": "2.1.0",
"@pandacss/dev": "0.16.0",
"@playwright/test": "1.38.1",
Expand All @@ -248,9 +249,7 @@
"@schemastore/web-manifest": "0.0.6",
"@sentry/webpack-plugin": "2.4.0",
"@stacks/connect-react": "22.2.0",
"@stacks/prettier-config": "0.0.10",
"@stacks/stacks-blockchain-api-types": "6.3.4",
"@trivago/prettier-plugin-sort-imports": "4.2.0",
"@types/argon2-browser": "1.18.2",
"@types/chroma-js": "2.4.1",
"@types/chrome": "0.0.246",
Expand Down
72 changes: 34 additions & 38 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
dependencies:
undici "^5.22.0"

"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.16.7", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.8.3":
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.8.3":
version "7.22.13"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e"
integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==
Expand Down Expand Up @@ -351,7 +351,7 @@
jsesc "^2.5.1"
source-map "^0.5.0"

"@babel/generator@^7.17.3", "@babel/generator@^7.22.5", "@babel/generator@^7.23.0":
"@babel/generator@^7.22.5", "@babel/generator@^7.23.0":
version "7.23.0"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420"
integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==
Expand Down Expand Up @@ -394,20 +394,20 @@
"@babel/helper-split-export-declaration" "^7.22.6"
semver "^6.3.1"

"@babel/helper-environment-visitor@^7.16.7", "@babel/helper-environment-visitor@^7.22.20", "@babel/helper-environment-visitor@^7.22.5":
"@babel/helper-environment-visitor@^7.22.20", "@babel/helper-environment-visitor@^7.22.5":
version "7.22.20"
resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167"
integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==

"@babel/helper-function-name@^7.16.7", "@babel/helper-function-name@^7.22.5", "@babel/helper-function-name@^7.23.0":
"@babel/helper-function-name@^7.22.5", "@babel/helper-function-name@^7.23.0":
version "7.23.0"
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759"
integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==
dependencies:
"@babel/template" "^7.22.15"
"@babel/types" "^7.23.0"

"@babel/helper-hoist-variables@^7.16.7", "@babel/helper-hoist-variables@^7.22.5":
"@babel/helper-hoist-variables@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb"
integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==
Expand Down Expand Up @@ -474,7 +474,7 @@
dependencies:
"@babel/types" "^7.22.5"

"@babel/helper-split-export-declaration@^7.16.7", "@babel/helper-split-export-declaration@^7.22.6":
"@babel/helper-split-export-declaration@^7.22.6":
version "7.22.6"
resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c"
integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==
Expand Down Expand Up @@ -528,7 +528,7 @@
chalk "^5.3.0"
js-tokens "^8.0.0"

"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.17.3", "@babel/parser@^7.20.15", "@babel/parser@^7.20.5", "@babel/parser@^7.20.7", "@babel/parser@^7.21.3", "@babel/parser@^7.22.15", "@babel/parser@^7.22.5", "@babel/parser@^7.23.0":
"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.15", "@babel/parser@^7.20.5", "@babel/parser@^7.20.7", "@babel/parser@^7.21.3", "@babel/parser@^7.22.15", "@babel/parser@^7.22.5", "@babel/parser@^7.23.0":
version "7.23.0"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719"
integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==
Expand Down Expand Up @@ -652,19 +652,19 @@
"@babel/parser" "^7.22.15"
"@babel/types" "^7.22.15"

"@babel/traverse@7.17.3":
version "7.17.3"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.3.tgz#0ae0f15b27d9a92ba1f2263358ea7c4e7db47b57"
integrity sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==
dependencies:
"@babel/code-frame" "^7.16.7"
"@babel/generator" "^7.17.3"
"@babel/helper-environment-visitor" "^7.16.7"
"@babel/helper-function-name" "^7.16.7"
"@babel/helper-hoist-variables" "^7.16.7"
"@babel/helper-split-export-declaration" "^7.16.7"
"@babel/parser" "^7.17.3"
"@babel/types" "^7.17.0"
"@babel/traverse@7.23.2":
version "7.23.2"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8"
integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==
dependencies:
"@babel/code-frame" "^7.22.13"
"@babel/generator" "^7.23.0"
"@babel/helper-environment-visitor" "^7.22.20"
"@babel/helper-function-name" "^7.23.0"
"@babel/helper-hoist-variables" "^7.22.5"
"@babel/helper-split-export-declaration" "^7.22.6"
"@babel/parser" "^7.23.0"
"@babel/types" "^7.23.0"
debug "^4.1.0"
globals "^11.1.0"

Expand Down Expand Up @@ -1878,6 +1878,14 @@
"@jridgewell/resolve-uri" "^3.1.0"
"@jridgewell/sourcemap-codec" "^1.4.14"

"@leather-wallet/[email protected]":
version "0.0.1"
resolved "https://registry.yarnpkg.com/@leather-wallet/prettier-config/-/prettier-config-0.0.1.tgz#35d5df1a3de533ff13ab9309e29c20a9d2496e51"
integrity sha512-73WvurHNvKfp/x5nHjOUBSmzEtAdHzMpBvz3EF7mN9kpYC41/li5znWGI8cF8wdzCZBAmyG6sNA9xVk6aT6bwA==
dependencies:
"@trivago/prettier-plugin-sort-imports" "^4.2.0"
prettier "^3.0.3"

"@ledgerhq/devices@^8.0.7":
version "8.0.7"
resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.0.7.tgz#206434dbd8a097529bbfc95f5eef94c2923c7578"
Expand Down Expand Up @@ -4766,13 +4774,6 @@
"@stacks/common" "^4.3.5"
cross-fetch "^3.1.5"

"@stacks/[email protected]":
version "0.0.10"
resolved "https://registry.yarnpkg.com/@stacks/prettier-config/-/prettier-config-0.0.10.tgz#a63915c1e466a1ca9b34d3947f448ac101764b94"
integrity sha512-MrYWGEgO/mYR8TOZIKknQEHbFQZ5VyAD/s8eF2Yxr6Lgalt2alVEh+6ODehVP2uepkyXPmJzLbaQYs8/L4E78Q==
dependencies:
prettier "2.5"

"@stacks/[email protected]", "@stacks/profile@^6.1.1", "@stacks/profile@^6.9.0":
version "6.9.0"
resolved "https://registry.yarnpkg.com/@stacks/profile/-/profile-6.9.0.tgz#aa2b583f30cea6b407c35acdb4e15103b2fde123"
Expand Down Expand Up @@ -5980,14 +5981,14 @@
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==

"@trivago/[email protected]":
version "4.2.0"
resolved "https://registry.yarnpkg.com/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.2.0.tgz#b240366f9e2bda8e14edb18b14ea084e0ec25968"
integrity sha512-YBepjbt+ZNBVmN3ev1amQH3lWCmHyt5qTbLCp/syXJRu/Kw2koXh44qayB1gMRxcL/gV8egmjN5xWSrYyfUtyw==
"@trivago/prettier-plugin-sort-imports@^4.2.0":
version "4.2.1"
resolved "https://registry.yarnpkg.com/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.2.1.tgz#a4f57df41a46803a75bd8e8ce371b29e78a27eb4"
integrity sha512-iuy2MPVURGdxILTchHr15VAioItuYBejKfcTmQFlxIuqA7jeaT6ngr5aUIG6S6U096d6a6lJCgaOwlRrPLlOPg==
dependencies:
"@babel/generator" "7.17.7"
"@babel/parser" "^7.20.5"
"@babel/traverse" "7.17.3"
"@babel/traverse" "7.23.2"
"@babel/types" "7.17.0"
javascript-natural-sort "0.7.1"
lodash "^4.17.21"
Expand Down Expand Up @@ -16890,12 +16891,7 @@ prettier-plugin-astro@^0.9.1:
sass-formatter "^0.7.5"
synckit "^0.8.4"

[email protected]:
version "2.5.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a"
integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==

[email protected]:
[email protected], prettier@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643"
integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==
Expand Down

0 comments on commit 733e503

Please sign in to comment.