From df4e05e96a44e03ee4015f56a4f85846d2610087 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 7 Aug 2022 10:01:39 -0400 Subject: [PATCH] chore: simplify prettier include lists (#5380) * chore: simplify prettier include lists * Whoops, revert check-spelling change Co-authored-by: Brad Zacher --- .../ISSUE_TEMPLATE/01-bug-report-plugin.yaml | 8 ++-- .../02-enhancement-rule-option.yaml | 10 ++-- .../03-enhancement-new-rule.yaml | 10 ++-- ...4-enhancement-new-base-rule-extension.yaml | 10 ++-- .../05-documentation-request.yml | 6 +-- .../ISSUE_TEMPLATE/06-bug-report-other.yaml | 6 +-- .../ISSUE_TEMPLATE/07-enhancement-other.yaml | 6 +-- .../ISSUE_TEMPLATE/08-bug-report-complex.yaml | 4 +- .github/ISSUE_TEMPLATE/09-config-change.yaml | 10 ++-- .../ISSUE_TEMPLATE/10-repo-maintenance.yaml | 6 +-- .github/actions/prepare-build/action.yml | 8 ++-- .github/actions/prepare-install/action.yml | 10 ++-- .github/pull_request_template.md | 6 +-- .github/workflows/ci.yml | 47 +++++++------------ .github/workflows/lock.yml | 16 +++---- .prettierignore | 2 - package.json | 4 +- 17 files changed, 77 insertions(+), 92 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/01-bug-report-plugin.yaml b/.github/ISSUE_TEMPLATE/01-bug-report-plugin.yaml index 47cf18170d2..af01af154c2 100644 --- a/.github/ISSUE_TEMPLATE/01-bug-report-plugin.yaml +++ b/.github/ISSUE_TEMPLATE/01-bug-report-plugin.yaml @@ -1,9 +1,9 @@ -name: "🐛 Report a Bug With a Rule" -description: "Report a bug you encountered with a lint rule" -title: "Bug: [rule name here] " +name: '🐛 Report a Bug With a Rule' +description: 'Report a bug you encountered with a lint rule' +title: 'Bug: [rule name here] ' labels: - bug - - "package: eslint-plugin" + - 'package: eslint-plugin' - triage body: - type: checkboxes diff --git a/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml b/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml index b04b5f2d127..8b857b50548 100644 --- a/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml +++ b/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml @@ -1,9 +1,9 @@ -name: "✨ Propose a New Rule Option or Additional Checks" -description: "Propose a new lint rule option or propose that a lint rule checks more cases" -title: "Enhancement: [rule-name] " +name: '✨ Propose a New Rule Option or Additional Checks' +description: 'Propose a new lint rule option or propose that a lint rule checks more cases' +title: 'Enhancement: [rule-name] ' labels: - - "enhancement: plugin rule option" - - "package: eslint-plugin" + - 'enhancement: plugin rule option' + - 'package: eslint-plugin' - triage body: - type: checkboxes diff --git a/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml b/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml index b7481356d70..2e01a8d2c58 100644 --- a/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml +++ b/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml @@ -1,9 +1,9 @@ -name: "✨ Propose a New Rule" -description: "Propose a new lint rule" -title: "Rule proposal: " +name: '✨ Propose a New Rule' +description: 'Propose a new lint rule' +title: 'Rule proposal: ' labels: - - "enhancement: new plugin rule" - - "package: eslint-plugin" + - 'enhancement: new plugin rule' + - 'package: eslint-plugin' - triage body: - type: checkboxes diff --git a/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml b/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml index ee30ab1f42f..1c02ebe658a 100644 --- a/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml +++ b/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml @@ -1,9 +1,9 @@ -name: "✨ Propose a New Base Rule Extension" -description: "Propose a new base lint rule extension" -title: "Base rule extension: [rule-name] " +name: '✨ Propose a New Base Rule Extension' +description: 'Propose a new base lint rule extension' +title: 'Base rule extension: [rule-name] ' labels: - - "enhancement: new base rule extension" - - "package: eslint-plugin" + - 'enhancement: new base rule extension' + - 'package: eslint-plugin' - triage body: - type: markdown diff --git a/.github/ISSUE_TEMPLATE/05-documentation-request.yml b/.github/ISSUE_TEMPLATE/05-documentation-request.yml index 08a98658047..f21358bf8ed 100644 --- a/.github/ISSUE_TEMPLATE/05-documentation-request.yml +++ b/.github/ISSUE_TEMPLATE/05-documentation-request.yml @@ -1,6 +1,6 @@ -name: "📝 Documentation Request" -description: "Request a change in documentation" -title: "Docs: " +name: '📝 Documentation Request' +description: 'Request a change in documentation' +title: 'Docs: ' labels: - documentation - triage diff --git a/.github/ISSUE_TEMPLATE/06-bug-report-other.yaml b/.github/ISSUE_TEMPLATE/06-bug-report-other.yaml index 015e3a05ba7..6340c525b37 100644 --- a/.github/ISSUE_TEMPLATE/06-bug-report-other.yaml +++ b/.github/ISSUE_TEMPLATE/06-bug-report-other.yaml @@ -1,6 +1,6 @@ -name: "🐛 Report a Bug With Another Package" -description: "Report a bug you encountered with another one of our packages (parser, util, scope-manager, etc)" -title: "Bug: " +name: '🐛 Report a Bug With Another Package' +description: 'Report a bug you encountered with another one of our packages (parser, util, scope-manager, etc)' +title: 'Bug: ' labels: - bug - triage diff --git a/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml b/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml index d68dea5a65e..686ee970a67 100644 --- a/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml +++ b/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml @@ -1,6 +1,6 @@ -name: "✨ Propose an Enhancement With Another Package" -description: "Report an enhancement to another one of our packages (parser, util, scope-manager, etc)" -title: "Enhancement: " +name: '✨ Propose an Enhancement With Another Package' +description: 'Report an enhancement to another one of our packages (parser, util, scope-manager, etc)' +title: 'Enhancement: ' labels: - enhancement - triage diff --git a/.github/ISSUE_TEMPLATE/08-bug-report-complex.yaml b/.github/ISSUE_TEMPLATE/08-bug-report-complex.yaml index 81fa9be184a..1292c539f27 100644 --- a/.github/ISSUE_TEMPLATE/08-bug-report-complex.yaml +++ b/.github/ISSUE_TEMPLATE/08-bug-report-complex.yaml @@ -1,6 +1,6 @@ -name: "🐛 Report a Complex Bug With a Reproduction Repository" +name: '🐛 Report a Complex Bug With a Reproduction Repository' description: Report a complex bug you encountered by providing an isolated reproduction repository -title: "Bug: " +title: 'Bug: ' labels: - bug - triage diff --git a/.github/ISSUE_TEMPLATE/09-config-change.yaml b/.github/ISSUE_TEMPLATE/09-config-change.yaml index b743f8ee4a5..6f31c3f96b0 100644 --- a/.github/ISSUE_TEMPLATE/09-config-change.yaml +++ b/.github/ISSUE_TEMPLATE/09-config-change.yaml @@ -1,9 +1,9 @@ -name: "♻ Propose a Change to Preset Configurations" -description: "Propose an addition, removal, or general change to a preset config" -title: "Configs: " +name: '♻ Propose a Change to Preset Configurations' +description: 'Propose an addition, removal, or general change to a preset config' +title: 'Configs: ' labels: - - "package: eslint-plugin" - - "preset config change" + - 'package: eslint-plugin' + - 'preset config change' - triage body: - type: checkboxes diff --git a/.github/ISSUE_TEMPLATE/10-repo-maintenance.yaml b/.github/ISSUE_TEMPLATE/10-repo-maintenance.yaml index 1f35a7cd59b..55787d4d407 100644 --- a/.github/ISSUE_TEMPLATE/10-repo-maintenance.yaml +++ b/.github/ISSUE_TEMPLATE/10-repo-maintenance.yaml @@ -1,8 +1,8 @@ -name: "🏗 Suggest an Improvement with Repository Maintenance" +name: '🏗 Suggest an Improvement with Repository Maintenance' description: Report a bug or request a feature related to developing the typescript-eslint monorepo -title: "Repo: " +title: 'Repo: ' labels: - - "repo maintenance" + - 'repo maintenance' - triage body: - type: markdown diff --git a/.github/actions/prepare-build/action.yml b/.github/actions/prepare-build/action.yml index a83f403c0ff..ce69eddedc5 100644 --- a/.github/actions/prepare-build/action.yml +++ b/.github/actions/prepare-build/action.yml @@ -1,15 +1,15 @@ -name: "Prepare: Build" -description: "Prepares the repo for a job by running the build" +name: 'Prepare: Build' +description: 'Prepares the repo for a job by running the build' # inputs: - no inputs # outputs: - no outputs runs: - using: "composite" + using: 'composite' steps: - uses: actions/cache@v3 id: build-cache with: - path: "**/dist/**" + path: '**/dist/**' key: ${{ runner.os }}-build-${{ github.ref }} restore-keys: | ${{ runner.os }}-build- diff --git a/.github/actions/prepare-install/action.yml b/.github/actions/prepare-install/action.yml index 4d28fccf7b2..bcb843c9a61 100644 --- a/.github/actions/prepare-install/action.yml +++ b/.github/actions/prepare-install/action.yml @@ -1,17 +1,17 @@ -name: "Prepare: Checkout and Install" -description: "Prepares the repo for a job by checking out and installing dependencies" +name: 'Prepare: Checkout and Install' +description: 'Prepares the repo for a job by checking out and installing dependencies' inputs: node-version: - description: "The node version to setup" + description: 'The node version to setup' required: true registry-url: - description: "Define registry-url" + description: 'Define registry-url' required: false # outputs: - no outputs runs: - using: "composite" + using: 'composite' steps: - name: echo github.ref shell: bash diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 1c84b2de3d0..3e72e13f7a9 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,9 +6,9 @@ Otherwise we may not be able to review your PR. ## PR Checklist -- [ ] Addresses an existing open issue: fixes #000 -- [ ] That issue was marked as [accepting prs](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aopen+is%3Aissue+label%3A%22accepting+prs%22) -- [ ] Steps in [CONTRIBUTING.md](https://github.com/typescript-eslint/typescript-eslint/blob/main/CONTRIBUTING.md) were taken +- [ ] Addresses an existing open issue: fixes #000 +- [ ] That issue was marked as [accepting prs](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aopen+is%3Aissue+label%3A%22accepting+prs%22) +- [ ] Steps in [CONTRIBUTING.md](https://github.com/typescript-eslint/typescript-eslint/blob/main/CONTRIBUTING.md) were taken ## Overview diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6363babb0df..924efa87564 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,11 +55,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - lint-task: [ - "check-spelling", - "check-format", - "lint-markdown", - ] + lint-task: ['check-spelling', 'check-format', 'lint-markdown'] steps: - name: Checkout uses: actions/checkout@v3 @@ -78,10 +74,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - lint-task: [ - "lint", - "typecheck", - ] + lint-task: ['lint', 'typecheck'] steps: - name: Checkout uses: actions/checkout@v3 @@ -122,18 +115,19 @@ jobs: matrix: # just run on the oldest and latest supported versions and assume the intermediate versions are good node-version: [12, 18] - package: [ - "ast-spec", - "eslint-plugin", - "eslint-plugin-internal", - "eslint-plugin-tslint", - "parser", - "scope-manager", - "type-utils", - "typescript-estree", - "utils", - "visitor-keys", - ] + package: + [ + 'ast-spec', + 'eslint-plugin', + 'eslint-plugin-internal', + 'eslint-plugin-tslint', + 'parser', + 'scope-manager', + 'type-utils', + 'typescript-estree', + 'utils', + 'visitor-keys', + ] env: # Added the - at the end to function as a separator to improve readability in the PR comment from the Nx cloud app NX_CLOUD_ENV_NAME: 'Node ${{ matrix.node-version }} -' @@ -228,17 +222,10 @@ jobs: flags: unittest name: codecov - publish_canary_version: name: Publish the latest code as a canary version runs-on: ubuntu-latest - needs: - [ - integration_tests, - lint_with_build, - lint_without_build, - unit_tests, - ] + needs: [integration_tests, lint_with_build, lint_without_build, unit_tests] if: github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main' steps: - name: Checkout @@ -247,7 +234,7 @@ jobs: uses: ./.github/actions/prepare-install with: node-version: ${{ env.PRIMARY_NODE_VERSION }} - registry-url: "https://registry.npmjs.org" + registry-url: 'https://registry.npmjs.org' - name: Build uses: ./.github/actions/prepare-build diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 84152062b22..4b73d71b7a0 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -1,8 +1,8 @@ -name: "Lock threads" +name: 'Lock threads' on: schedule: - - cron: "0 0 * * *" + - cron: '0 0 * * *' jobs: lock: @@ -11,9 +11,9 @@ jobs: - uses: dessant/lock-threads@v3 with: github-token: ${{ github.token }} - issue-inactive-days: "30" - issue-lock-reason: "resolved" - issue-comment: "" - pr-inactive-days: "30" - pr-lock-reason: "resolved" - pr-comment: "" + issue-inactive-days: '30' + issue-lock-reason: 'resolved' + issue-comment: '' + pr-inactive-days: '30' + pr-lock-reason: 'resolved' + pr-comment: '' diff --git a/.prettierignore b/.prettierignore index 97e17b8a77e..abc364840aa 100644 --- a/.prettierignore +++ b/.prettierignore @@ -8,9 +8,7 @@ **/.nyc_output **/.vs packages/eslint-plugin-tslint/tests/test-tslint-rules-directory/alwaysFailRule.js -.github packages/eslint-plugin/src/configs/*.json -.all-contributorsrc CONTRIBUTORS.md packages/ast-spec/src/*/*/fixtures/_error_/*/fixture.ts diff --git a/package.json b/package.json index f3c155fadc0..9b562d32284 100644 --- a/package.json +++ b/package.json @@ -26,10 +26,10 @@ "check-clean-workspace-after-install": "git diff --quiet --exit-code", "check-configs": "nx run-many --target=check-configs --all --parallel", "check-docs": "nx run-many --target=check-docs --all --parallel", - "check-format": "prettier --list-different \"./**/*.{md,mdx,ts,mts,cts,js,cjs,mjs,tsx,jsx}\"", + "check-format": "prettier --list-different .", "check-spelling": "cspell --config=.cspell.json \"**/*.{md,mdx,ts,mts,cts,js,cjs,mjs,tsx,jsx}\"", "clean": "lerna clean && lerna run clean", - "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\"", + "format": "prettier --write .", "generate-contributors": "yarn ts-node --transpile-only ./tools/generate-contributors.ts", "generate-sponsors": "yarn ts-node --transpile-only ./tools/generate-sponsors.ts", "generate-website-dts": "yarn ts-node --transpile-only ./tools/generate-website-dts.ts",