Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
fix(eslint-plugin): [naming-convention] cover case that requires quotes#4582
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nx-cloudbot commentedFeb 22, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thanks for the PR,@lonyele! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitorsper day. |
netlifybot commentedFeb 22, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✔️ Deploy Preview fortypescript-eslint ready! 🔨 Explore the source changes:c0b4b29 🔍 Inspect the deploy log:https://app.netlify.com/sites/typescript-eslint/deploys/621e226a702a2900080846e1 😎 Browse the preview:https://deploy-preview-4582--typescript-eslint.netlify.app |
codecovbot commentedFeb 22, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## main #4582 +/- ##==========================================+ Coverage 92.41% 94.41% +1.99%========================================== Files 350 151 -199 Lines 12059 8229 -3830 Branches 3430 2623 -807 ==========================================- Hits 11144 7769 -3375+ Misses 642 262 -380+ Partials 273 198 -75
Flags with carried forward coverage won't be shown.Click here to find out more. |
lonyele commentedFeb 22, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
hm... it took some time after the comment because I was trying to fix the playground but failed... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Source code looks great, thanks@lonyele!
Just requesting changes on a bit more test coverage please.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM - thanks heaps for this!
@JoshuaKGoldberg feel free to merge if you're happy too 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yup, looks great to me - thanks!
alfaproject commentedMar 8, 2022
Oh man, this got really noisy in our projects. We work with a lot of external APIs and data sources and some of them use all kind of characters like #, @, even spaces So, we basically quote those properties so that we bypass naming conventions but now that stopped working. Can we add a an option to ignore quoted properties? There's a reason they are quoted to begin with ): |
Oh god... I hear you. If maintainers agree with it. I'll make a PR that makes this an option |
alfaproject commentedMar 8, 2022
That would be awesome |
fmal commentedMar 8, 2022
@lonyele@alfaproject this becomes especially annoying with selectors when you use some css-in-js: I don't want to add |
alfaproject commentedMar 8, 2022
Yeah that's another good use case to disable quoted properties |
No need for an option - the rule is already designed to support this and it's already documented in the rule docs: |
alfaproject commentedMar 8, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Oh I was using filter to work around it. Didn't realise there was that modifier. Sorry for the noise, I'll give it a try (the filters are my work-around for other quoted properties but I was hoping to get rid of them) |
A |
This PR contains the following updates:| Package | Type | Update | Change ||---|---|---|---|| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) | devDependencies | minor | [`5.13.0` -> `5.14.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/5.13.0/5.14.0) || [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint) | devDependencies | minor | [`5.13.0` -> `5.14.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/5.13.0/5.14.0) |---### Release Notes<details><summary>typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin)</summary>### [`v5.14.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#​5140-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5130v5140-2022-03-07)[Compare Source](typescript-eslint/typescript-eslint@v5.13.0...v5.14.0)##### Bug Fixes- **eslint-plugin:** \[naming-convention] cover case that requires quotes ([#​4582](typescript-eslint/typescript-eslint#4582)) ([3ea0947](typescript-eslint/typescript-eslint@3ea0947))- **eslint-plugin:** \[no-misused-promises] factor thenable returning function overload signatures ([#​4620](typescript-eslint/typescript-eslint#4620)) ([56a09e9](typescript-eslint/typescript-eslint@56a09e9))- **eslint-plugin:** \[prefer-readonly-parameter-types] handle class sharp private field and member without throwing error ([#​4343](typescript-eslint/typescript-eslint#4343)) ([a65713a](typescript-eslint/typescript-eslint@a65713a))- **eslint-plugin:** \[return-await] correct autofixer in binary expression ([#​4401](typescript-eslint/typescript-eslint#4401)) ([5fa2fad](typescript-eslint/typescript-eslint@5fa2fad))##### Features- **eslint-plugin:** \[no-misused-promises] add granular options within `checksVoidReturns` ([#​4623](typescript-eslint/typescript-eslint#4623)) ([1085177](typescript-eslint/typescript-eslint@1085177))</details><details><summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary>### [`v5.14.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#​5140-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5130v5140-2022-03-07)[Compare Source](typescript-eslint/typescript-eslint@v5.13.0...v5.14.0)**Note:** Version bump only for package [@​typescript-eslint/parser](https://github.com/typescript-eslint/parser)</details>---### Configuration📅 **Schedule**: At any time (no schedule defined).🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.--- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.---This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).Co-authored-by: cabr2-bot <cabr2.help@gmail.com>Reviewed-on:https://codeberg.org/Calciumdibromid/CaBr2/pulls/1201Reviewed-by: 6543 <6543@noreply.codeberg.org>Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
philip-firstorder commentedMar 10, 2022
I think this should have been released to a major version, it currently broke our pipelines linting stages and we had no idea what caused this. |
Thus we see the great dislike from language, linter, and similar teams for the illusion of semantic versioning. Pretty much any logical change to a lint rule could be seen as a "breaking" change. Covering cases that previously weren't checked -both in the case of a bugfix and a lacking feature- breaks users who upgrade. If we released a major version every time one of these changes was released and wanted users to receive those updates at any reasonable cadence, we'd have to release a new major version every month and still be shipping dozens of breaking changes per version.
General good practice & our recommendation is to lock your dependencies to a fixed version, such as with a fixed range in a Happy to move this discussion to a new issue if you think I'm wrong about either of those things and we should reevaluate our release strategy! |
Definitely agree on the lock file - you should be using the same versions in dev as you do on your CI. If the two are running different versions then you're in for a bad time! And strong agree on the versioning. Fixing a bug which uncovers cases that previously weren't caught is not what we define as a breaking change. For us breaking changes are pretty much only for cases where config needs to change. It's similar to why TS doesn't follow semver - because it's impossible to change a lint rule without changingint results. As per our contributing guidelines, we prefer to not have discussions on closed PRs because they're not easily searchable. |
PR Checklist
Overview
Report errors if it needs quotes