Skip to content

Commit

Permalink
Switch indentation rule to tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
textbook committed Aug 11, 2019
1 parent 72bd4c2 commit 4703f71
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This config starts from [`eslint:recommended`][1] then adds the following rules:
| [brace-style] | `"1tbs", { "allowSingleLine": false }` | |
| [comma-dangle] | `"always-multiline"` | 3 |
| [curly] | | 2 |
| [indent] | `2` | |
| [indent] | `"tab"` | Tabs are [more accessible][2] |
| [linebreak-style] | `"unix"` | |
| [no-trailing-spaces] | | |
| [no-unused-vars] | `{ "ignoreRestSiblings": true }` | |
Expand All @@ -49,6 +49,7 @@ This config starts from [`eslint:recommended`][1] then adds the following rules:
| [semi] | | Students shouldn't have to memorise the [ASI rules] |

[1]: https://eslint.org/docs/user-guide/configuring#using-eslintrecommended
[2]: https://www.reddit.com/r/javascript/comments/c8drjo/nobody_talks_about_the_real_reason_to_use_tabs/

[arrow-parens]: https://eslint.org/docs/rules/arrow-parens
[ASI rules]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Automatic_semicolon_insertion
Expand Down
32 changes: 16 additions & 16 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
"use strict";

module.exports = {
extends: ["eslint:recommended"],
rules: {
"arrow-parens": "error",
"brace-style": ["error", "1tbs", { "allowSingleLine": false }],
"comma-dangle": ["error", "always-multiline"],
"curly": "error",
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"no-trailing-spaces": "error",
"no-unused-vars": ["error", { "ignoreRestSiblings": true }],
"no-var": "error",
"object-curly-spacing": ["error", "always"],
"operator-linebreak": ["error", "before"],
"quotes": ["error", "double"],
"semi": "error",
},
extends: ["eslint:recommended"],
rules: {
"arrow-parens": "error",
"brace-style": ["error", "1tbs", { "allowSingleLine": false }],
"comma-dangle": ["error", "always-multiline"],
"curly": "error",
"indent": ["error", "tab"],
"linebreak-style": ["error", "unix"],
"no-trailing-spaces": "error",
"no-unused-vars": ["error", { "ignoreRestSiblings": true }],
"no-var": "error",
"object-curly-spacing": ["error", "always"],
"operator-linebreak": ["error", "before"],
"quotes": ["error", "double"],
"semi": "error",
},
};

0 comments on commit 4703f71

Please sign in to comment.