Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 2 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,21 +151,7 @@ Other Style Guides
const item = {};
```

- [3.2](#3.2) <a name='3.2'></a> If your code will be executed in browsers in script context, don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work in IE8. [More info](https://github.com/airbnb/javascript/issues/61). It’s OK to use them in ES6 modules and server-side code.

```javascript
// bad
const superman = {
default: { clark: 'kent' },
private: true,
};

// good
const superman = {
defaults: { clark: 'kent' },
hidden: true,
};
```
- ~~[3.2](#3.2)~~ Rule was removed.

- [3.3](#3.3) <a name='3.3'></a> Use readable synonyms in place of reserved words.

Expand Down Expand Up @@ -1366,27 +1352,10 @@ Other Style Guides

## Whitespace

- [18.1](#18.1) <a name='18.1'></a> Use soft tabs set to 2 spaces.
- [18.1](#18.1) <a name='18.1'></a> Use tabs for indentation.

eslint rules: [`indent`](http://eslint.org/docs/rules/indent.html).

```javascript
// bad
function () {
∙∙∙∙const name;
}

// bad
function () {
∙const name;
}

// good
function () {
∙∙const name;
}
```

- [18.2](#18.2) <a name='18.2'></a> Place 1 space before the leading brace.

eslint rules: [`space-before-blocks`](http://eslint.org/docs/rules/space-before-blocks.html).
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-airbnb/rules/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
'id-length': 0,
// this option sets a specific tab width for your code
// https://github.com/eslint/eslint/blob/master/docs/rules/indent.md
'indent': [2, 2, { "SwitchCase": 1, "VariableDeclarator": 1 }],
'indent': [2, 'tab'],
// specify whether double or single quotes should be used in JSX attributes
'jsx-quotes': 2,
// enforces spacing between keys and values in object literal properties
Expand Down