Skip to content

Commit 360fceb

Browse files
committed
Merge pull request react-bootstrap#1281 from AlexKVal/airbnb
Next portion of `airbnb`
2 parents a1bd934 + 732dc03 commit 360fceb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+280
-286
lines changed

.eslintrc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,10 @@
2525
"no-param-reassign": 0,
2626
"no-this-before-super": 2,
2727
"no-undef": 2,
28-
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
2928
"babel/object-shorthand": 2,
3029
"react/jsx-boolean-value": [2, "never"],
3130
"react/jsx-no-duplicate-props": 2,
3231
"react/prop-types": [2, { "ignore": [ "children", "className", "style" ] }],
33-
"react/sort-comp": 0,
34-
"space-after-keywords": 0,
35-
"space-before-blocks": 0,
36-
"space-before-function-paren": 0,
37-
"spaced-comment": 0,
38-
"vars-on-top": 0
32+
"react/sort-comp": 0
3933
}
4034
}

docs/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const readmeDest = path.join(docsBuilt, 'README.md');
2525
* @internal
2626
*/
2727
function generateHTML(fileName, propData) {
28-
return new Promise((resolve, reject) => {
28+
return new Promise( resolve => {
2929
const urlSlug = fileName === 'index.html' ? '/' : `/${fileName}`;
3030

3131
Router.run(routes, urlSlug, Handler => {

docs/examples/Collapse.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
class Example extends React.Component {
2-
constructor(...args){
2+
constructor(...args) {
33
super(...args);
44

55
this.state = {};
66
}
77

8-
render(){
8+
render() {
99
return (
1010
<div>
1111
<Button onClick={ ()=> this.setState({ open: !this.state.open })}>

docs/examples/DropdownButtonBasic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const BUTTONS = ['Default', 'Primary', 'Success', 'Info', 'Warning', 'Danger', 'Link'];
22

3-
function renderDropdownButton (title, i) {
3+
function renderDropdownButton(title, i) {
44
return (
55
<DropdownButton bsStyle={title.toLowerCase()} title={title} key={i} id={`dropdown-basic-${i}`}>
66
<MenuItem eventKey="1">Action</MenuItem>

docs/examples/DropdownButtonCustomMenu.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

22
class CustomMenu extends React.Component {
33

4-
constructor(...args){
4+
constructor(...args) {
55
super(...args);
66
this.state = { value: '' };
77
this.onChange = e => this.setState({ value: e.target.value });
88
}
99

10-
render(){
10+
render() {
1111
let { className, ...props } = this.props;
1212

1313
return (
@@ -30,7 +30,7 @@ class CustomMenu extends React.Component {
3030
);
3131
}
3232

33-
filterChildren(){
33+
filterChildren() {
3434
let { children } = this.props;
3535
let { value } = this.state;
3636
let filtered = [];

docs/examples/Fade.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

22
class Example extends React.Component {
33

4-
constructor(...args){
4+
constructor(...args) {
55
super(...args);
66
this.state = {};
77
}
88

9-
render(){
9+
render() {
1010
return (
1111
<div>
1212
<Button onClick={()=> this.setState({ open: !this.state.open })}>

docs/examples/ListGroupLinked.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function alertClicked () {
1+
function alertClicked() {
22
alert('You clicked the third ListGroupItem');
33
}
44

docs/examples/MenuItem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function onSelectAlert(eventKey, href, target) {
1+
function onSelectAlert(eventKey, href) {
22
alert('Alert from menu item.\neventKey: "' + eventKey + '"\nhref: "' + href + '"');
33
}
44

docs/examples/Modal.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
const Example = React.createClass({
22

3-
getInitialState(){
3+
getInitialState() {
44
return { showModal: false };
55
},
66

7-
close(){
7+
close() {
88
this.setState({ showModal: false });
99
},
1010

11-
open(){
11+
open() {
1212
this.setState({ showModal: true });
1313
},
1414

docs/examples/ModalContained.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@
1010
*/
1111

1212
const Trigger = React.createClass({
13-
getInitialState(){
13+
getInitialState() {
1414
return { show: false };
1515
},
1616

1717
render() {
18-
let close = e => this.setState({ show: false});
18+
let close = () => this.setState({ show: false});
1919

2020
return (
2121
<div className="modal-container" style={{height: 200}}>
2222
<Button
2323
bsStyle="primary"
2424
bsSize="large"
25-
onClick={e => this.setState({ show: true})}
25+
onClick={() => this.setState({ show: true})}
2626
>
2727
Launch contained modal
2828
</Button>

0 commit comments

Comments
 (0)