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
feat(eslint-plugin-tslint): add fixer for config rule #1342
feat(eslint-plugin-tslint): add fixer for config rule #1342
Conversation
Thanks for the PR, @johnwiseheart! 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 on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day. |
Hmm, its unclear to me what I need to do to fix the snapshots. The original commit was red and I tried to fix it, but looks like I fixed it wrong. |
@johnwiseheart there should not be first run failed due to integration test not unit test see - "fixableErrorCount": 0,
+ "fixableErrorCount": 1,
...
Object {
"column": 20,
"endColumn": 20,
"endLine": 1,
+ "fix": Object {
+ "range": Array [
+ 19,
+ 19,
+ ],
+ "text": ";",
+ },
"line": 1,
"message": "Missing semicolon (tslint:semicolon)",
"messageId": "failure",
"nodeType": null,
"ruleId": "@typescript-eslint/tslint/config",
"severity": 2,
}, you can execute this test localy by running (this requires you to install docker: https://docs.docker.com/compose/install/) docker-compose -f tests/integration/docker-compose.yml up --build --abort-on-container-exit typescript-and-tslint-plugins-together |
Hmm, it looks like this time it failed for unrelated reasons. Tried running things locally, but because of my network it doesn't work by default (I have a self-signed cert in the chain) so hopefully rerunning it will be faster than my trying to figure that out. |
ok, restarted, for some reason it failed on downloading node 11 😕 |
Codecov Report
@@ Coverage Diff @@
## master #1342 +/- ##
==========================================
+ Coverage 93.94% 93.94% +<.01%
==========================================
Files 131 131
Lines 5860 5865 +5
Branches 1661 1662 +1
==========================================
+ Hits 5505 5510 +5
Misses 188 188
Partials 167 167
|
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.
seems like a good idea.
LGTM - thanks for this!
Sweet, good to merge from my end! Don't think I have permissions, so would appreciate it if you could hit the button 😄 |
sorry, forgot to hit it after waiting for the CI to finish |
Fixes: #1340
Add a fixer for the tslint config rule.
This was easier than expected - maybe I'm missing something? I'm not convinced this is tested enough, please give me any suggestions you have. I could maybe add an additional test for the
prefer-const
rule, which has a tslint fixer.