-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Lint using putout part 3 #3269
Lint using putout part 3 #3269
Conversation
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.
Great work, your tools seems to be quite capable 👍 . Nothing to mock about from my side.
Edit:
Ok lemme re-phrase that - your tool seems to make a really great job in transpiling and finding code smells/errors. Maybe you should think about promoting it to other tools like linters/babel, so they can directly benefit from its capabilities?
@@ -45,7 +45,7 @@ describe('FitAddon', () => { | |||
|
|||
describe('proposeDimensions', () => { | |||
afterEach(async () => { | |||
return unloadFit(); | |||
return await unloadFit(); |
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.
Wow - did your tool find that on its own? Just wondering, because not awaiting a promise might create bigger havoc and normally would qualify as a coding error (though not sure if thats the case here, did not look up the code).
If your tool is capable to find those things it has true benefits. 👍
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.
Yes :), the rule is promises/add-return-await, what it does is looking for declarations of functions
and if it is async
, it adds await
.
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.
Looks good, love the for ... of
changes as I've come to dislike forEach
greatly 🙂
Thank you :), I'm using it a lot for all my projects, and want it to be useful for community as much as possible :).
module.exports.replace = () => ({
'if (__a?.__b) {__a.__b(__args)}': '__a?.__b(__args)',
}); Also it calls So, because Also Anyways for
Nice :), same with me, |
The main reason for me is debugging |
After successfully merged linting sessions part1 and part2, the time is come for part 3 :).
Any rule can be disabled.
Command used:
Applied rules:
Current config for putout v16: