diff --git a/.github/workflows/label_export.yml b/.github/workflows/label_export.yml index af82740..fb515ec 100644 --- a/.github/workflows/label_export.yml +++ b/.github/workflows/label_export.yml @@ -3,7 +3,7 @@ name: Export label on: push: paths: - - ".github/workflows/label_export.yml" + - '.github/workflows/label_export.yml' label: types: [created, edited, deleted] workflow_dispatch: @@ -33,13 +33,13 @@ jobs: ref: main - uses: actions/setup-node@v3 with: - cache: "yarn" + cache: 'yarn' - run: yarn install - uses: actions/download-artifact@v3 with: name: Label config - run: cp labels.yaml .github/labels.yaml - - run: yarn run format:fix + - run: yarn prettier:fix - uses: peter-evans/create-pull-request@v5 with: commit-message: Update labels diff --git a/.github/workflows/label_sync.yml b/.github/workflows/label_sync.yml index 0011bc9..4609a96 100644 --- a/.github/workflows/label_sync.yml +++ b/.github/workflows/label_sync.yml @@ -3,8 +3,8 @@ name: Sync labels on: push: paths: - - ".github/labels.yaml" - - ".github/workflows/label_sync.yml" + - '.github/labels.yaml' + - '.github/workflows/label_sync.yml' workflow_dispatch: permissions: diff --git a/.github/workflows/qiita_publish_articles.yml b/.github/workflows/qiita_publish_articles.yml index a52dfda..a60ff2e 100644 --- a/.github/workflows/qiita_publish_articles.yml +++ b/.github/workflows/qiita_publish_articles.yml @@ -5,8 +5,8 @@ on: branches: - main paths: - - "qiita/**" - - ".github/workflows/qiita_publish_articles.yml" + - 'qiita/**' + - '.github/workflows/qiita_publish_articles.yml' workflow_dispatch: permissions: @@ -34,12 +34,12 @@ jobs: ref: main - uses: actions/setup-node@v3 with: - cache: "yarn" + cache: 'yarn' - run: yarn install - run: yarn workspace qiita publish:all env: QIITA_TOKEN: ${{ secrets.QIITA_TOKEN }} - - run: yarn run format:fix + - run: yarn workspace qiita format:fix - uses: peter-evans/create-pull-request@v5 with: commit-message: Publish articles diff --git a/.github/workflows/qiita_test.yml b/.github/workflows/qiita_test.yml index 06f3f01..0bb0b3a 100644 --- a/.github/workflows/qiita_test.yml +++ b/.github/workflows/qiita_test.yml @@ -3,8 +3,8 @@ name: Qiita - Test on: push: paths: - - "qiita/**" - - ".github/workflows/qiita_test.yml" + - 'qiita/**' + - '.github/workflows/qiita_test.yml' permissions: contents: read @@ -27,7 +27,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - cache: "yarn" + cache: 'yarn' - run: yarn install - run: yarn workspace qiita textlint:codecov - uses: codecov/codecov-action@v3 @@ -42,6 +42,6 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - cache: "yarn" + cache: 'yarn' - run: yarn install - run: yarn workspace qiita prettier diff --git a/package.json b/package.json index 6340da2..e984ca8 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,8 @@ "version": "0.1.0", "main": "index.js", "scripts": { + "prettier": "prettier --check .", + "prettier:fix": "prettier --write .", "prepare": "husky install", "lint-staged": "lint-staged" }, @@ -23,7 +25,8 @@ ], "devDependencies": { "husky": "^8.0.3", - "lint-staged": "^13.2.3" + "lint-staged": "^13.2.3", + "prettier": "^3.0.0" }, "lint-staged": { "**/*": [ @@ -33,5 +36,8 @@ "yarn workspaces run textlint --config .textlintrc.json --fix", "yarn workspaces run textlint --config .textlintrc.json" ] + }, + "prettier": { + "singleQuote": true } } diff --git a/qiita/.prettierignore b/qiita/.prettierignore new file mode 100644 index 0000000..671be35 --- /dev/null +++ b/qiita/.prettierignore @@ -0,0 +1 @@ +public/.remote diff --git a/.textlintignore b/qiita/.textlintignore similarity index 100% rename from .textlintignore rename to qiita/.textlintignore diff --git a/.textlintrc.json b/qiita/.textlintrc.json similarity index 100% rename from .textlintrc.json rename to qiita/.textlintrc.json