Hi everyone,
So I installed your project in my Angular project, and it works like a charm. Thanks for the great addition to eslint 👯.
However EsLint complains in my *.component.ts files whenever I declare them with inline-templates that are defined in a multi line fashion like this:
Multi-lined-variant, throws error (i removed all unnecessary parts of the Component):
import { Component} from '@angular/core';
@Component({
selector: 'myProj-dialog-component',
template: `
<div></div>
`
})
export class DialogComponent{
constructor() {}
}
The Error Message looks like this:
Error: Debug Failure. False expression: position cannot precede the beginning of the file
at computeLineOfPosition (C:\Users\Bishares\IdeaProjects\myProj\frontend\node_modules\typescript\lib\typescript.js:8934:22)
at computeLineAndCharacterOfPosition (C:\Users\Bishares\IdeaProjects\myProj\frontend\node_modules\typescript\lib\typescript.js:8912:26)
at Object.getLineAndCharacterOfPosition (C:\Users\Bishares\IdeaProjects\myProj\frontend\node_modules\typescript\lib\typescript.js:8953:16)
at SourceFileObject.getLineAndCharacterOfPosition (C:\Users\Bishares\IdeaProjects\myProj\frontend\node_modules\typescript\lib\typescript.js:143309:23)
at preprocess (C:\Users\Bishares\IdeaProjects\myProj\frontend\node_modules\@angular-eslint\eslint-plugin-template\dist\index.js:1:1858)
at Linter._verifyWithProcessor (C:\Users\Bishares\IdeaProjects\myProj\frontend\node_modules\eslint\lib\linter\linter.js:1292:30)
at Linter._verifyWithConfigArray (C:\Users\Bishares\IdeaProjects\myProj\frontend\node_modules\eslint\lib\linter\linter.js:1264:25)
at Linter.verify (C:\Users\Bishares\IdeaProjects\myProj\frontend\node_modules\eslint\lib\linter\linter.js:1226:25)
at Linter.verifyAndFix (C:\Users\Bishares\IdeaProjects\myProj\frontend\node_modules\eslint\lib\linter\linter.js:1416:29)
at verifyText (C:\Users\Bishares\IdeaProjects\myProj\frontend\node_modules\eslint\lib\cli-engine\cli-engine.js:224:48)
preprocess: ERROR could not parse @Component() metadata C:\Users\Bishares\IdeaProjects\myProj\frontend\projects\@profect\myProj-core-lib\src\lib\component\notification\dialog.component.ts
Single-lined-variant, works fine (i removed all unnecessary parts of the Component):
import { Component} from '@angular/core';
@Component({
selector: 'myProj-dialog-component',
template: `<div></div>`
})
export class DialogComponent{
constructor() {}
}
Is there maybe a setting I couldn't find? Something to activate multi-line inline-templates?
Hi everyone,
So I installed your project in my Angular project, and it works like a charm. Thanks for the great addition to eslint 👯.
However EsLint complains in my
*.component.tsfiles whenever I declare them with inline-templates that are defined in a multi line fashion like this:Multi-lined-variant, throws error (i removed all unnecessary parts of the Component):
The Error Message looks like this:
Single-lined-variant, works fine (i removed all unnecessary parts of the Component):
Is there maybe a setting I couldn't find? Something to activate multi-line inline-templates?