eslint-plugin-ember-template-lint 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # eslint-plugin-hbs-template
2
2
 
3
- Provide linting (via [ember-template-lint](https://github.com/ember-template-lint/ember-template-lint)) for hbs templates files, template string literals and gts,gjs
3
+ Provide linting (via [ember-template-lint](https://github.com/ember-template-lint/ember-template-lint)) for hbs templates files, template string literals and gts,gjs (also enables eslint to run its other rules in gts/gjs)
4
4
  * no extra config file needed
5
5
 
6
6
  * no need to run extra tool for linting
@@ -19,7 +19,7 @@ async function _applyFixes(options, results, columnOffset) {
19
19
 
20
20
  let template = currentSource;
21
21
  if (columnOffset) {
22
- template = spaces + template.split('\n').join('\n' + spaces);
22
+ template = spaces + template.replace(/\n([^\n])/g, '\n' + spaces + '$1');
23
23
  }
24
24
  const origDoc = new Document(template);
25
25
  fixableIssues.forEach((r) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-ember-template-lint",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Provide linting for ember template",
5
5
  "keywords": [
6
6
  "eslint",