Skip to content

Commit 5e84cb6

Browse files
committed
Merge pull request #1 from johnmanong/update
Update
2 parents e653a54 + ecaa4a3 commit 5e84cb6

24 files changed

+1376
-477
lines changed

README.md

Lines changed: 386 additions & 97 deletions
Large diffs are not rendered by default.

linters/jshintrc renamed to linters/.jshintrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
// Prohibit use of a variable before it is defined.
3535
"latedef": true,
3636

37-
// Enforce line length to 80 characters
38-
"maxlen": 80,
37+
// Enforce line length to 100 characters
38+
"maxlen": 100,
3939

4040
// Require capitalized names for constructor functions.
4141
"newcap": true,

packages/eslint-config-airbnb/.eslintrc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
"rules": {
44
// disable requiring trailing commas because it might be nice to revert to
55
// being JSON at some point, and I don't want to make big changes now.
6-
"comma-dangle": 0,
7-
// disabled because I find it tedious to write tests while following this
8-
// rule
9-
"no-shadow": 0
6+
"comma-dangle": 0
107
}
118
}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
3.1.0 / 2016-01-07
2+
==================
3+
- [minor] Allow multiple stateless components in a single file
4+
5+
3.0.2 / 2016-01-06
6+
==================
7+
- [fix] Ignore URLs in `max-len` (#664)
8+
9+
3.0.1 / 2016-01-06
10+
==================
11+
- [fix] because we use babel, keywords should not be quoted
12+
13+
3.0.0 / 2016-01-04
14+
==================
15+
- [breaking] enable `quote-props` rule (#632)
16+
- [breaking] Define a max line length of 100 characters (#639)
17+
- [breaking] [react] Minor cleanup for the React styleguide, add `react/jsx-no-bind` (#619)
18+
- [breaking] update best-practices config to prevent parameter object manipulation (#627)
19+
- [minor] Enable react/no-is-mounted rule (#635, #633)
20+
- [minor] Sort react/prefer-es6-class alphabetically (#634)
21+
- [minor] enable react/prefer-es6-class rule
22+
- Permit strict mode in "legacy" config
23+
- [react] add missing rules from eslint-plugin-react (enforcing where necessary) (#581)
24+
- [dev deps] update `eslint-plugin-react`
25+
26+
2.1.1 / 2015-12-15
27+
==================
28+
- [fix] Remove deprecated react/jsx-quotes (#622)
29+
30+
2.1.0 / 2015-12-15
31+
==================
32+
- [fix] use `require.resolve` to allow nested `extend`s (#582)
33+
- [new] enable `object-shorthand` rule (#621)
34+
- [new] enable `arrow-spacing` rule (#517)
35+
- [docs] flesh out react rule defaults (#618)
36+
37+
2.0.0 / 2015-12-03
38+
==================
39+
- [breaking] `space-before-function-paren`: require function spacing: `function <optional name>(` (#605)
40+
- [breaking] `indent`: Fix switch statement indentation rule (#606)
41+
- [breaking] `array-bracket-spacing`, `computed-property-spacing`: disallow spacing inside brackets (#594)
42+
- [breaking] `object-curly-spacing`: require padding inside curly braces (#594)
43+
- [breaking] `space-in-parens`: disallow spaces in parens (#594)
44+
45+
1.0.2 / 2015-11-25
46+
==================
47+
- [breaking] `no-multiple-empty-lines`: only allow 1 blank line at EOF (#578)
48+
- [new] `restParams`: enable rest params (#592)
49+
50+
1.0.1 / 2015-11-25
51+
==================
52+
- *erroneous publish*
53+
54+
1.0.0 / 2015-11-08
55+
==================
56+
- require `eslint` `v1.0.0` or higher
57+
- remove `babel-eslint` dependency
58+
59+
0.1.1 / 2015-11-05
60+
==================
61+
- remove id-length rule (#569)
62+
- enable `no-mixed-spaces-and-tabs` (#539)
63+
- enable `no-const-assign` (#560)
64+
- enable `space-before-keywords` (#554)
65+
66+
0.1.0 / 2015-11-05
67+
==================
68+
- switch to modular rules files courtesy the [eslint-config-default][ecd] project and [@taion][taion]. [PR][pr-modular]
69+
- export `eslint-config-airbnb/legacy` for ES5-only users. `eslint-config-airbnb/legacy` does not require the `babel-eslint` parser. [PR][pr-legacy]
70+
71+
0.0.9 / 2015-09-24
72+
==================
73+
- add rule `no-undef`
74+
- add rule `id-length`
75+
76+
0.0.8 / 2015-08-21
77+
==================
78+
- now has a changelog
79+
- now is modular (see instructions above for with react and without react versions)
80+
81+
0.0.7 / 2015-07-30
82+
==================
83+
- TODO: fill in
84+
85+
[ecd]: https://github.com/walmartlabs/eslint-config-defaults
86+
[taion]: https://github.com/taion
87+
[pr-modular]: https://github.com/airbnb/javascript/pull/526
88+
[pr-legacy]: https://github.com/airbnb/javascript/pull/527

packages/eslint-config-airbnb/README.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,35 @@
11
# eslint-config-airbnb
22

3+
[![npm version](https://badge.fury.io/js/eslint-config-airbnb.svg)](http://badge.fury.io/js/eslint-config-airbnb)
4+
35
This package provides Airbnb's .eslintrc as an extensible shared config.
46

57
## Usage
68

7-
### With React Style
9+
We export three ESLint configurations for your usage.
10+
11+
### eslint-config-airbnb
12+
13+
Our default export contains all of our ESLint rules, including EcmaScript 6+
14+
and React. It requires `eslint` and `eslint-plugin-react`.
815

9-
1. `npm install --save-dev eslint-config-airbnb babel-eslint eslint-plugin-react`
16+
1. `npm install --save-dev eslint-config-airbnb eslint-plugin-react eslint`
1017
2. add `"extends": "airbnb"` to your .eslintrc
1118

12-
### Without React Style
19+
### eslint-config-airbnb/base
1320

14-
1. `npm install --save-dev eslint-config-airbnb babel-eslint `
21+
Lints ES6+ but does not lint React. Requires `eslint`.
22+
23+
1. `npm install --save-dev eslint-config-airbnb eslint`
1524
2. add `"extends": "airbnb/base"` to your .eslintrc
1625

26+
### eslint-config-airbnb/legacy
27+
28+
Lints ES5 and below. Only requires `eslint`.
29+
30+
1. `npm install --save-dev eslint-config-airbnb eslint`
31+
2. add `"extends": "airbnb/legacy"` to your .eslintrc
32+
1733
See [Airbnb's Javascript styleguide](https://github.com/airbnb/javascript) and
1834
the [ESlint config docs](http://eslint.org/docs/user-guide/configuring#extending-configuration-files)
1935
for more information.
@@ -27,9 +43,3 @@ programming to structure our README as test cases for our .eslintrc?
2743
You can run tests with `npm test`.
2844

2945
You can make sure this module lints with itself using `npm run lint`.
30-
31-
## Changelog
32-
33-
### 0.0.8
34-
- now has a changelog
35-
- now is modular (see instructions above for with react and without react versions)

packages/eslint-config-airbnb/base.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
'extends': [
3+
'eslint-config-airbnb/legacy',
4+
'eslint-config-airbnb/rules/es6',
5+
].map(require.resolve),
6+
'rules': {}
7+
};

packages/eslint-config-airbnb/base/index.js

Lines changed: 0 additions & 178 deletions
This file was deleted.
Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
const reactRules = require('./react');
2-
const base = require('./base');
3-
4-
// clone this so we aren't mutating a module
5-
const eslintrc = JSON.parse(JSON.stringify(base));
6-
7-
// manually merge in React rules
8-
eslintrc.plugins = reactRules.plugins;
9-
Object.keys(reactRules.rules).forEach(function assignRule(ruleId) {
10-
eslintrc.rules[ruleId] = reactRules.rules[ruleId];
11-
});
12-
13-
module.exports = eslintrc;
1+
module.exports = {
2+
'extends': [
3+
'eslint-config-airbnb/base',
4+
'eslint-config-airbnb/rules/strict',
5+
'eslint-config-airbnb/rules/react',
6+
].map(require.resolve),
7+
rules: {}
8+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = {
2+
'extends': [
3+
'eslint-config-airbnb/rules/best-practices',
4+
'eslint-config-airbnb/rules/errors',
5+
'eslint-config-airbnb/rules/legacy',
6+
'eslint-config-airbnb/rules/node',
7+
'eslint-config-airbnb/rules/style',
8+
'eslint-config-airbnb/rules/variables'
9+
].map(require.resolve),
10+
'env': {
11+
'browser': true,
12+
'node': true,
13+
'amd': false,
14+
'mocha': false,
15+
'jasmine': false
16+
},
17+
'ecmaFeatures': {},
18+
'globals': {},
19+
'rules': {}
20+
};

0 commit comments

Comments
 (0)