Skip to content

ESLint

This plugin is enabled if there’s a match in "dependencies" or "devDependencies" in package.json:

  • eslint

  • @eslint/js

If this plugin is enabled, the following configuration is added automatically:

{
"eslint": {
"config": [
".eslintrc",
".eslintrc.{js,json,cjs}",
".eslintrc.{yml,yaml}",
"package.json"
],
"entry": [
"eslint.config.{js,cjs,mjs,ts,cts,mts}"
]
}
}

Depending on local configuration, plugins may modify the defaults as shown.

Custom config or entry options override default values, they are not merged.

See Plugins for more details about plugins and their entry and config options.

Only regular import statements are considered by default. The configuration object is not resolved to find dependencies for settings such as "eslint-import-resolver-typescript". To enable this, lift the entry to a config file like so:

{
"eslint": ["eslint.config.ts"]
}

This is not enabled by default, since this exception may be thrown by a @rushstack/eslint-* package:

Error: Failed to patch ESLint because the calling module was not recognized.

If relying on configuration cascading, consider using an extended glob pattern like this:

{
"eslint": ["**/.eslintrc.js"]
}

This page was generated from the eslint plugin source code.

ISC License © 2024 Lars Kappert