Skip to content

Commit a2d5af5

Browse files
committed
Relax rule: Don't check indentation on template literal children (work around for ESLint bug)
Fixes: standard/standard#1176
1 parent 3ddefba commit a2d5af5

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
2222
### Changed rules
2323

2424
- Relax rule: Don't require newlines between *single-line* member functions or class field declarations ([lines-between-class-members](https://eslint.org/docs/rules/lines-between-class-members)) [#1347](https://github.com/standard/standard/issues/1347)
25+
- Relax rule: Don't check indentation on template literal children (work around for ESLint bug) ([indent](https://eslint.org/docs/rules/indent)) [#1176](https://github.com/standard/standard/issues/1176)
2526

2627
## 13.1.0 - 2019-07-20
2728

eslintrc.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,25 @@
33
"rules": {
44
"dot-notation": ["error", { "allowKeywords": true }],
55
"import/no-absolute-path": ["error", { "esmodule": true, "commonjs": true, "amd": false }],
6+
"indent": ["error", 2, {
7+
"SwitchCase": 1,
8+
"VariableDeclarator": 1,
9+
"outerIIFEBody": 1,
10+
"MemberExpression": 1,
11+
"FunctionDeclaration": { "parameters": 1, "body": 1 },
12+
"FunctionExpression": { "parameters": 1, "body": 1 },
13+
"CallExpression": { "arguments": 1 },
14+
"ArrayExpression": 1,
15+
"ObjectExpression": 1,
16+
"ImportDeclaration": 1,
17+
"flatTernaryExpressions": false,
18+
"ignoreComments": false,
19+
"ignoredNodes": ["TemplateLiteral > *"]
20+
}],
621
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
722
"no-self-assign": ["error", { "props": true }],
8-
"quotes": ["error", "single", { "avoidEscape": true }],
923
"operator-linebreak": ["error", "after", { "overrides": { "?": "before", ":": "before", "|>": "before" } }],
24+
"quotes": ["error", "single", { "avoidEscape": true }],
1025

1126
"react/jsx-tag-spacing": ["error", { "beforeSelfClosing": "always", "beforeClosing": "never" }]
1227
}

0 commit comments

Comments
 (0)