Skip to content

feat: remove eslint-plugin-no-only-tests #1297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ module.exports = {
"@typescript-eslint",
"deprecation",
"jsdoc",
"no-only-tests",
"perfectionist",
"regexp",
"vitest",
Expand All @@ -159,7 +158,6 @@ module.exports = {
rules: {
// These off/less-strict-by-default rules work well for this repo and we like them on.
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }],
"no-only-tests/no-only-tests": "error",

// These on-by-default rules don't work well for this repo and we like them off.
"no-case-declarations": "off",
Expand Down
1 change: 0 additions & 1 deletion docs/Tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ pnpm run lint:knip
Additionally:

- [`console-fail-test`](https://github.com/JoshuaKGoldberg/console-fail-test) will also be added to ensure tests don't accidentally log to the console.
- [`eslint-plugin-no-only-tests`](https://github.com/levibuzolic/eslint-plugin-no-only-tests) will be added to the ESLint config to ensure calls to `it.only` or similar are not checked in
- [`eslint-plugin-vitest`](https://github.com/veritem/eslint-plugin-vitest) will be added to the ESLint config to lint for Vitest-specific issues

Running tests in watch mode:
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
"eslint-plugin-jsonc": "^2.10.0",
"eslint-plugin-markdown": "^3.0.1",
"eslint-plugin-n": "^16.3.1",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-package-json": "^0.10.0",
"eslint-plugin-perfectionist": "^2.5.0",
"eslint-plugin-regexp": "^2.1.2",
Expand Down
8 changes: 0 additions & 8 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions src/steps/finalizeDependencies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("finalize", () => {
expect(mockExecaCommand.mock.calls).toMatchInlineSnapshot(`
[
[
"pnpm add @release-it/conventional-changelog@latest @types/eslint@latest @typescript-eslint/eslint-plugin@latest @typescript-eslint/parser@latest @vitest/coverage-v8@latest all-contributors-cli@latest console-fail-test@latest cspell@latest eslint@latest eslint-plugin-deprecation@latest eslint-plugin-eslint-comments@latest eslint-plugin-jsdoc@latest eslint-plugin-jsonc@latest eslint-plugin-markdown@latest eslint-plugin-n@latest eslint-plugin-no-only-tests@latest eslint-plugin-package-json@latest eslint-plugin-perfectionist@latest eslint-plugin-regexp@latest eslint-plugin-vitest@latest eslint-plugin-yml@latest husky@latest jsonc-eslint-parser@latest knip@latest lint-staged@latest markdownlint@latest markdownlint-cli@latest prettier@latest prettier-plugin-curly@latest prettier-plugin-packagejson@latest release-it@latest sentences-per-line@latest tsup@latest typescript@latest vitest@latest yaml-eslint-parser@latest -D",
"pnpm add @release-it/conventional-changelog@latest @types/eslint@latest @typescript-eslint/eslint-plugin@latest @typescript-eslint/parser@latest @vitest/coverage-v8@latest all-contributors-cli@latest console-fail-test@latest cspell@latest eslint@latest eslint-plugin-deprecation@latest eslint-plugin-eslint-comments@latest eslint-plugin-jsdoc@latest eslint-plugin-jsonc@latest eslint-plugin-markdown@latest eslint-plugin-n@latest eslint-plugin-package-json@latest eslint-plugin-perfectionist@latest eslint-plugin-regexp@latest eslint-plugin-vitest@latest eslint-plugin-yml@latest husky@latest jsonc-eslint-parser@latest knip@latest lint-staged@latest markdownlint@latest markdownlint-cli@latest prettier@latest prettier-plugin-curly@latest prettier-plugin-packagejson@latest release-it@latest sentences-per-line@latest tsup@latest typescript@latest vitest@latest yaml-eslint-parser@latest -D",
],
[
"npx all-contributors-cli generate",
Expand All @@ -59,7 +59,7 @@ describe("finalize", () => {
expect(mockExecaCommand.mock.calls).toMatchInlineSnapshot(`
[
[
"pnpm add @release-it/conventional-changelog@latest @types/eslint@latest @typescript-eslint/eslint-plugin@latest @typescript-eslint/parser@latest @vitest/coverage-v8@latest all-contributors-cli@latest console-fail-test@latest cspell@latest eslint@latest eslint-plugin-deprecation@latest eslint-plugin-eslint-comments@latest eslint-plugin-jsdoc@latest eslint-plugin-jsonc@latest eslint-plugin-markdown@latest eslint-plugin-n@latest eslint-plugin-no-only-tests@latest eslint-plugin-package-json@latest eslint-plugin-perfectionist@latest eslint-plugin-regexp@latest eslint-plugin-vitest@latest eslint-plugin-yml@latest husky@latest jsonc-eslint-parser@latest knip@latest lint-staged@latest markdownlint@latest markdownlint-cli@latest prettier@latest prettier-plugin-curly@latest prettier-plugin-packagejson@latest release-it@latest sentences-per-line@latest tsup@latest typescript@latest vitest@latest yaml-eslint-parser@latest -D --offline",
"pnpm add @release-it/conventional-changelog@latest @types/eslint@latest @typescript-eslint/eslint-plugin@latest @typescript-eslint/parser@latest @vitest/coverage-v8@latest all-contributors-cli@latest console-fail-test@latest cspell@latest eslint@latest eslint-plugin-deprecation@latest eslint-plugin-eslint-comments@latest eslint-plugin-jsdoc@latest eslint-plugin-jsonc@latest eslint-plugin-markdown@latest eslint-plugin-n@latest eslint-plugin-package-json@latest eslint-plugin-perfectionist@latest eslint-plugin-regexp@latest eslint-plugin-vitest@latest eslint-plugin-yml@latest husky@latest jsonc-eslint-parser@latest knip@latest lint-staged@latest markdownlint@latest markdownlint-cli@latest prettier@latest prettier-plugin-curly@latest prettier-plugin-packagejson@latest release-it@latest sentences-per-line@latest tsup@latest typescript@latest vitest@latest yaml-eslint-parser@latest -D --offline",
],
[
"npx all-contributors-cli generate",
Expand Down
1 change: 0 additions & 1 deletion src/steps/finalizeDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export async function finalizeDependencies(options: Options) {
: [
"@vitest/coverage-v8",
"console-fail-test",
"eslint-plugin-no-only-tests",
"eslint-plugin-vitest",
"vitest",
]),
Expand Down
2 changes: 0 additions & 2 deletions src/steps/writing/creation/createESLintRC.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ describe("createESLintRC", () => {
"@typescript-eslint",
"deprecation",
"jsdoc",
"no-only-tests",
"perfectionist",
"regexp",
"vitest",
Expand All @@ -247,7 +246,6 @@ describe("createESLintRC", () => {
rules: {
// These off/less-strict-by-default rules work well for this repo and we like them on.
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }],
"no-only-tests/no-only-tests": "error",

// These on-by-default rules don't work well for this repo and we like them off.
"no-case-declarations": "off",
Expand Down
12 changes: 4 additions & 8 deletions src/steps/writing/creation/createESLintRC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,19 +200,15 @@ module.exports = {
? ""
: `"jsdoc",
`
}${options.excludeTests ? "" : `"no-only-tests",`}${
options.excludeLintPerfectionist ? "" : `"perfectionist",`
}${options.excludeLintRegex ? "" : `"regexp",`}${
options.excludeTests ? "" : `\n"vitest",`
}
}${options.excludeLintPerfectionist ? "" : `"perfectionist",`}${
options.excludeLintRegex ? "" : `"regexp",`
}${options.excludeTests ? "" : `\n"vitest",`}
],
reportUnusedDisableDirectives: true,
root: true,
rules: {
// These off/less-strict-by-default rules work well for this repo and we like them on.
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }],${
options.excludeTests ? "" : `\n"no-only-tests/no-only-tests": "error",`
}
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }],

// These on-by-default rules don't work well for this repo and we like them off.
"no-case-declarations": "off",
Expand Down