feat: add types for the @eslint/js package#19010
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
|
I'm not sure how to fix the trunk check. Looking into it. |
| */ | ||
|
|
||
| import type { Linter } from "eslint"; | ||
| import js from "../../"; |
There was a problem hiding this comment.
| import js from "../../"; | |
| import js = require("@eslint/js"); |
There was a problem hiding this comment.
@snitin315 That's weird, that should not be the case, what do you see when you hover over "@eslint/js" in import js = require("@eslint/js")?
There was a problem hiding this comment.
It should be fine as long as we are pointing to the correct path.
There was a problem hiding this comment.
I guess then it that case we should have:
import js = require("../../types/index.js");Another way to fix that is to add this to package.json of @eslint/js:
"devDependencies": {
"@eslint/js": "file:."
},There was a problem hiding this comment.
import js = require("../../types/index.js");
I don't think it should be types because we have ...js.configs.recommended usage below.
"@eslint/js": "file:."
This is the same as import js from "../../";.
|
Please check the lint error. |
1bf25e5 to
ba4791a
Compare
1ec4222 to
4134281
Compare
|
@nzakas @mdjermanovic I've fixed the lint issues and removed eslint as a dependency. |
nzakas
left a comment
There was a problem hiding this comment.
LGTM. Would like another review before merging.
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>



Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain: Add types
What changes did you make? (Give an overview)
Fix #18998
Is there anything you'd like reviewers to focus on?
I have defined
eslintas a dependency because of it's usage in types similar to #18938