Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider rewriting ember-template-lint as an ESLint language plugin #2741

Open
bmish opened this issue Dec 7, 2022 · 5 comments
Open

Consider rewriting ember-template-lint as an ESLint language plugin #2741

bmish opened this issue Dec 7, 2022 · 5 comments

Comments

@bmish
Copy link
Member

bmish commented Dec 7, 2022

The ESLint language plugin proposal was only just released: eslint/rfcs#99

But matching ESLint's behavior/functionality has been one of our long-term goals, and a direction we've been moving in for a while.

We should evaluate whether the ESLint proposal meets our needs and whether it would be practical and beneficial to use an ESLint language plugin under the hood.

Please comment on whether you think this is a good idea or not, even possible, or potential issues it could run into. Add a plus one vote emoji is you agree.

Requirements:

Related:

Disclaimer: this ESLint language plugin feature isn't likely to be ready for a while. ember-template-lint is also very large (100+ rules) and has very limited maintainer bandwidth for any potential migration. In the mean time, we should continue our efforts to match ESLint behavior/functionality to prepare for any such migration.

@chriskrycho
Copy link
Contributor

Extremely yes please. (cc. @gabrielcsapo!) This will make it much easier for us to have template linting integrated with editors, without needing custom language server implementation. Additionally, it feels like a significant gap not to have it when using .gjs/.gts files!

@gabrielcsapo
Copy link
Contributor

+100000, thanks for the cc @chriskrycho 🙌

@grconrad
Copy link

grconrad commented Dec 7, 2022

+1

1 similar comment
@colenso
Copy link

colenso commented Mar 1, 2023

👍

@patricklx
Copy link

patricklx commented May 24, 2023

i've made a eslint-plugin for this: https://github.com/patricklx/eslint-plugin-ember-template-lint
it can also run on hbs and gts/gjs files and apply fixes.
It currently uses synckit, like prettier does, because ember-template-lint uses esm.
eslint already support a new config file that supports esm, but didnt investigate into that.
note that ember-template-lint actually already supports gts/gjs, what the eslint plugin does on top is also to check the scope to validate the no-implicit-this message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants