Skip to content
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

fix: remove eslint-plugin-deprecation temporarily #1470

Merged
merged 1 commit into from
Apr 15, 2024
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
10 changes: 1 addition & 9 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ module.exports = {
},
rules: {
// These off-by-default rules work well for this repo and we like them on.
"deprecation/deprecation": "error",
"jsdoc/informative-docs": "error",
"logical-assignment-operators": [
"error",
Expand Down Expand Up @@ -140,14 +139,7 @@ module.exports = {
},
],
parser: "@typescript-eslint/parser",
plugins: [
"@typescript-eslint",
"deprecation",
"jsdoc",
"perfectionist",
"regexp",
"vitest",
],
plugins: ["@typescript-eslint", "jsdoc", "perfectionist", "regexp", "vitest"],
reportUnusedDisableDirectives: true,
root: true,
rules: {
Expand Down
1 change: 0 additions & 1 deletion docs/Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ Alternately, you can bypass that prompt by providing any number of the following
- `--exclude-lint-knip`: Don't add Knip to detect unused files, dependencies, and code exports.
- `--exclude-lint-md`: Don't apply linting to `*.md` files.
- `--exclude-lint-package-json`: Don't add eslint-plugin-package-json to lint for package.json correctness.
- `--exclude-lint-deprecation`: Don't use eslint-plugin-deprecation to report on usage of code marked as `@deprecated`.
- `--exclude-lint-eslint`: Don't use eslint-plugin-eslint-comment to enforce good practices around ESLint comment directives.
- `--exclude-lint-jsdoc`: Don't use eslint-plugin-jsdoc to enforce good practices around JSDoc comments.
- `--exclude-lint-packages`: Don't add a pnpm dedupe workflow to ensure packages aren't duplicated unnecessarily.
Expand Down
6 changes: 0 additions & 6 deletions docs/Tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ This table summarizes each tooling piece and which base levels they're included
| [Compliance](#compliance) | `--exclude-compliance` | | | 💯 |
| [Contributors](#contributors) | `--exclude-contributors` | | ✅ | 💯 |
| [Formatting](#formatting) | | ✔️ | ✅ | 💯 |
| [Lint Deprecation](#lint-deprecation) | `--exclude-lint-deprecation` | | | 💯 |
| [Lint ESLint](#lint-eslint) | `--exclude-lint-eslint` | | | 💯 |
| [Lint JSDoc](#lint-jsdoc) | `--exclude-lint-jsdoc` | | | 💯 |
| [Lint JSON](#lint-json) | `--exclude-lint-json` | | | 💯 |
Expand Down Expand Up @@ -220,7 +219,6 @@ This level is for developers who are eager to get the maximum tooling benefits i
Using the _"everything"_ level will gain you comprehensive, strict coverage of all sorts of repository issues, including auto-sorting of properties and strict ESLint configs.

- [Compliance](#compliance)
- [Lint Deprecation](#lint-deprecation)
- [Lint ESLint](#lint-eslint)
- [Lint JSDoc](#lint-jsdoc)
- [Lint JSON](#lint-json)
Expand All @@ -238,10 +236,6 @@ Using the _"everything"_ level will gain you comprehensive, strict coverage of a

[**PR Compliance Action**](https://github.com/mtfoley/pr-compliance-action): Checks PRs for compliance such as addressing a linked issue and proper title formatting.

### Lint Deprecation

[`eslint-plugin-deprecation`](https://github.com/gund/eslint-plugin-deprecation): Reports on usage of code marked with `@deprecated`.

### Lint ESLint

[`eslint-plugin-eslint-comments`](https://github.com/mysticatea/eslint-plugin-eslint-comments): Enforces proper usage of [ESLint configuration comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments).
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"console-fail-test": "^0.2.3",
"cspell": "^8.1.3",
"eslint": "^8.55.0",
"eslint-plugin-deprecation": "^2.0.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-jsdoc": "^48.0.0",
"eslint-plugin-jsonc": "^2.10.0",
Expand Down
32 changes: 0 additions & 32 deletions pnpm-lock.yaml

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

5 changes: 0 additions & 5 deletions src/bin/help.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,6 @@ describe("logHelpText", () => {
--exclude-compliance: Don't add a GitHub Actions workflow to verify that PRs match
an expected format.",
],
[
"
--exclude-lint-deprecation: Don't use eslint-plugin-deprecation to report on usage
of code marked as @deprecated.",
],
[
"
--exclude-lint-jsdoc: Don't use eslint-plugin-jsdoc to enforce good practices around
Expand Down
6 changes: 0 additions & 6 deletions src/shared/options/args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ export const allArgOptions = {
docsSection: "opt-out",
type: "boolean",
},
"exclude-lint-deprecation": {
description: `Don't use eslint-plugin-deprecation to report on usage
of code marked as ${chalk.cyanBright("@deprecated")}.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-lint-jsdoc": {
description: `Don't use eslint-plugin-jsdoc to enforce good practices around
JSDoc comments.`,
Expand Down
4 changes: 0 additions & 4 deletions src/shared/options/augmentOptionsWithExcludes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const optionsBase = {
},
excludeAllContributors: undefined,
excludeCompliance: undefined,
excludeLintDeprecation: undefined,
excludeLintESLint: undefined,
excludeLintJSDoc: undefined,
excludeLintJson: undefined,
Expand Down Expand Up @@ -86,7 +85,6 @@ describe("augmentOptionsWithExcludes", () => {
base,
excludeAllContributors: true,
excludeCompliance: true,
excludeLintDeprecation: true,
excludeLintESLint: true,
excludeLintJSDoc: true,
excludeLintJson: true,
Expand Down Expand Up @@ -128,7 +126,6 @@ describe("augmentOptionsWithExcludes", () => {
expect(actual).toEqual({
...options,
excludeCompliance: true,
excludeLintDeprecation: true,
excludeLintESLint: true,
excludeLintJSDoc: true,
excludeLintJson: true,
Expand Down Expand Up @@ -156,7 +153,6 @@ describe("augmentOptionsWithExcludes", () => {
...options,
excludeAllContributors: true,
excludeCompliance: true,
excludeLintDeprecation: true,
excludeLintESLint: true,
excludeLintJSDoc: true,
excludeLintJson: true,
Expand Down
6 changes: 0 additions & 6 deletions src/shared/options/exclusionKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ export const exclusionDescriptions: Record<ExclusionKey, ExclusionDescription> =
"Add a GitHub Actions workflow to verify that PRs match an expected format.",
uncommon: true,
},
excludeLintDeprecation: {
hint: "--exclude-lint-deprecation",
label:
"Include an eslint-plugin-deprecation to reports on usage of code marked as @deprecated.",
uncommon: true,
},
excludeLintESLint: {
hint: "--exclude-lint-eslint",
label:
Expand Down
1 change: 0 additions & 1 deletion src/shared/options/optionsSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const optionsSchemaShape = {
.optional(),
excludeAllContributors: z.boolean().optional(),
excludeCompliance: z.boolean().optional(),
excludeLintDeprecation: z.boolean().optional(),
excludeLintESLint: z.boolean().optional(),
excludeLintJSDoc: z.boolean().optional(),
excludeLintJson: z.boolean().optional(),
Expand Down
2 changes: 0 additions & 2 deletions src/shared/options/readOptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const emptyOptions = {
email: undefined,
excludeAllContributors: undefined,
excludeCompliance: undefined,
excludeLintDeprecation: undefined,
excludeLintESLint: undefined,
excludeLintJSDoc: undefined,
excludeLintJson: undefined,
Expand Down Expand Up @@ -736,7 +735,6 @@ describe("readOptions", () => {
},
"excludeAllContributors": undefined,
"excludeCompliance": undefined,
"excludeLintDeprecation": undefined,
"excludeLintESLint": undefined,
"excludeLintJSDoc": undefined,
"excludeLintJson": undefined,
Expand Down
1 change: 0 additions & 1 deletion src/shared/options/readOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export async function readOptions(
: undefined,
excludeAllContributors: values["exclude-all-contributors"],
excludeCompliance: values["exclude-compliance"],
excludeLintDeprecation: values["exclude-lint-deprecation"],
excludeLintESLint: values["exclude-lint-eslint"],
excludeLintJSDoc: values["exclude-lint-jsdoc"],
excludeLintJson: values["exclude-lint-json"],
Expand Down
1 change: 0 additions & 1 deletion src/shared/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export interface Options {
email: OptionsEmail;
excludeAllContributors?: boolean;
excludeCompliance?: boolean;
excludeLintDeprecation?: boolean;
excludeLintESLint?: boolean;
excludeLintJSDoc?: boolean;
excludeLintJson?: boolean;
Expand Down
6 changes: 3 additions & 3 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-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-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-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-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 Expand Up @@ -92,7 +92,7 @@ describe("finalize", () => {
expect(mockExecaCommand.mock.calls).toMatchInlineSnapshot(`
[
[
"pnpm add @types/eslint@latest @typescript-eslint/eslint-plugin@latest @typescript-eslint/parser@latest eslint@latest eslint-plugin-deprecation@latest eslint-plugin-eslint-comments@latest eslint-plugin-jsdoc@latest eslint-plugin-n@latest eslint-plugin-regexp@latest husky@latest lint-staged@latest prettier@latest prettier-plugin-curly@latest prettier-plugin-packagejson@latest tsup@latest typescript@latest -D",
"pnpm add @types/eslint@latest @typescript-eslint/eslint-plugin@latest @typescript-eslint/parser@latest eslint@latest eslint-plugin-eslint-comments@latest eslint-plugin-jsdoc@latest eslint-plugin-n@latest eslint-plugin-regexp@latest husky@latest lint-staged@latest prettier@latest prettier-plugin-curly@latest prettier-plugin-packagejson@latest tsup@latest typescript@latest -D",
],
[
"pnpm dedupe",
Expand Down
1 change: 0 additions & 1 deletion src/steps/finalizeDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export async function finalizeDependencies(options: Options) {
"@typescript-eslint/eslint-plugin",
"@typescript-eslint/parser",
"eslint",
"eslint-plugin-deprecation",
"eslint-plugin-eslint-comments",
"eslint-plugin-jsdoc",
"eslint-plugin-n",
Expand Down
12 changes: 1 addition & 11 deletions src/steps/writing/creation/createESLintRC.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ function fakeOptions(getExcludeValue: (exclusionName: string) => boolean) {
[
"excludeCompliance",
"excludeAllContributors",
"excludeLintDeprecation",
"excludeLintESLint",
"excludeLintJSDoc",
"excludeLintJson",
Expand Down Expand Up @@ -72,7 +71,6 @@ describe("createESLintRC", () => {
},
rules: {
// These off-by-default rules work well for this repo and we like them on.
"deprecation/deprecation": "error",
"logical-assignment-operators": [
"error",
"always",
Expand Down Expand Up @@ -146,7 +144,6 @@ describe("createESLintRC", () => {
},
rules: {
// These off-by-default rules work well for this repo and we like them on.
"deprecation/deprecation": "error",
"jsdoc/informative-docs": "error",
"logical-assignment-operators": [
"error",
Expand Down Expand Up @@ -222,14 +219,7 @@ describe("createESLintRC", () => {
},
],
parser: "@typescript-eslint/parser",
plugins: [
"@typescript-eslint",
"deprecation",
"jsdoc",
"perfectionist",
"regexp",
"vitest",
],
plugins: ["@typescript-eslint", "jsdoc", "perfectionist", "regexp", "vitest"],
reportUnusedDisableDirectives: true,
root: true,
rules: {
Expand Down
6 changes: 0 additions & 6 deletions src/steps/writing/creation/createESLintRC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ module.exports = {
},
rules: {
// These off-by-default rules work well for this repo and we like them on.
"deprecation/deprecation": "error",
${
options.excludeLintJSDoc
? ""
Expand Down Expand Up @@ -169,11 +168,6 @@ module.exports = {
plugins: [
"@typescript-eslint",
${
options.excludeLintDeprecation
? ""
: `"deprecation",
`
}${
options.excludeLintJSDoc
? ""
: `"jsdoc",
Expand Down
1 change: 0 additions & 1 deletion src/steps/writing/creation/dotVSCode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ function fakeOptions(
[
"excludeCompliance",
"excludeAllContributors",
"excludeLintDeprecation",
"excludeLintESLint",
"excludeLintJSDoc",
"excludeLintJson",
Expand Down
Loading