Commit Graph

306 Commits

Author SHA1 Message Date
Jordan Gensler
d02a506377 Adding links to react rules for quick reference. 2015-12-11 23:13:30 -08:00
Jordan Gensler
e9b1ef92bf Adding links to lint rules in react styleguide. 2015-12-11 23:00:10 -08:00
Jordan Gensler
d5a636f298 [react] Including missing defaults to the react eslint 2015-12-11 18:47:48 -08:00
Vladimir Kutepov
514bd87d1a Require space before/after arrow function's arrow (arrow-spacing)
Enable [arrow-spacing](http://eslint.org/docs/rules/arrow-spacing.html) rule, code with space before/after arrow function's arrow is easier to read.
```js
() => {};
(a) => {};
a => a;
() => {'\n'};
()=> {};     /*error Missing space before =>*/
() =>{};     /*error Missing space after =>*/
(a)=> {};    /*error Missing space before =>*/
(a) =>{};    /*error Missing space after =>*/
a =>a;       /*error Missing space after =>*/
a=> a;       /*error Missing space before =>*/
()=> {'\n'}; /*error Missing space before =>*/
() =>{'\n'}; /*error Missing space after =>*/
```
2015-12-11 13:50:46 +05:00
Jordan Harband
4c0a70e435 [eslint config] v2.0.0
- separate changelog
2015-12-03 13:55:09 -08:00
Jordan Harband
326100a7b9 Merge pull request #605 from airbnb/ljharb/fix_function_spacing
[breaking] Require function spacing: `function <optional name>(`
2015-12-03 13:33:45 -08:00
Jordan Harband
4ccd04b69a I abhor switch statements, but their indentation should be:
```js
switch (foo) {
  case 'bar':
    break;
}
```

not what the plugin currently requires:
```js
switch (foo) {
case: 'bar':
  break;
}
```
2015-12-03 00:09:12 -08:00
Jordan Harband
599ca4f123 Require a space between function and (, and function and the function's name, and disallow spaces between the function's name and (. 2015-12-02 22:58:11 -08:00
Stefano Pigozzi
6debbcdd73 Add Section 18.11 - Add spaces inside curly braces
Fixes #593
2015-11-28 18:47:46 +01:00
Stefano Pigozzi
ee3759a7ed Add Section 18.10 - No spaces inside brackets
See #593
2015-11-28 13:29:47 +01:00
Stefano Pigozzi
2557a5bca6 Add Section 18.9 - No spaces inside parentheses
See #593
2015-11-28 13:26:37 +01:00
Jake Teton-Landis
e0326137d4 [eslint config] v1.0.2 2015-11-26 15:30:30 -08:00
Ari Porad
e424a249e3 Enable rest params! 2015-11-25 20:48:48 -08:00
Jan Krems
c501e0d5a6 Use require.resolve to allow nested extend 2015-11-16 13:40:38 -08:00
Adrien Vergé
09c8589e44 [eslint] Enforce rule 18.5
Rule 18.5 [1] states that files shall end with a single newline
character. Until now, this was not checked because there was no such
option in eslint.

Since version 1.8.0, eslint provides the ability to do that. See pull
request on eslint [2] for details on implementation and usage. Let's use
it in airbnb eslint plugin now!

[1]: https://github.com/airbnb/javascript#18.5
[2]: https://github.com/eslint/eslint/pull/4266
2015-11-11 10:27:04 -08:00
Joscha Feth
aa6ca6ff68 docs: babel-eslint not neede since 1.0.0 any more 2015-11-09 14:44:17 +11:00
Jordan Harband
d9b5585be4 [eslint config] v1.0.0 2015-11-08 11:12:17 -08:00
Jordan Harband
d432f58655 Add eslint as a peer dep, 1.0 or greater 2015-11-06 16:32:28 -08:00
Jordan Harband
0b7c979d82 [eslint] Remove babel-eslint dependency. 2015-11-06 15:16:49 -08:00
Jordan Harband
88603b8445 [eslint] update eslint, eslint-plugin-react, react, tape. 2015-11-06 13:09:34 -08:00
Jake Teton-Landis
7b0ff1246e eslint-config-airbnb 0.1.1 2015-11-05 15:36:01 -08:00
Jake Teton-Landis
06ed38d57f [eslint] remove id length rule (too much nutrage) 2015-11-05 15:18:59 -08:00
Adrien Vergé
7b834b989c eslint: Fix no-mixed-spaces-and-tabs turn off
Currently the way the rule is defined, mixing spaces and tabulations in
indentation is allowed. However, the comments and documents seems to say
the opposite.

This patchs turns the rule on so mixing spaces and tabs is NOT allowed.

Fixes: #539
2015-10-30 17:00:14 +01:00
RH Becker
b056ad09bb Flag modification of variables that are declared using const keyword as an error. 2015-10-29 22:43:33 -07:00
Adrien Vergé
ab0a6ca92b eslint: Add missing space-before-keywords rule
All examples in README.md seem to agree on avoiding missing whitespaces
before keywords such as:

    if (cond) {
    }else {       // no space before 'else'
    }

    try {
    }catch (e) {  // no space before 'catch'
    }

This patchs adds the `space-before-keywords` rule as an error (as is
`space-after-keywords` already).
2015-10-23 10:57:24 +02:00
Ankit Sardesai
1b46be032e Added version badge to eslint-config-airbnb 2015-10-04 03:15:09 -04:00
Jimmy Jia
8da7adbdd4 Clarify strict ESLint rule 2015-09-29 12:19:49 -04:00
Jake Teton-Landis
e65c6afe44 eslint-config-airbnb v0.1.0 2015-09-27 20:02:01 -07:00
Jake Teton-Landis
b42e9b82dd explain eslint-config-airbnb rule choices 2015-09-27 19:52:28 -07:00
Jake Teton-Landis
170dbeb5d4 make exported rulesets extend relative to eslint-config-airbnb 2015-09-27 19:52:28 -07:00
Jake Teton-Landis
de90317a6d create legacy.js to export es5 rules 2015-09-27 18:47:13 -07:00
Jimmy Jia
9c7674a7b3 Update for upstream dependencies
- react/jsx-quotes has been superseded by jsx-quotes
- eqeqeq now covers comparisons to null
2015-09-25 16:27:48 -04:00
Jimmy Jia
db6c4a8b4e Remove differences from eslint-config-defaults 2015-09-25 16:23:29 -04:00
Jimmy Jia
daea8a638f Use rules from eslint-config-defaults 2015-09-25 16:15:38 -04:00
Jake Teton-Landis
58c901c330 use eslint 1.3.0 (fixes #515) 2015-09-24 12:25:34 -07:00
Jake Teton-Landis
e40ea1c24e update readme for eslint-config-airbnb 0.0.9 2015-09-24 12:18:34 -07:00
Jake Teton-Landis
f25c85ef2e eslint-config-airbnb 0.0.9 2015-09-24 12:12:32 -07:00
Ankit Sardesai
15780d5284 Added id-length documentation url 2015-09-14 17:26:16 -04:00
Ankit Sardesai
867bfdeace Added id-length rule to style guide 2015-09-12 21:05:50 -04:00
Aaron Jensen
c95af97e61 Add no-undef
Fixes #454
Fixes #473
2015-08-22 23:59:50 -07:00
Jake Teton-Landis
64e13a20df eslint-config-airbnb 0.0.8 2015-08-21 14:22:03 -07:00
Jake Teton-Landis
2d90ebf11b update README with new package structure 2015-08-19 14:01:14 -07:00
Jake Teton-Landis
7646a8619b lint eslint-config-airbnb with eslint-config-airbnb/base 2015-08-19 14:00:53 -07:00
Jake Teton-Landis
048e22ea98 somewhat modularize eslint-config-airbnb; add some tests 2015-08-18 18:02:31 -07:00
Slava Shklyaev
0068cc1d6e Put custom component methods before render methods 2015-08-18 20:14:24 +03:00
Nikita Gusakov
20b6913202 Simplify ESLint config package.
This patch moves `.eslintrc` contents into `index.js` directly.
This allows us to drop external dependencies and using javascript
comments instead of not valid JSON.
2015-08-08 17:46:56 +03:00
Jake Teton-Landis
ff4dc46d05 [eslint] allow +, -, =, ! in comments without a space 2015-07-30 17:49:47 -07:00
Jake Teton-Landis
cf5266bc52 [eslint] document dependences in README 2015-07-30 15:01:17 -07:00
Jake Teton-Landis
a45dfe359b [eslint] remove peerDependencies 2015-07-30 14:59:19 -07:00
Jake Teton-Landis
abc85310b9 [eslint] add readme to eslint-config-airbnb 2015-07-30 14:49:34 -07:00