Skip to content

Commit

Permalink
Run prettier check on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Asvarox committed Nov 12, 2023
1 parent d8c953f commit 5d8cd21
Show file tree
Hide file tree
Showing 23 changed files with 41 additions and 47 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-improvement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
29 changes: 11 additions & 18 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .prettier.config.ci.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const baseConfig = require("./.prettier.config.js");

module.exports = {
...baseConfig,
plugins: [...(baseConfig.plugins ?? []), "prettier-plugin-organize-imports"],
};
10 changes: 10 additions & 0 deletions .prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/** @type {import("prettier").Config} */
const config = {
trailingComma: "all",
tabWidth: 2,
singleQuote: true,
bracketSameLine: true,
printWidth: 120,
};

module.exports = config;
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .yarn/cache/fsevents-patch-19706e7e35-10.zip
Binary file not shown.
Binary file added .yarn/cache/fsevents-patch-6b67494872-10.zip
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/uuid-npm-9.0.0-46c41e3e43-23857699a6.zip
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
31 changes: 11 additions & 20 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 5d8cd21

Please sign in to comment.