aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2020-02-13 17:29:42 +0300
committerValentin Popov <info@valentineus.link>2020-02-13 17:29:42 +0300
commit8d2a8a6154f8915a6d8f77ecdee45a01c1388523 (patch)
tree77d2882ca9ffb659a29b1ea1163ceded10d0b109
parent50a06b02ba8548c633ba5c3f3e38f827419d4c45 (diff)
downloadeslint-config-8d2a8a6154f8915a6d8f77ecdee45a01c1388523.tar.xz
eslint-config-8d2a8a6154f8915a6d8f77ecdee45a01c1388523.zip
feat(typescript): Rule "indent"
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r--ROADMAP.md2
-rw-r--r--src/rules/typescript/default.json30
2 files changed, 31 insertions, 1 deletions
diff --git a/ROADMAP.md b/ROADMAP.md
index c5a7488..a8fda2f 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -301,7 +301,7 @@
- [ ] "explicit-module-boundary-types"
- [ ] "func-call-spacing"
- [ ] "generic-type-naming"
-- [ ] "indent"
+- [X] "indent"
- [ ] "interface-name-prefix"
- [ ] "member-delimiter-style"
- [ ] "member-naming"
diff --git a/src/rules/typescript/default.json b/src/rules/typescript/default.json
index 4504f4e..206e1a9 100644
--- a/src/rules/typescript/default.json
+++ b/src/rules/typescript/default.json
@@ -1,4 +1,31 @@
{
+ "@typescript-eslint/indent": [
+ "error",
+ "tab",
+ {
+ "ArrayExpression": 1,
+ "CallExpression": {
+ "arguments": 1
+ },
+ "FunctionDeclaration": {
+ "body": 1,
+ "parameters": 1
+ },
+ "FunctionExpression": {
+ "body": 1,
+ "parameters": 1
+ },
+ "ImportDeclaration": 1,
+ "MemberExpression": 1,
+ "ObjectExpression": 1,
+ "SwitchCase": 1,
+ "VariableDeclarator": "first",
+ "flatTernaryExpressions": true,
+ "ignoreComments": false,
+ "ignoredNodes": [],
+ "outerIIFEBody": 1
+ }
+ ],
"@typescript-eslint/quotes": [
"error",
"double",
@@ -14,6 +41,9 @@
"omitLastInOneLineBlock": false
}
],
+ "indent": [
+ "off"
+ ],
"quotes": [
"off"
],