.eslintrc
ESLint configuration files
| Type | object |
|---|---|
| File match |
.eslintrc
.eslintrc.json
.eslintrc.yml
.eslintrc.yaml
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/eslintrc/latest.json |
| Source | https://www.schemastore.org/eslintrc.json |
Validate with Lintel
npx @lintel/lintel check
Properties
By default, ESLint supports only ECMAScript 5 syntax. You can override that setting to enable support for ECMAScript 6 as well as JSX by using configuration settings.
25 nested properties
Enables support for the experimental object rest/spread properties (IMPORTANT: This is an experimental feature that may change significantly in the future. It's recommended that you do not write rules relying on this functionality unless you are willing to incur maintenance cost when it changes.)
allow return statements in the global scope
enable global strict mode (if ecmaVersion is 5 or greater)
enable JSX
An environment defines global variables that are predefined.
25 nested properties
defines require() and define() as global variables as per the amd spec
AppleScript global variables
Atom test helper globals
browser global variables
CommonJS global variables and CommonJS scoping (use this for browser-only code that uses Browserify/WebPack)
Globals common to both Node and Browser
Ember test helper globals
enable all ECMAScript 6 features except for modules
GreaseMonkey globals
adds all of the Jasmine testing global variables for version 1.3 and 2.0
Jest global variables
jQuery global variables
Meteor global variables
adds all of the Mocha test global variables
MongoDB global variables
Java 8 Nashorn global variables
Node.js global variables and Node.js scoping
PhantomJS global variables
Prototype.js global variables
Protractor global variables
QUnit global variables
Service Worker global variables
ShellJS global variables
WebExtensions globals
web workers global variables
Set each global variable name equal to true to allow the variable to be overwritten or false to disallow overwriting.
Prevent comments from changing config or rules
Report unused eslint-disable comments
The JavaScript language options to be supported
3 nested properties
By default, ESLint supports only ECMAScript 5 syntax. You can override that setting to enable support for ECMAScript 6 as well as JSX by using configuration settings.
25 nested properties
Enables support for the experimental object rest/spread properties (IMPORTANT: This is an experimental feature that may change significantly in the future. It's recommended that you do not write rules relying on this functionality unless you are willing to incur maintenance cost when it changes.)
allow return statements in the global scope
enable global strict mode (if ecmaVersion is 5 or greater)
enable JSX
Set to 3, 5 (default), 6, 7, 8, 9, 10, 11, 12, 13, 14, or 15 to specify the version of ECMAScript syntax you want to use. You can also set it to 2015 (same as 6), 2016 (same as 7), 2017 (same as 8), 2018 (same as 9), 2019 (same as 10), 2020 (same as 11), 2021 (same as 12), 2022 (same as 13), 2023 (same as 14), or 2024 (same as 15) to use the year-based naming. You can also set "latest" to use the most recently supported version.
set to "script" (default), "commonjs", or "module" if your code is in ECMAScript modules
ESLint supports the use of third-party plugins. Before using the plugin, you have to install it using npm.
By default, ESLint will look for configuration files in all parent folders up to the root directory. This can be useful if you want all of your projects to follow a certain convention, but can sometimes lead to unexpected results. To limit ESLint to a specific project, set this to true in a configuration in the root of your project.
ESLint comes with a large number of rules. You can modify which rules your project uses either using configuration comments or configuration files.
ESLint supports adding shared settings into configuration file. You can add settings object to ESLint configuration file and it will be supplied to every rule that will be executed. This may be useful if you are adding custom rules and want them to have access to the same information and be easily configurable.
Allows to override configuration for files and folders, specified by glob patterns