feat: remove @types/eslint package#70735
feat: remove @types/eslint package#70735typescript-bot merged 3 commits intoDefinitelyTyped:masterfrom
Conversation
|
@snitin315 Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through. This is a live comment that I will keep updated. 1 package in this PR
Code ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. You can test the changes of this PR in the Playground. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 70735,
"author": "snitin315",
"headCommitOid": "25a0a797d2bf24498119dd6e281d33b391c71add",
"mergeBaseOid": "29a5cdc0807e42681cf7cf300bd49ab865a77d9b",
"lastPushDate": "2024-09-29T11:32:18.000Z",
"lastActivityDate": "2024-10-16T16:12:03.000Z",
"mergeOfferDate": "2024-10-16T13:44:12.000Z",
"mergeRequestDate": "2024-10-16T16:12:03.000Z",
"mergeRequestUser": "snitin315",
"hasMergeConflict": false,
"isFirstContribution": true,
"tooManyFiles": false,
"hugeChange": true,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "eslint",
"kind": "delete",
"files": [
{
"path": "types/eslint/.eslintrc.json",
"kind": "package-meta",
"suspect": "edited"
},
{
"path": "types/eslint/.npmignore",
"kind": "package-meta-ok"
},
{
"path": "types/eslint/eslint-tests.ts",
"kind": "test"
},
{
"path": "types/eslint/index.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/package.json",
"kind": "package-meta-ok"
},
{
"path": "types/eslint/rules/best-practices.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/rules/deprecated.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/rules/ecmascript-6.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/rules/index.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/rules/node-commonjs.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/rules/possible-errors.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/rules/strict-mode.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/rules/stylistic-issues.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/rules/variables.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/tsconfig.json",
"kind": "package-meta-ok"
},
{
"path": "types/eslint/use-at-your-own-risk.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/v8/.eslintrc.json",
"kind": "package-meta",
"suspect": "edited"
},
{
"path": "types/eslint/v8/.npmignore",
"kind": "package-meta-ok"
},
{
"path": "types/eslint/v8/eslint-tests.ts",
"kind": "test"
},
{
"path": "types/eslint/v8/helpers.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/v8/index.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/v8/package.json",
"kind": "package-meta-ok"
},
{
"path": "types/eslint/v8/rules/best-practices.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/v8/rules/deprecated.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/v8/rules/ecmascript-6.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/v8/rules/index.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/v8/rules/node-commonjs.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/v8/rules/possible-errors.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/v8/rules/strict-mode.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/v8/rules/stylistic-issues.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/v8/rules/variables.d.ts",
"kind": "definition"
},
{
"path": "types/eslint/v8/tsconfig.json",
"kind": "package-meta-ok"
},
{
"path": "types/eslint/v8/use-at-your-own-risk.d.ts",
"kind": "definition"
}
],
"owners": [
"pmdartus",
"j-f1",
"saadq",
"JasonHK",
"bradzacher",
"JounQin",
"bmish"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "sandersn",
"date": "2024-10-16T13:43:28.000Z",
"isMaintainer": true
},
{
"type": "stale",
"reviewer": "bradzacher",
"date": "2024-10-10T13:57:39.000Z",
"abbrOid": "d4dc8eb"
},
{
"type": "stale",
"reviewer": "JoshuaKGoldberg",
"date": "2024-09-29T13:04:38.000Z",
"abbrOid": "d4dc8eb"
}
],
"mainBotCommentID": 2381321344,
"ciResult": "pass"
} |
|
🔔 @pmdartus @j-f1 @saadq @JasonHK @bradzacher @JounQin @bmish — please review this PR in the next few days. Be sure to explicitly select |
|
@JoshuaKGoldberg Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review? |
|
To skip the stub publish, revert the addition to notNeededPackage.json. |
|
@sandersn Done. |
|
@bradzacher, @JoshuaKGoldberg Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review? |
|
Nice, thanks for this @snitin315 and others involved! What happens with the existing It is currently still published at version Or maybe there are plans already which I missed to manually deprecate this from npm...? |
|
@karlhorky I believe usually after some time the DT bot deprecates the package and adds the warning |
|
That's right. My explanation is at #70735 (comment) |
|
@sandersn oh, yeah I saw that comment. Does that mean that the obsolete If yes, seems like this will lead to confusion for new projects and existing projects, and unnecessary dependencies being installed...? |
|
@karlhorky @sandersn Yeah I agree, I think instead of not publishing a stub and not publishing a deprecation notice, we should only skip the stub, but keep the notice. This shouldn't break anything, unless for some reason they have a fail on deprecation notice option enabled. Maybe even a custom deprecation notice, linking to an explaination page, seeing how big this dependency is? We definitely shouldn't stub the types though, that would break a lot of projects. |
|
@karlhorky @pauliesnug I like the idea of a custom deprecate notice, but there's no place to put it unless we publish another version of |
What about |
|
What I mean is, |
|
Ok, I think I'm understanding what you mean. To be clear, what I think could be a common user flow:
If |
|
The bad thing that happens at (5) is not a crash, it's an extra 253 KB in node_module that the compiler ignores, plus an unnecessary entry in package.json. It is bad that the JS ecosystem continues to accrue cruft. Also, deprecating stub packages got even less useful recently with npm/npm-pick-manifest#33; npm now never resolves to a deprecated package when any un-deprecated one exists. So However, I don't think most people will |
|
How about releasing a stub |
|
#70735 (comment). Briefly, types packages depend on each other with |
|
The flip side is that without the stub, all packages on DT will only ever test the DT package, because they'll never know to download |
|
I recently merged in support for peer deps; given eslint packages are extensions of eslint and therefore would be peer deps, perhaps we should fix all of those to be peer deps on (But, doing so will forcibly install |
eslint@9 comes with its own types. @types/eslint is unmaintained, no longer compatible with current eslint, and causes spurious type errors when installed. DefinitelyTyped/DefinitelyTyped#70735 Signed-off-by: Anders Kaseorg <[email protected]>
eslint@9 comes with its own types. @types/eslint is unmaintained, no longer compatible with current eslint, and causes spurious type errors when installed. - DefinitelyTyped/DefinitelyTyped#70735 --- Minimal reproduction: **`eslint.config.mjs`** ```js // @ts-check import { FlatCompat } from "@eslint/eslintrc"; import { defineConfig } from "eslint/config"; const compat = new FlatCompat({ baseDirectory: "." }); export default defineConfig(compat.config({})); ``` ```console $ pnpm i @eslint/eslintrc eslint eslint-plugin-formatjs typescript $ pnpm exec tsc --allowJs --module nodenext --noEmit eslint.config.mjs eslint.config.mjs:5:29 - error TS2345: Argument of type 'Config<RulesRecord>[]' is not assignable to parameter of type 'InfiniteArray<ConfigWithExtends>'. Type 'Config<RulesRecord>[]' is not assignable to type 'InfiniteArray<ConfigWithExtends>[]'. Type 'Config<RulesRecord>' is not assignable to type 'InfiniteArray<ConfigWithExtends>'. Type 'Config<RulesRecord>' is not assignable to type 'ConfigWithExtends'. Types of property 'languageOptions' are incompatible. Type 'import("/tmp/u/node_modules/.pnpm/@types[email protected]/node_modules/@types/eslint/index").Linter.LanguageOptions' is not assignable to type 'import("/tmp/u/node_modules/.pnpm/@eslint[email protected]/node_modules/@eslint/core/dist/cjs/types").LanguageOptions'. Index signature for type 'string' is missing in type 'LanguageOptions'. 5 export default defineConfig(compat.config({})); ~~~~~~~~~~~~~~~~~ Found 1 error in eslint.config.mjs:5 ``` Signed-off-by: Anders Kaseorg <[email protected]>

Reference eslint/eslint#18928
Please fill in this template.
pnpm test <package to test>.Select one of these and delete the others:
If removing a declaration:
notNeededPackages.json.