Open lifeart opened 4 years ago
Nice stuff! The main thing stopping us from starting to use this is that we cant type all of our components and templates at once.
The main idea I can come up with to handle this is to be able to make it only add suggestions and add errors/warnings when there are types in the component that is invoked with incorrect args.
Right now when we enable typed templates we get tons of errors in all our 900+ hbs files.
@emattias fast case - using patch-package, or hands - add explict return from this function https://github.com/lifeart/els-addon-typed-templates/blob/master/dist/src/index.js#L28 like
lintFile() {
return [];
}
or change hasLinter
from false
to true
;
https://github.com/lifeart/els-addon-typed-templates/blob/master/dist/src/index.js#L25
and It will disable linting issues,
in long term, I was trying to figure out how to add support for addons configuration
@emattias if you need programmatic solution, you can create your own addon, set it's initialization order after els-addon-typed-templates
, and remove linter created by addon using
package.json
{
"ember-language-server": {
"entry": "./index"
},
"ember-addon": {
"after": "els-addon-typed-templates"
}
}
/// index.js
module.exports = {
onInit((server,project)=>{
project.linters.pop();
});
}
.d.ts
files for components/controllers