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 is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. In many ways, it is similar to JSLint and JSHint with a few exceptions:
14
14
@@ -39,17 +39,17 @@ After running `eslint --init`, you'll have a `.eslintrc` file in your directory.
39
39
```json
40
40
{
41
41
"rules": {
42
-
"semi": [2, "always"],
43
-
"quotes": [2, "double"]
42
+
"semi": ["error", "always"],
43
+
"quotes": ["error", "double"]
44
44
}
45
45
}
46
46
```
47
47
48
48
The names `"semi"` and `"quotes"` are the names of [rules](http://eslint.org/docs/rules) in ESLint. The number is the error level of the rule and can be one of the three values:
49
49
50
-
*`0` - turn the rule off
51
-
*`1` - turn the rule on as a warning (doesn't affect exit code)
52
-
*`2` - turn the rule on as an error (exit code will be 1)
50
+
*`"off"` or `0` - turn the rule off
51
+
*`"warn"` or `1` - turn the rule on as a warning (doesn't affect exit code)
52
+
*`"error"` or `2` - turn the rule on as an error (exit code will be 1)
53
53
54
54
The three error levels allow you fine-grained control over how ESLint applies rules (for more configuration options and details, see the [configuration docs](http://eslint.org/docs/user-guide/configuring)).
55
55
@@ -66,12 +66,14 @@ These folks keep the project moving and are resources for help:
*[Propose a New Rule](http://eslint.org/docs/developer-guide/contributing/new-rules)
88
+
*[Proposing a Rule Change](http://eslint.org/docs/developer-guide/contributing/rule-changes)
86
89
*[Request a Change](http://eslint.org/docs/developer-guide/contributing/changes)
87
90
88
91
## Frequently Asked Questions
@@ -109,18 +112,23 @@ If you are using both JSHint and JSCS on your files, then using just ESLint will
109
112
110
113
ESLint does both traditional linting (looking for problematic patterns) and style checking (enforcement of conventions). You can use it for both.
111
114
112
-
### What about ECMAScript 6 support?
113
-
114
-
ESLint has full support for ECMAScript 6. By default, this support is off. You can enable ECMAScript 6 support through [configuration](http://eslint.org/docs/user-guide/configuring).
115
-
116
115
### Does ESLint support JSX?
117
116
118
117
Yes, ESLint natively supports parsing JSX syntax (this must be enabled in [configuration](http://eslint.org/docs/user-guide/configuring).). Please note that supporting JSX syntax *is not* the same as supporting React. React applies specific semantics to JSX syntax that ESLint doesn't recognize. We recommend using [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) if you are using React and want React semantics.
119
118
120
-
### What about ECMAScript 7/2016 and experimental features?
119
+
### What about ECMAScript 6 support?
120
+
121
+
ESLint has full support for ECMAScript 6. By default, this support is off. You can enable ECMAScript 6 support through [configuration](http://eslint.org/docs/user-guide/configuring).
122
+
123
+
### What about experimental features?
121
124
122
125
ESLint doesn't natively support experimental ECMAScript language features. You can use [babel-eslint](https://github.com/babel/babel-eslint) to use any option available in Babel.
123
126
127
+
Once a language feature has been adopted into the ECMAScript standard, we will accept
128
+
issues and pull requests related to the new feature, subject to our [contributing
129
+
guidelines](http://eslint.org/docs/developer-guide/contributing). Until then, please use
130
+
the appropriate parser and plugin(s) for your experimental feature.
131
+
124
132
### Where to ask for help?
125
133
126
134
Join our [Mailing List](https://groups.google.com/group/eslint) or [Chatroom](https://gitter.im/eslint/eslint)
0 commit comments