-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
Provide a way to enable gjs
/gts
/<template>
tag processing without extending plugin:ember/recommended
#1895
Comments
How often does someone use eslint-plugin-ember without extending from our However, I will note that we previously had a Options:
|
I am not sure about how often, I would say that in this case, it seems like discourse is currently unable to use it because they have legacy syntax that causes the rules to error (I haven't investigated much more). Personally, the idea of a base/minimal config for this kind of stuff seems to make sense. The issue with copy-and-pasting is that the I think exporting the overrides is okay, but it seems a bit unidiomatic for eslint in my experience, and from what I understand that's essentially what the |
It's a fair point that a legacy codebase may want to use a I agree that the solutions of copy-pasting and exposing an individual override are hacky for the reasons you mentioned. Those options could still be useful workarounds if we believed this was a rare, one-off need that we didn't want to officially support nor encourage. If, however, we decide we want to officially support this use case, then yes I agree restoring the |
If you want to proceed with |
If you think that is a good/appropriate solution, happy to open a PR! |
See the comments and the linked issues for additional context. I arbitrarily decided to put the template tag at the top of the class but happy to change that to whatever seems reasonable. ember-cli/eslint-plugin-ember#1895 ember-cli/eslint-plugin-ember#1896
See the comments and the linked issues for additional context. I arbitrarily decided to put the template tag at the top of the class but happy to change that to whatever seems reasonable. ember-cli/eslint-plugin-ember#1895 ember-cli/eslint-plugin-ember#1896
@chancancode is this still an issue? |
It looks like @bmish and @patricklx added back a Maybe @davidtaylorhq or @CvX can confirm if the new setup works for them? |
@chancancode we're now using the overrides: [
{
files: ["**/*.gjs", "**/*.gts"],
parser: "ember-eslint-parser",
},
], |
Excellent, I will close |
These are the eslint config that is required to make
.gjs
/.gts
work out of the box:https://github.com/ember-cli/eslint-plugin-ember/blob/master/lib/config/recommended.js#L21-L38
However, these are currently inside the
plugin:ember/recommended
rules. If a project doesn't extend that config for whatever reason, then it seems like the only option is to find and replicate this in their config. (In this case, if you are curious, I am looking at Discourse, and it seems like they have legacy code that triggers hard parsing errors in some of the rules in recommended.)Is it possible to move this into the plugin itself or otherwise split it out to
plugin:ember/core
or something so that users in that camp won't have to find/understand/maintain the setting? (Not super familiar with how things work in eslint to provide a concrete suggestion, sorry!)The text was updated successfully, but these errors were encountered: