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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing tslint rule: encoding #826

Closed
Kydyralin opened this issue Nov 14, 2020 · 5 comments
Closed

Missing tslint rule: encoding #826

Kydyralin opened this issue Nov 14, 2020 · 5 comments
Labels
area: missing converter A rule converter should exist but doesn't yet. status: blocked We can't make progress on this issue until something else is resolved...

Comments

@Kydyralin
Copy link

馃挜 Missing Converter

  • tslint-to-eslint-config version: 2.0.0-beta5
  • typescript-eslint version: 4.7.0

TSLint Rule Name

encoding

Package Source

TSLint rule: https://palantir.github.io/tslint/rules/encoding/

I've tried to google for some alternative on ESLint but unfortunately didn't find any. Not sure how many people rely on this rule but since there is still no converter issue for this I've decided to create one. Also not sure if this rule is even applicable for ESLint. If so please let me know, I'd really appreciate it.

@kbrilla
Copy link
Contributor

kbrilla commented Nov 15, 2020

I propose a combination of this tool: eclint with setting UTF-8 in .editorconfig as a notice until a proper rule will appear, or just a notice to use the tool in hook, or lint staged, etc....

@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Nov 15, 2020

Thanks for filing @Kydyralin! Indeed, I don't see anything on Google or https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/ROADMAP.md for the old encoding rule. Adding support for a non-ESLint linter is out of scope for tslint-to-eslint-config so I'm afraid this issue is going to have to be a 'wontfix' for now.

FWIW I have never seen a time when the encoding rule actually enforced anything, so it's not surprising to me that no equivalent exists in ESLint 馃槃. If the ESLint community does end up creating an equivalent rule that has a nontrivial number of npm downloads, do post here and we can reopen!

@JoshuaKGoldberg JoshuaKGoldberg added area: missing converter A rule converter should exist but doesn't yet. status: blocked We can't make progress on this issue until something else is resolved... labels Nov 15, 2020
@kbrilla
Copy link
Contributor

kbrilla commented Nov 15, 2020

There actually is a rule that enforces some rules based on .editorconfig: eslint-plugin-editorconfig but there is no rule for charset. Maybe make an issue/PR there @Kydyralin?

@kbrilla
Copy link
Contributor

kbrilla commented Nov 15, 2020

then again: encodingRule in ts is so simple, maybe I could actually try to write a rule myself as an exercise

@Kydyralin
Copy link
Author

There actually is a rule that enforces some rules based on .editorconfig: eslint-plugin-editorconfig but there is no rule for charset. Maybe make an issue/PR there @Kydyralin?

Thanks for the notice. I've looked into the plugin repo. Probably it's really more reasonable to create an issue there since the charset property in the .editorconfig file and encoding tslint rule correlate with each other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: missing converter A rule converter should exist but doesn't yet. status: blocked We can't make progress on this issue until something else is resolved...
Projects
None yet
Development

No branches or pull requests

3 participants