You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ESLint Modular is a [shareable config](https://eslint.org/docs/developer-guide/shareable-configs) for [ESLint](https://eslint.org/) that's broken-up into different modules that can be mixed-and-matched to match the needs of your project.
14
14
@@ -28,7 +28,7 @@ Installation
28
28
Run the following [npm](https://docs.npmjs.com/about-npm/) command to install [ESLint](https://eslint.org/) and ESLint Modular as dev-dependencies of your project:
This module contains rules that prevent accidental bugs, insecure code, and bad coding practices. You can use this module directly, or use any/all of its sub-modules.
The rules in this module prevent syntax that is likely to lead to accidental bugs or runtime errors. Examples include not [reassigning native objects](https://eslint.org/docs/rules/no-native-reassign), and [using `===` instead of `==`](https://eslint.org/docs/rules/eqeqeq) for comparisons. Most of the rules in this file will raise an error if violated, but some less-severe ones will only raise warnings.
These rules help enforce security best-practices such as [avoiding the `eval()` statement](https://eslint.org/docs/rules/no-eval) and requiring [`"use strict"` directives](https://eslint.org/docs/rules/strict).
This module configures ESLint to recognize browser globals, such as `window`, `document`, `navigator`, etc. It also contains rules that are specific to projects that are intended to run in web browsers, such as [avoiding the `alert()` statement](https://eslint.org/docs/rules/no-alert) and [requiring the `use strict` directive within a function](http://www.ecma-international.org/ecma-262/6.0/#sec-directive-prologues-and-the-use-strict-directive).
This module configures ESLint to parse [JSX syntax](https://facebook.github.io/react/docs/jsx-in-depth.html). It also contains JSX-specific rules, such as enforcing the use of [double-quotes in JSX attributes](https://eslint.org/docs/rules/jsx-quotes).
This module configures ESLint to parse EcmaScript 5 code. It also disables ES6-specific rules, such as [using `let` instead of `var`](https://eslint.org/docs/rules/no-var).
This module configures ESLint to parse EcmaScript 6 (and newer) code. It also contains ES6-specific rules, such as [not assigning to constants](https://eslint.org/docs/rules/no-const-assign), [calling `super()` in constructors](https://eslint.org/docs/rules/no-this-before-super), and [using `let` instead of `var`](https://eslint.org/docs/rules/no-var).
This module configures ESLint to parse your JavaScript files with [script semantics](http://www.ecma-international.org/ecma-262/6.0/#sec-scripts-static-semantics-early-errors) rather than [ES6 module semantics](http://www.ecma-international.org/ecma-262/6.0/#sec-module-semantics), since CommonJS modules are not "true" JavaScript modules.
This module configures ESLint to parse your JavaScript files with [ES6 module semantics](http://www.ecma-international.org/ecma-262/6.0/#sec-module-semantics) rather than [script semantics](http://www.ecma-international.org/ecma-262/6.0/#sec-scripts-static-semantics-early-errors). It also disallows [the `use strict` directive](http://www.ecma-international.org/ecma-262/6.0/#sec-directive-prologues-and-the-use-strict-directive), since ES6 modules are always strict.
This module configures ESLint to recognize Node.js globals, such as `process`, `__dirname`, `Buffer`, etc. It also contains rules that are specific to Node.js projects, such as [avoding `new require()` syntax](https://eslint.org/docs/rules/no-new-require) and [disallowing concatenation with `__dirname`](https://eslint.org/docs/rules/no-path-concat).
The rules in this module enforce an **opinionated** set of conventions, such as using [double-quotes](https://eslint.org/docs/rules/quotes) and [semi-colons](https://eslint.org/docs/rules/semi).
These rules enforce JavaScript naming conventions, such as [camel-case variables](https://eslint.org/docs/rules/camelcase) and [capitialized classes](https://eslint.org/docs/rules/new-cap).
These rules disallow outdated, nonstandard, and confusing syntax. Examples include [labels](https://eslint.org/docs/rules/no-labels), [the comma operator](https://eslint.org/docs/rules/no-sequences), and [nonstandard multiline strings](https://eslint.org/docs/rules/no-multi-str).
This module enforces **opinionated** whitespace rules, such as [two-space indentation](https://eslint.org/docs/rules/indent), [Stroustrup style opening braces](https://eslint.org/docs/rules/brace-style), and [commas at the end of the line](https://eslint.org/docs/rules/comma-style).
This module configures ESLint to recognize globals that are defined by common test frameworks, such as `describe`, `it`, `beforeEach`, etc. It also disables rules that tend to cause problems with certain test frameworks.
109
109
110
110
> **Note:** We recommend that you create a separate `.eslintrc.yml` file in your test folder. That way, it can use different modules and rules than the rest of your codebase.
0 commit comments