diff --git a/README.md b/README.md index 5276f4a932..99385851d2 100644 --- a/README.md +++ b/README.md @@ -151,21 +151,7 @@ Other Style Guides const item = {}; ``` - - [3.2](#3.2) 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) Use readable synonyms in place of reserved words. @@ -1366,27 +1352,10 @@ Other Style Guides ## Whitespace - - [18.1](#18.1) Use soft tabs set to 2 spaces. + - [18.1](#18.1) 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) Place 1 space before the leading brace. eslint rules: [`space-before-blocks`](http://eslint.org/docs/rules/space-before-blocks.html). diff --git a/packages/eslint-config-airbnb/rules/style.js b/packages/eslint-config-airbnb/rules/style.js index 204d69c5b3..f7e5a3aee2 100644 --- a/packages/eslint-config-airbnb/rules/style.js +++ b/packages/eslint-config-airbnb/rules/style.js @@ -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