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
[](https://gitter.im/eslint/eslint?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6
7
7
8
# ESLint
8
9
@@ -22,8 +23,26 @@ You can install ESLint using npm:
22
23
23
24
## Usage
24
25
26
+
If it's your first time using ESLint, you should set up a config file using `--init`:
27
+
28
+
eslint --init
29
+
30
+
After that, you can run ESLint on any JavaScript file:
31
+
25
32
eslint test.js test2.js
26
33
34
+
## Team
35
+
36
+
These folks keep the project moving and are resources for help:
37
+
38
+
* Nicholas C. Zakas ([@nzakas](https://github.com/nzakas)) - project lead
@@ -34,12 +53,16 @@ I do like JSHint. And I like Anton and Rick. Neither of those were deciding fact
34
53
35
54
That's not really a question, but I got it. I'm not trying to convince you that ESLint is better than JSHint. The only thing I know is that ESLint is better than JSHint for what I'm doing. In the off chance you're doing something similar, it might be better for you. Otherwise, keep using JSHint, I'm certainly not going to tell you to stop using it.
36
55
37
-
### How does ESLint performance compare to JSHint?
56
+
### How does ESLint performance compare to JSHint and JSCS?
38
57
39
58
ESLint is slower than JSHint, usually 2-3x slower on a single file. This is because ESLint uses Espree to construct an AST before it can evaluate your code whereas JSHint evaluates your code as it's being parsed. The speed is also based on the number of rules you enable; the more rules you enable, the slower the process.
40
59
41
60
Despite being slower, we believe that ESLint is fast enough to replace JSHint without causing significant pain.
42
61
62
+
ESLint is faster than JSCS, as ESLint uses a single-pass traversal for analysis whereas JSCS using a querying model.
63
+
64
+
If you are using both JSHint and JSCS on your files, then using just ESLint will be faster.
65
+
43
66
### Is ESLint just linting or does it also check style?
44
67
45
68
ESLint does both traditional linting (looking for problematic patterns) and style checking (enforcement of conventions). You can use it for both.
@@ -50,6 +73,7 @@ The following projects are using ESLint to validate their JavaScript:
In addition, the following companies are using ESLint internally to validate their JavaScript:
@@ -62,11 +86,19 @@ In addition, the following companies are using ESLint internally to validate the
62
86
63
87
### What about ECMAScript 6 support?
64
88
65
-
We are implementing ECMAScript 6 support piece-by-piece starting with version 0.12.0. You'll be able to opt-in to any ECMAScript 6 feature you want to use.
89
+
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).
90
+
91
+
### Does ESLint support JSX?
92
+
93
+
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.
94
+
95
+
### What about ECMAScript 7/2016 and experimental features?
96
+
97
+
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.
0 commit comments