-
-
Notifications
You must be signed in to change notification settings - Fork 9
chore: use defineConfig
and globalIgnores
in ESLint config
#93
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
base: main
Are you sure you want to change the base?
chore: use defineConfig
and globalIgnores
in ESLint config
#93
Conversation
@@ -41,7 +40,7 @@ export default [ | |||
files: ["**/*.json"], | |||
ignores: ["**/package-lock.json"], | |||
language: "json/json", | |||
...json.configs.recommended, | |||
extends: [json.configs.recommended], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use the string version here.
extends: [json.configs.recommended], | |
extends: ["json/recommended"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import json from "./src/index.js";
Thank you for your suggestion! Unfortunately, however, json
is imported directly from ./src/index.js
, string version causes an error when running ESLint, as shown below:
TypeError: Plugin "json" not found.
at findPluginConfig (path)
at path
at Array.map (<anonymous>)
at processExtends (path)
at path
at Array.flatMap (<anonymous>)
at processConfigList (path)
at defineConfig (path)
at path
at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
It seems like this error is happening because @eslint/json
isn’t present in node_modules
.
Would it be alright to leave it as it is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, you'd also need to include:
{
plugins: { json }
}
Prerequisites checklist
What is the purpose of this pull request?
Hello,
I've updated ESLint config file to use
defineConfig
andglobalIgnores
which was added recently, and I also bumped ESLint to the latest version.What changes did you make? (Give an overview)
Related Issues
Is there anything you'd like reviewers to focus on?