Commit Graph

843 Commits

Author SHA1 Message Date
Harrison Shoff
172dffbb52 [eslint-v2][whitespace] add newline-per-chained-call rule 2016-02-14 11:48:04 -08:00
Harrison Shoff
fbd9c35dd3 [eslint-v2][arrays] add array-callback-return rule 2016-02-14 11:14:38 -08:00
Harrison Shoff
a126d0b85c [eslint-v2] enforce yield-start-spacing, no-unused-labels, no-extra-label 2016-02-14 12:56:03 -08:00
Harrison Shoff
c05b2da9db [eslint-v2] add new rules, disabled:
- `id-blacklist`
 - `no-extra-label`
 - `no-implicit-globals`
 - `no-restricted-imports`
 - `no-unmodified-loop-condition`
 - `no-unused-labels`
 - `sort-imports`
 - `yield-star-spacing`
2016-02-14 02:50:51 -08:00
Harrison Shoff
91b83650b0 [eslint-v2][constructors] fix bad + good examples 2016-02-14 02:34:47 -08:00
Harrison Shoff
1cbc628c49 [eslint-v2][constructors] disallow unnecessary constructors 2016-02-13 13:57:38 -08:00
Harrison Shoff
5109c84926 [eslint-v2] fix no-labels rule 2016-02-13 13:41:52 -08:00
Harrison Shoff
75807b9d5e [eslint-v2] no gens, no dup props in obj literal 2016-02-12 11:42:15 -08:00
Harrison Shoff
3aa8c58487 [eslint-v2] fix keyword-spacing style and sorting 2016-02-12 11:36:26 -08:00
Harrison Shoff
4f32315b24 [eslint-v2] ecmaFeatures => parserOptions 2016-02-12 11:36:08 -08:00
Harrison Shoff
dff5099238 [eslint-v2] set es6 env to true 2016-02-12 11:30:11 -08:00
Harrison Shoff
da4213c6dd [eslint-v2] fix no-labels rule 2016-02-12 11:29:20 -08:00
Harrison Shoff
1efb11ca93 [eslint-v2] space-after/before/return/throw/case => keyword-spacing 2016-02-12 11:11:22 -08:00
Harrison Shoff
d49a1ed670 [eslint-v2] no-empty-label => no-labels 2016-02-12 11:10:30 -08:00
Harrison Shoff
1bb72ab9e2 [Deps] update eslint to v2, eslint-plugin-react to v4 2016-02-12 11:09:39 -08:00
Sergey Fursov
4574659833 rearrange comma-dangle rule to match es5/es6 codestyles, fixes #741 2016-02-21 01:31:20 +03:00
Harrison Shoff
aa9add108e [pkg] add harry to contributors 2016-02-12 11:37:39 -08:00
Jordan Harband
8b58d8770c v5.0.1 eslint-config-airbnb-v5.0.1 2016-02-13 11:11:39 -08:00
Jordan Harband
d952efed24 [Fix] eslint peerDep should not include breaking changes. 2016-02-13 11:10:48 -08:00
Jordan Harband
44cc90f31c Merge pull request #715 from lencioni/sort-comp-statics
[guide] [react] Sort static methods above constructor
2016-02-04 15:26:39 -08:00
Joe Lencioni
e007ec5be9 Sort static methods above constructor for React
I think it makes more sense to put static methods above the constructor
in classes. I would like to update the ESLint configuration to match
this, but it looks like the react/sort-comp rule does not support it
quite yet.

  https://github.com/yannickcr/eslint-plugin-react/issues/128
2016-02-04 11:01:17 -08:00
Ray Sinlao
24e7fd0c14 Added parenthesis to 'good' example in 8.2 2016-02-04 00:00:58 -08:00
Jordan Harband
06fab80dfa v5.0.0 eslint-config-airbnb-v5.0.0 2016-02-03 18:29:18 -08:00
Jordan Harband
a8461e0453 [eslint config] [fix] fix npm run lint 2016-02-03 18:28:07 -08:00
Jordan Harband
6f1d92851c [eslint config] [fix] s/no-case-declaration/no-case-declarations/g (from #712) 2016-02-03 18:27:59 -08:00
Jordan Harband
b6920af581 [eslint config] [dev deps] update eslint-plugin-react, react, tape 2016-02-03 17:26:33 -08:00
Jordan Harband
7e15ccf4cb [eslint config] [breaking] disallow unneeded ternary expressions. 2016-02-03 17:25:00 -08:00
Jordan Harband
fa4925be82 Merge pull request #712 from lencioni/no-case-declarations
[eslint config] [breaking] Avoid lexical declarations in case/default clauses
2016-02-03 13:04:51 -08:00
Joe Lencioni
4d74fe1f5a Add example of a case clause that does not need a block
As @kesne and @ljharb pointed out, this section was unclear about
whether or not you should always include blocks for all case clauses. To
make things clearer, I am adding a case clause that does not need a
block to the good example.

We decided that we should only require blocks for case clauses that
actually need them because it matches the as-needed spirit of section
3.8 ("Only quote properties that are invalid identifiers"). Perhaps if
there was an as-needed but consistent setting for the ESLint rule, we
would consider revising this a little, but this seems good enough for
now.
2016-02-03 12:23:51 -08:00
Joe Lencioni
38d9b34b27 Avoid lexical declarations in case/default clauses
This commit adds guidance warning people to avoid lexical declarations
in case/default clauses and enables the corresponding ESLint rule.

  http://eslint.org/docs/rules/no-case-declarations.html

We didn't have a section on switch statements yet, so I thought about
starting one. It seemed like it would best fit between section 15
(Comparison Operators & Equality) and section 16 (Blocks), but I didn't
want to mess up all of the following numberings, since people probably
have references to them. I considered adding this near the end to
minimize this effect, but it really seemed to belong near these other
things. I landed on appending it to Section 15 (Comparison Operators &
Equality) and I think it sorta fits there since switch statements are a
related concept.
2016-02-02 16:11:53 -08:00
Jordan Harband
206e13b185 [guide] remove trailing whitespace 2016-02-02 10:33:18 -08:00
Barry Gitarts
d293e74872 add section 15.5 - Ternaries
add link to the relevant eslint rule
2016-02-02 13:11:55 -05:00
Prayag Verma
7eb7b78513 Minor typo
Remove extra dot
2016-01-30 10:42:33 +05:30
Mark Sanghoon Kim
51510a43c8 Fixed capitalization and comment spacing
Fixed line 1219 to have a lowercase 'a' to be consistent with the style guide.
Fixed line 1831 to only have one space between the // and the =>
2016-01-27 23:14:53 -08:00
Fredrik Olovsson
784d029980 Edit sample code in 24.1 to follow rule 8.1
Replaced function expression with arrow function notation.
2016-01-27 11:53:57 +01:00
LarryBattle
79a6bfa101 Added names to invalid function declarations 2016-01-26 23:53:51 -06:00
Ethan Rubio
760e50704c Fixed capitalization
Fixed capitalization of ES6 to match the rest of the README.
2016-01-26 15:09:05 -08:00
Jordan Harband
da1d031ff8 [guide] [react] add a note preferring normal functions for functional stateless components. 2016-01-26 15:03:13 -08:00
Matt Brennan
94776c35eb Remove language interpretable as an ableist slur 2016-01-26 14:20:55 +00:00
Harrison Shoff
2a7e19a191 Merge pull request #695 from airbnb/move-rules
[rule links] reduce visual clutter
2016-01-25 22:40:20 -08:00
Harrison Shoff
7293a0f02d [rule links] add labels back 2016-01-25 22:34:39 -08:00
Harrison Shoff
992a9cea58 [react][rule links] add eslint labels back 2016-01-25 22:23:16 -08:00
Harrison Shoff
d852f5190e [react][rule links] condense lines 2016-01-25 22:19:01 -08:00
Harrison Shoff
2c06d87d86 [rule links] reduce visual clutter 2016-01-25 21:46:23 -08:00
Daniel Russell
02e1b4e395 Fixed capitalization
Bitshift changed to bitshift
2016-01-24 20:52:24 -08:00
Jordan Harband
c25dbac620 v4.0.0 eslint-config-airbnb-v4.0.0 2016-01-22 16:27:43 -08:00
Harrison Shoff
0839881fd2 Merge pull request #679 from jshen212/patch-1
Fix case type on line 3 comment
2016-01-22 09:52:14 -08:00
David Sorrentino
2c9833fbc2 add WeBox Studio to the organizations list 2016-01-22 11:45:56 +01:00
Rick Yeh
fb3c4cac20 Fixed minor capitalization change in Hoisting
Not sure if it's an actual fix, but just noticed this was the only comment that had capitalization that wasn't a proper noun
2016-01-21 22:54:27 -08:00
Jordan Harband
06746fa39d Merge pull request #688 from joaomilho/patch-2
[guide] Favor stateless functions over classes when there's no state
2016-01-21 13:17:47 -08:00