Ray Sinlao
24e7fd0c14
Added parenthesis to 'good' example in 8.2
2016-02-04 00:00:58 -08:00
Jordan Harband
7e15ccf4cb
[eslint config] [breaking] disallow unneeded ternary expressions.
2016-02-03 17:25:00 -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
Harrison Shoff
7293a0f02d
[rule links] add labels back
2016-01-25 22:34:39 -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
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
Brett Jurgens
36765e4d88
add avant to users
2016-01-20 15:13:31 -06:00
Jordan Harband
fb65b9ae04
[guide] fix a few IIFE examples
2016-01-19 10:15:36 -08:00
Svein Halvor Halvorsen
018dd6e359
arrow-parens
2016-01-19 13:07:37 +01:00
Jordan Harband
586b7d9dfa
[docs] remove trailing whitespace
2016-01-17 18:10:42 -08:00
Henry Zhu
56ea6c7351
remove specific rule values in text
2016-01-16 22:27:41 -05:00
Henry Zhu
2bd22f0475
Document corresponding jscs rules
2016-01-16 21:46:35 -05:00
Prayag Verma
a4845a82cf
Update license year range to 2016
2016-01-16 17:33:50 +05:30
Jordan Harband
4ef335e242
[eslint config] [breaking] require outer IIFE wrapping; flesh out guide section.
...
There was lots of discussion [here](https://github.com/airbnb/javascript/issues/21#issuecomment-10203921 ), but now that we have both a modern build system and an eslint rule requiring terminating semicolons, the concerns with the “crockford” style no longer apply.
2016-01-10 15:11:05 -08:00
Peter Geiss
9498b3f7c4
Clearly show that [] is truthy
2016-01-13 23:12:06 -05:00
Eddie Monge
397f5bbd14
assign variables: give a reason for the assignment
...
The variable assignment wasn't necessary. This gives a reason to have it there
2016-01-13 14:19:14 -08:00
Simon Olofsson
90e6cd1c98
22.3: Add Link to eslint rule.
2016-01-13 17:45:43 +01:00
Simon Olofsson
59a0bccd92
7.3: Add Link to eslint rule.
2016-01-13 12:25:32 +01:00
Jordan Harband
7f62252e7f
[guide] clarify function spacing in 18.3
...
Per #668 .
2016-01-07 22:15:46 -08:00
Matija Marohnić
557b4dacd7
Link to the eslint rule for radix in parseInt
2016-01-07 00:19:06 +01:00
Jonny Schmid
6120656fd2
Fixed typo in URL
2016-01-06 11:15:35 +00:00
Sean McCambridge
52047535bd
clarity in destructuring code example
...
readme
2016-01-05 17:11:48 -05:00
Jordan Harband
4cdc3fe483
[eslint config] [breaking] enable quote-props rule.
2015-12-22 09:49:25 -08:00
Tomek Wiszniewski
4ca5764a30
Require parentheses
...
As suggested by @ljharb in https://github.com/airbnb/javascript/pull/579#issuecomment-166981740
2016-01-04 20:35:42 +01:00
Tomek Wiszniewski
766f3585db
Fix typo
2016-01-04 20:35:42 +01:00
Tomek Wiszniewski
b54ce438c8
Clarify 8.4
2016-01-04 20:35:42 +01:00
Tomek Wiszniewski
32ec9dd03a
Make 8.2 and 8.4 simpler and more explicit
2016-01-04 20:35:42 +01:00
Tomek Wiszniewski
bc9faf6fec
Bring back note about braces
2016-01-04 20:35:42 +01:00
Allen Zheng
896783d20c
Link newer ESLint rule (namely comma-dangle)
...
The "no-comma-dangle" rule was deprecated in favor or "comma-dangle" in
ESLint v1.0.
See http://eslint.org/docs/rules/no-comma-dangle.html ,
http://eslint.org/docs/rules/comma-dangle , and line 4 of
packages/eslint-config-airbnb/rules/errors.js.
2015-12-31 20:23:35 -05:00
Alican Çubukçuoğlu
f4b4ff6e1e
Add ESLint link for "Never mutate parameters." rule.
2015-12-30 01:54:16 +02:00
Alican Çubukçuoğlu
3869c21182
Fix indentation and spacing.
2015-12-29 19:48:16 +02:00
Alican Çubukçuoğlu
6d9a787ae2
Make reassigning a separate rule.
2015-12-29 19:11:52 +02:00
Christopher Banh
f1c249bcd3
Reword section 6.2 to recognize the line length
2015-12-24 02:08:16 -08:00
Christopher Banh
b7fbc7b6df
Add section 18.12 on line length
2015-12-24 02:08:16 -08:00
Jordan Harband
4adf9303c2
Merge pull request #576 from evolution-gaming/in-the-wild
...
[in the wild] Add Evolution Gaming
2015-12-23 12:12:07 -08:00
Thomas Shafer
a533a4fb93
added newlines after each function
2015-12-17 11:18:36 -08:00
Thomas Shafer
f7971301b0
update examples for style
...
add link to no-param-reassign rule documentation
2015-12-16 20:21:38 -08:00
Thomas Shafer
2589c67b0c
update best-practices config to prevent parameter object manipulation
...
added good/bad examples of parameter mutation to the readme
2015-12-16 15:43:00 -08:00
Gerardo Renovales
2ab6253f85
Update README.md
...
Add OutBoxSoft to the list of organizations
2015-12-14 15:06:57 -05:00
Benjamin Winterberg
721b8cd01f
Fix syntax highlighting in section 15
2015-12-09 10:51:49 +01:00