diff --git a/.eslintrc.cjs b/.eslintrc.cjs index a62936ccf..2fc7c76fa 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -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", @@ -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: { diff --git a/docs/Options.md b/docs/Options.md index 9749581f3..d622decb7 100644 --- a/docs/Options.md +++ b/docs/Options.md @@ -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. diff --git a/docs/Tooling.md b/docs/Tooling.md index a2c80a1dd..7aa4d2b3d 100644 --- a/docs/Tooling.md +++ b/docs/Tooling.md @@ -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` | | | 💯 | @@ -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) @@ -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). diff --git a/package.json b/package.json index a20184b89..6a02da39f 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2339fa6ae..192f3838f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -100,9 +100,6 @@ devDependencies: eslint: specifier: ^8.55.0 version: 8.57.0 - eslint-plugin-deprecation: - specifier: ^2.0.0 - version: 2.0.0(eslint@8.57.0)(typescript@5.4.3) eslint-plugin-eslint-comments: specifier: ^3.2.0 version: 3.2.0(eslint@8.57.0) @@ -3447,21 +3444,6 @@ packages: semver: 7.6.0 dev: true - /eslint-plugin-deprecation@2.0.0(eslint@8.57.0)(typescript@5.4.3): - resolution: {integrity: sha512-OAm9Ohzbj11/ZFyICyR5N6LbOIvQMp7ZU2zI7Ej0jIc8kiGUERXPNMfw2QqqHD1ZHtjMub3yPZILovYEYucgoQ==} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - typescript: ^4.2.4 || ^5.0.0 - dependencies: - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.3) - eslint: 8.57.0 - tslib: 2.6.2 - tsutils: 3.21.0(typescript@5.4.3) - typescript: 5.4.3 - transitivePeerDependencies: - - supports-color - dev: true - /eslint-plugin-es-x@7.5.0(eslint@8.57.0): resolution: {integrity: sha512-ODswlDSO0HJDzXU0XvgZ3lF3lS3XAZEossh15Q2UHjwrJggWeBoKqqEsLTZLXl+dh5eOAozG0zRcYtuE35oTuQ==} engines: {node: ^14.18.0 || >=16.0.0} @@ -7254,10 +7236,6 @@ packages: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: true - /tslib@1.14.1: - resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - dev: true - /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} dev: true @@ -7301,16 +7279,6 @@ packages: - ts-node dev: true - /tsutils@3.21.0(typescript@5.4.3): - resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} - engines: {node: '>= 6'} - peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' - dependencies: - tslib: 1.14.1 - typescript: 5.4.3 - dev: true - /tsx@4.7.1: resolution: {integrity: sha512-8d6VuibXHtlN5E3zFkgY8u4DX7Y3Z27zvvPKVmLon/D4AjuKzarkUBTLDBgj9iTQ0hg5xM7c/mYiRVM+HETf0g==} engines: {node: '>=18.0.0'} diff --git a/src/bin/help.test.ts b/src/bin/help.test.ts index 507cfa0c9..851a6b162 100644 --- a/src/bin/help.test.ts +++ b/src/bin/help.test.ts @@ -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 diff --git a/src/shared/options/args.ts b/src/shared/options/args.ts index 70c597871..d160720ec 100644 --- a/src/shared/options/args.ts +++ b/src/shared/options/args.ts @@ -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.`, diff --git a/src/shared/options/augmentOptionsWithExcludes.test.ts b/src/shared/options/augmentOptionsWithExcludes.test.ts index 1b6a10746..c34dfddfb 100644 --- a/src/shared/options/augmentOptionsWithExcludes.test.ts +++ b/src/shared/options/augmentOptionsWithExcludes.test.ts @@ -28,7 +28,6 @@ const optionsBase = { }, excludeAllContributors: undefined, excludeCompliance: undefined, - excludeLintDeprecation: undefined, excludeLintESLint: undefined, excludeLintJSDoc: undefined, excludeLintJson: undefined, @@ -86,7 +85,6 @@ describe("augmentOptionsWithExcludes", () => { base, excludeAllContributors: true, excludeCompliance: true, - excludeLintDeprecation: true, excludeLintESLint: true, excludeLintJSDoc: true, excludeLintJson: true, @@ -128,7 +126,6 @@ describe("augmentOptionsWithExcludes", () => { expect(actual).toEqual({ ...options, excludeCompliance: true, - excludeLintDeprecation: true, excludeLintESLint: true, excludeLintJSDoc: true, excludeLintJson: true, @@ -156,7 +153,6 @@ describe("augmentOptionsWithExcludes", () => { ...options, excludeAllContributors: true, excludeCompliance: true, - excludeLintDeprecation: true, excludeLintESLint: true, excludeLintJSDoc: true, excludeLintJson: true, diff --git a/src/shared/options/exclusionKeys.ts b/src/shared/options/exclusionKeys.ts index 2789e806d..afec3b191 100644 --- a/src/shared/options/exclusionKeys.ts +++ b/src/shared/options/exclusionKeys.ts @@ -21,12 +21,6 @@ export const exclusionDescriptions: Record = "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: diff --git a/src/shared/options/optionsSchema.ts b/src/shared/options/optionsSchema.ts index 04f965dc4..d144861f9 100644 --- a/src/shared/options/optionsSchema.ts +++ b/src/shared/options/optionsSchema.ts @@ -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(), diff --git a/src/shared/options/readOptions.test.ts b/src/shared/options/readOptions.test.ts index 7849dffd8..c50b9a030 100644 --- a/src/shared/options/readOptions.test.ts +++ b/src/shared/options/readOptions.test.ts @@ -17,7 +17,6 @@ const emptyOptions = { email: undefined, excludeAllContributors: undefined, excludeCompliance: undefined, - excludeLintDeprecation: undefined, excludeLintESLint: undefined, excludeLintJSDoc: undefined, excludeLintJson: undefined, @@ -736,7 +735,6 @@ describe("readOptions", () => { }, "excludeAllContributors": undefined, "excludeCompliance": undefined, - "excludeLintDeprecation": undefined, "excludeLintESLint": undefined, "excludeLintJSDoc": undefined, "excludeLintJson": undefined, diff --git a/src/shared/options/readOptions.ts b/src/shared/options/readOptions.ts index f813cab68..a41633238 100644 --- a/src/shared/options/readOptions.ts +++ b/src/shared/options/readOptions.ts @@ -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"], diff --git a/src/shared/types.ts b/src/shared/types.ts index 01556d124..795004424 100644 --- a/src/shared/types.ts +++ b/src/shared/types.ts @@ -55,7 +55,6 @@ export interface Options { email: OptionsEmail; excludeAllContributors?: boolean; excludeCompliance?: boolean; - excludeLintDeprecation?: boolean; excludeLintESLint?: boolean; excludeLintJSDoc?: boolean; excludeLintJson?: boolean; diff --git a/src/steps/finalizeDependencies.test.ts b/src/steps/finalizeDependencies.test.ts index 5d61bbb24..1692f1598 100644 --- a/src/steps/finalizeDependencies.test.ts +++ b/src/steps/finalizeDependencies.test.ts @@ -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", @@ -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", @@ -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", diff --git a/src/steps/finalizeDependencies.ts b/src/steps/finalizeDependencies.ts index 1f1662e08..f70cc4e2b 100644 --- a/src/steps/finalizeDependencies.ts +++ b/src/steps/finalizeDependencies.ts @@ -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", diff --git a/src/steps/writing/creation/createESLintRC.test.ts b/src/steps/writing/creation/createESLintRC.test.ts index 3fff69798..82454a2e9 100644 --- a/src/steps/writing/creation/createESLintRC.test.ts +++ b/src/steps/writing/creation/createESLintRC.test.ts @@ -18,7 +18,6 @@ function fakeOptions(getExcludeValue: (exclusionName: string) => boolean) { [ "excludeCompliance", "excludeAllContributors", - "excludeLintDeprecation", "excludeLintESLint", "excludeLintJSDoc", "excludeLintJson", @@ -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", @@ -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", @@ -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: { diff --git a/src/steps/writing/creation/createESLintRC.ts b/src/steps/writing/creation/createESLintRC.ts index c96379fc7..26633aafb 100644 --- a/src/steps/writing/creation/createESLintRC.ts +++ b/src/steps/writing/creation/createESLintRC.ts @@ -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 ? "" @@ -169,11 +168,6 @@ module.exports = { plugins: [ "@typescript-eslint", ${ - options.excludeLintDeprecation - ? "" - : `"deprecation", - ` - }${ options.excludeLintJSDoc ? "" : `"jsdoc", diff --git a/src/steps/writing/creation/dotVSCode.test.ts b/src/steps/writing/creation/dotVSCode.test.ts index d06f40a1b..76256619f 100644 --- a/src/steps/writing/creation/dotVSCode.test.ts +++ b/src/steps/writing/creation/dotVSCode.test.ts @@ -23,7 +23,6 @@ function fakeOptions( [ "excludeCompliance", "excludeAllContributors", - "excludeLintDeprecation", "excludeLintESLint", "excludeLintJSDoc", "excludeLintJson",