diff --git a/.github/workflows/ci-improvement.yml b/.github/workflows/ci-improvement.yml index 5a1bf8b60..95c1787c8 100644 --- a/.github/workflows/ci-improvement.yml +++ b/.github/workflows/ci-improvement.yml @@ -26,6 +26,7 @@ jobs: - uses: actions/checkout@v3 - name: Setup Node uses: './.github/templates/setup-node' + - run: yarn prettier --config .prettier.config.ci.js src/**/*.{ts,tsx} --check - run: yarn lint - run: yarn unimported - run: yarn build-storybook diff --git a/.lintstagedrc.mjs b/.lintstagedrc.mjs index 7d06b50ea..6c36471ec 100644 --- a/.lintstagedrc.mjs +++ b/.lintstagedrc.mjs @@ -1,7 +1,7 @@ import { execSync } from 'node:child_process'; export default { - '*.{mjs,ts,tsx}': ['prettier --plugin=prettier-plugin-organize-imports --write', 'eslint --cache --fix'], + '*.{mjs,ts,tsx}': ['prettier --config ./.prettier.config.ci.js --write', 'eslint --cache --fix'], '*.{ts,tsx}': () => 'tsc --noEmit', 'public/songs/*.txt': [ 'yarn ts-node scripts/updateLastUpdate.ts', diff --git a/.pnp.cjs b/.pnp.cjs index 42deacc82..8595daef6 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -87,7 +87,7 @@ const RAW_RUNTIME_STATE = ["is-mobile", "npm:4.0.0"],\ ["js-yaml", "npm:4.1.0"],\ ["latinize", "npm:0.5.0"],\ - ["lint-staged", "npm:15.0.2"],\ + ["lint-staged", "npm:15.1.0"],\ ["localforage", "npm:1.10.0"],\ ["lodash", "npm:4.17.21"],\ ["lodash-es", "npm:4.17.21"],\ @@ -6065,7 +6065,7 @@ const RAW_RUNTIME_STATE = ["react-inspector", "virtual:cd305092862e4efc0a9ba08fed2da556a7dbe47cb695b424ae2ba96f6f1057015df57e8e7ca5d9c41fd2c351a28961966a7d151e183dea568ec82c80e4636cb4#npm:6.0.1"],\ ["telejson", "npm:7.2.0"],\ ["ts-dedent", "npm:2.2.0"],\ - ["uuid", "npm:9.0.0"]\ + ["uuid", "npm:9.0.1"]\ ],\ "packagePeers": [\ "@types/react-dom",\ @@ -14666,10 +14666,10 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["lint-staged", [\ - ["npm:15.0.2", {\ - "packageLocation": "./.yarn/cache/lint-staged-npm-15.0.2-9a94018c19-79c6487405.zip/node_modules/lint-staged/",\ + ["npm:15.1.0", {\ + "packageLocation": "./.yarn/cache/lint-staged-npm-15.1.0-b45b212a0d-77aacab303.zip/node_modules/lint-staged/",\ "packageDependencies": [\ - ["lint-staged", "npm:15.0.2"],\ + ["lint-staged", "npm:15.1.0"],\ ["chalk", "npm:5.3.0"],\ ["commander", "npm:11.1.0"],\ ["debug", "virtual:b86a9fb34323a98c6519528ed55faa0d9b44ca8879307c0b29aa384bde47ff59a7d0c9051b31246f14521dfb71ba3c5d6d0b35c29fffc17bf875aa6ad977d9e8#npm:4.3.4"],\ @@ -14679,7 +14679,7 @@ const RAW_RUNTIME_STATE = ["micromatch", "npm:4.0.5"],\ ["pidtree", "npm:0.6.0"],\ ["string-argv", "npm:0.3.2"],\ - ["yaml", "npm:2.3.3"]\ + ["yaml", "npm:2.3.4"]\ ],\ "linkType": "HARD"\ }]\ @@ -15549,7 +15549,7 @@ const RAW_RUNTIME_STATE = ["jsontoxml", "npm:1.0.1"],\ ["source-map-support", "npm:0.5.21"],\ ["tough-cookie", "npm:4.1.3"],\ - ["uuid", "npm:9.0.0"]\ + ["uuid", "npm:9.0.1"]\ ],\ "linkType": "HARD"\ }]\ @@ -15985,7 +15985,7 @@ const RAW_RUNTIME_STATE = ["is-mobile", "npm:4.0.0"],\ ["js-yaml", "npm:4.1.0"],\ ["latinize", "npm:0.5.0"],\ - ["lint-staged", "npm:15.0.2"],\ + ["lint-staged", "npm:15.1.0"],\ ["localforage", "npm:1.10.0"],\ ["lodash", "npm:4.17.21"],\ ["lodash-es", "npm:4.17.21"],\ @@ -20080,13 +20080,6 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["uuid", [\ - ["npm:9.0.0", {\ - "packageLocation": "./.yarn/cache/uuid-npm-9.0.0-46c41e3e43-23857699a6.zip/node_modules/uuid/",\ - "packageDependencies": [\ - ["uuid", "npm:9.0.0"]\ - ],\ - "linkType": "HARD"\ - }],\ ["npm:9.0.1", {\ "packageLocation": "./.yarn/cache/uuid-npm-9.0.1-39a8442bc6-9d0b6adb72.zip/node_modules/uuid/",\ "packageDependencies": [\ @@ -20880,10 +20873,10 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "HARD"\ }],\ - ["npm:2.3.3", {\ - "packageLocation": "./.yarn/cache/yaml-npm-2.3.3-c5a47b9f8f-3b1a974b9d.zip/node_modules/yaml/",\ + ["npm:2.3.4", {\ + "packageLocation": "./.yarn/cache/yaml-npm-2.3.4-8bb6dc2c0d-f8207ce430.zip/node_modules/yaml/",\ "packageDependencies": [\ - ["yaml", "npm:2.3.3"]\ + ["yaml", "npm:2.3.4"]\ ],\ "linkType": "HARD"\ }]\ diff --git a/.prettier.config.ci.js b/.prettier.config.ci.js new file mode 100644 index 000000000..abe7e49a9 --- /dev/null +++ b/.prettier.config.ci.js @@ -0,0 +1,6 @@ +const baseConfig = require("./.prettier.config.js"); + +module.exports = { + ...baseConfig, + plugins: [...(baseConfig.plugins ?? []), "prettier-plugin-organize-imports"], +}; diff --git a/.prettier.config.js b/.prettier.config.js new file mode 100644 index 000000000..1a15c6a54 --- /dev/null +++ b/.prettier.config.js @@ -0,0 +1,10 @@ +/** @type {import("prettier").Config} */ +const config = { + trailingComma: "all", + tabWidth: 2, + singleQuote: true, + bracketSameLine: true, + printWidth: 120, +}; + +module.exports = config; diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 8da38550c..000000000 --- a/.prettierrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "trailingComma": "all", - "tabWidth": 2, - "singleQuote": true, - "bracketSameLine": true, - "printWidth": 120 -} diff --git a/.yarn/cache/@esbuild-darwin-arm64-npm-0.18.20-00b3504077-10.zip b/.yarn/cache/@esbuild-darwin-arm64-npm-0.18.20-00b3504077-10.zip new file mode 100644 index 000000000..fe0999455 Binary files /dev/null and b/.yarn/cache/@esbuild-darwin-arm64-npm-0.18.20-00b3504077-10.zip differ diff --git a/.yarn/cache/@esbuild-darwin-arm64-npm-0.18.6-08a199eff4-10.zip b/.yarn/cache/@esbuild-darwin-arm64-npm-0.18.6-08a199eff4-10.zip new file mode 100644 index 000000000..1a2b2eda8 Binary files /dev/null and b/.yarn/cache/@esbuild-darwin-arm64-npm-0.18.6-08a199eff4-10.zip differ diff --git a/.yarn/cache/@esbuild-darwin-arm64-npm-0.19.4-c1d1f2bbbf-10.zip b/.yarn/cache/@esbuild-darwin-arm64-npm-0.19.4-c1d1f2bbbf-10.zip new file mode 100644 index 000000000..bc1c970a1 Binary files /dev/null and b/.yarn/cache/@esbuild-darwin-arm64-npm-0.19.4-c1d1f2bbbf-10.zip differ diff --git a/.yarn/cache/@esbuild-linux-x64-npm-0.18.20-de8e99b449-10.zip b/.yarn/cache/@esbuild-linux-x64-npm-0.18.20-de8e99b449-10.zip deleted file mode 100644 index 67ac3efed..000000000 Binary files a/.yarn/cache/@esbuild-linux-x64-npm-0.18.20-de8e99b449-10.zip and /dev/null differ diff --git a/.yarn/cache/@esbuild-linux-x64-npm-0.18.6-44f1db97cd-10.zip b/.yarn/cache/@esbuild-linux-x64-npm-0.18.6-44f1db97cd-10.zip deleted file mode 100644 index 595452ded..000000000 Binary files a/.yarn/cache/@esbuild-linux-x64-npm-0.18.6-44f1db97cd-10.zip and /dev/null differ diff --git a/.yarn/cache/@esbuild-linux-x64-npm-0.19.4-3dd3d3608b-10.zip b/.yarn/cache/@esbuild-linux-x64-npm-0.19.4-3dd3d3608b-10.zip deleted file mode 100644 index beb2cf134..000000000 Binary files a/.yarn/cache/@esbuild-linux-x64-npm-0.19.4-3dd3d3608b-10.zip and /dev/null differ diff --git a/.yarn/cache/@msgpackr-extract-msgpackr-extract-darwin-arm64-npm-3.0.2-18ac236cc4-10.zip b/.yarn/cache/@msgpackr-extract-msgpackr-extract-darwin-arm64-npm-3.0.2-18ac236cc4-10.zip new file mode 100644 index 000000000..620a7b79a Binary files /dev/null and b/.yarn/cache/@msgpackr-extract-msgpackr-extract-darwin-arm64-npm-3.0.2-18ac236cc4-10.zip differ diff --git a/.yarn/cache/@msgpackr-extract-msgpackr-extract-linux-x64-npm-3.0.2-262fca760d-10.zip b/.yarn/cache/@msgpackr-extract-msgpackr-extract-linux-x64-npm-3.0.2-262fca760d-10.zip deleted file mode 100644 index 6bd7be2ee..000000000 Binary files a/.yarn/cache/@msgpackr-extract-msgpackr-extract-linux-x64-npm-3.0.2-262fca760d-10.zip and /dev/null differ diff --git a/.yarn/cache/@remotion-compositor-darwin-arm64-npm-4.0.68-5b63abaa8b-10.zip b/.yarn/cache/@remotion-compositor-darwin-arm64-npm-4.0.68-5b63abaa8b-10.zip new file mode 100644 index 000000000..81b04a51b Binary files /dev/null and b/.yarn/cache/@remotion-compositor-darwin-arm64-npm-4.0.68-5b63abaa8b-10.zip differ diff --git a/.yarn/cache/@remotion-compositor-linux-x64-gnu-npm-4.0.68-9ce29a3e87-10.zip b/.yarn/cache/@remotion-compositor-linux-x64-gnu-npm-4.0.68-9ce29a3e87-10.zip deleted file mode 100644 index 2aa56a781..000000000 Binary files a/.yarn/cache/@remotion-compositor-linux-x64-gnu-npm-4.0.68-9ce29a3e87-10.zip and /dev/null differ diff --git a/.yarn/cache/fsevents-patch-19706e7e35-10.zip b/.yarn/cache/fsevents-patch-19706e7e35-10.zip new file mode 100644 index 000000000..aff1ab12c Binary files /dev/null and b/.yarn/cache/fsevents-patch-19706e7e35-10.zip differ diff --git a/.yarn/cache/fsevents-patch-6b67494872-10.zip b/.yarn/cache/fsevents-patch-6b67494872-10.zip new file mode 100644 index 000000000..9887ada72 Binary files /dev/null and b/.yarn/cache/fsevents-patch-6b67494872-10.zip differ diff --git a/.yarn/cache/lint-staged-npm-15.0.2-9a94018c19-79c6487405.zip b/.yarn/cache/lint-staged-npm-15.1.0-b45b212a0d-77aacab303.zip similarity index 58% rename from .yarn/cache/lint-staged-npm-15.0.2-9a94018c19-79c6487405.zip rename to .yarn/cache/lint-staged-npm-15.1.0-b45b212a0d-77aacab303.zip index 89e3dce3e..0333a4216 100644 Binary files a/.yarn/cache/lint-staged-npm-15.0.2-9a94018c19-79c6487405.zip and b/.yarn/cache/lint-staged-npm-15.1.0-b45b212a0d-77aacab303.zip differ diff --git a/.yarn/cache/uuid-npm-9.0.0-46c41e3e43-23857699a6.zip b/.yarn/cache/uuid-npm-9.0.0-46c41e3e43-23857699a6.zip deleted file mode 100644 index 9e232581a..000000000 Binary files a/.yarn/cache/uuid-npm-9.0.0-46c41e3e43-23857699a6.zip and /dev/null differ diff --git a/.yarn/cache/yaml-npm-2.3.3-c5a47b9f8f-3b1a974b9d.zip b/.yarn/cache/yaml-npm-2.3.4-8bb6dc2c0d-f8207ce430.zip similarity index 92% rename from .yarn/cache/yaml-npm-2.3.3-c5a47b9f8f-3b1a974b9d.zip rename to .yarn/cache/yaml-npm-2.3.4-8bb6dc2c0d-f8207ce430.zip index e470a70d8..e6c7a6708 100644 Binary files a/.yarn/cache/yaml-npm-2.3.3-c5a47b9f8f-3b1a974b9d.zip and b/.yarn/cache/yaml-npm-2.3.4-8bb6dc2c0d-f8207ce430.zip differ diff --git a/package.json b/package.json index 96003df9e..f21ae7a4b 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "happy-dom": "^12.10.3", "husky": "^8.0.3", "js-yaml": "^4.1.0", - "lint-staged": "^15.0.2", + "lint-staged": "^15.1.0", "lodash": "^4.17.21", "musicbrainz-api": "^0.11.0", "node-fetch": "^3.3.2", diff --git a/yarn.lock b/yarn.lock index 96b626466..67c60b06d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10957,9 +10957,9 @@ __metadata: languageName: node linkType: hard -"lint-staged@npm:^15.0.2": - version: 15.0.2 - resolution: "lint-staged@npm:15.0.2" +"lint-staged@npm:^15.1.0": + version: 15.1.0 + resolution: "lint-staged@npm:15.1.0" dependencies: chalk: "npm:5.3.0" commander: "npm:11.1.0" @@ -10970,10 +10970,10 @@ __metadata: micromatch: "npm:4.0.5" pidtree: "npm:0.6.0" string-argv: "npm:0.3.2" - yaml: "npm:2.3.3" + yaml: "npm:2.3.4" bin: lint-staged: bin/lint-staged.js - checksum: 79c6487405dff2670bcf7e4721f06705bd33b4fef88d77988565fb9cb2f62608231cbbc706da0ae150b49d0fab447be083c4561164670ec7f407fd183ce27615 + checksum: 77aacab303ebab8ef6781833d35d82405b73f0e3e8f8c585cdd95b0e1f42a638a12e853d7ef6227a85d77ed2ba233f92b0499124696a6872569c508e04d25ce3 languageName: node linkType: hard @@ -12131,7 +12131,7 @@ __metadata: is-mobile: "npm:^4.0.0" js-yaml: "npm:^4.1.0" latinize: "npm:^0.5.0" - lint-staged: "npm:^15.0.2" + lint-staged: "npm:^15.1.0" localforage: "npm:^1.10.0" lodash: "npm:^4.17.21" lodash-es: "npm:^4.17.21" @@ -15461,16 +15461,7 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^9.0.0": - version: 9.0.0 - resolution: "uuid@npm:9.0.0" - bin: - uuid: dist/bin/uuid - checksum: 23857699a616d1b48224bc2b8440eae6e57d25463c3a0200e514ba8279dfa3bde7e92ea056122237839cfa32045e57d8f8f4a30e581d720fd72935572853ae2e - languageName: node - linkType: hard - -"uuid@npm:^9.0.1": +"uuid@npm:^9.0.0, uuid@npm:^9.0.1": version: 9.0.1 resolution: "uuid@npm:9.0.1" bin: @@ -16040,10 +16031,10 @@ __metadata: languageName: node linkType: hard -"yaml@npm:2.3.3": - version: 2.3.3 - resolution: "yaml@npm:2.3.3" - checksum: 3b1a974b9d3672c671d47099a41c0de77b7ff978d0849aa55a095587486e82cd072321d19f2b4c791a367f766310b5a82dff098839b0f4ddcbbbe477f82dfb07 +"yaml@npm:2.3.4": + version: 2.3.4 + resolution: "yaml@npm:2.3.4" + checksum: f8207ce43065a22268a2806ea6a0fa3974c6fde92b4b2fa0082357e487bc333e85dc518910007e7ac001b532c7c84bd3eccb6c7757e94182b564028b0008f44b languageName: node linkType: hard