Closed Kydyralin closed 3 years ago
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....
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 :smile:. 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!
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?
then again: encodingRule in ts is so simple, maybe I could actually try to write a rule myself as an exercise
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.
💥 Missing Converter
tslint-to-eslint-config
version: 2.0.0-beta5typescript-eslint
version: 4.7.0TSLint 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.