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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add auto-fix of misspelled falsey to falsy #229

Merged
merged 8 commits into from
May 17, 2019

Conversation

GMartigny
Copy link
Contributor

fix #190

@GMartigny
Copy link
Contributor Author

GMartigny commented Mar 29, 2019

Hi,

It feels like this should be in a separate rule as this is the only error "fixable".

The error message could be better, but I've gone with simplicity.

  • Still need to update the documentation

@novemberborn
Copy link
Member

Thanks for all your PRs @GMartigny!

It feels like this should be in a separate rule as this is the only error "fixable".

@sindresorhus?

test/use-t-well.js Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Member

sindresorhus commented Apr 30, 2019

You need to update the readme and rule docs to indicate it's fixable.

In the rule docs, you can clarify exactly what is fixable.

@sindresorhus
Copy link
Member

It feels like this should be in a separate rule as this is the only error "fixable".

I think it's fine to keep it in this rule.

@sindresorhus sindresorhus changed the title Add auto-fix of misspelled 'falsey' to 'falsy' Add auto-fix of misspelled falsey to falsy Apr 30, 2019
@sindresorhus
Copy link
Member

It feels like this should be in a separate rule as this is the only error "fixable".

code: testCase('t.deepEqual.skip.skip(a, a);'),
errors: [error('Too many chained uses of `skip`.')]
could potentially be fixable too.

@GMartigny
Copy link
Contributor Author

You need to update the readme and rule docs to indicate it's fixable.

I updated the readme.md, but other fixable rules (no-only-test, no-skip-test) doc don't mention they are fixable.
What could be added to better communicate the fixable state ?

@sindresorhus
Copy link
Member

I updated the readme.md, but other fixable rules (no-only-test, no-skip-test) doc don't mention they are fixable.

That's just an oversight. Would you be willing to fix those in a separate PR?

@sindresorhus
Copy link
Member

What could be added to better communicate the fixable state ?

Explain what's fixable in the rule docs. Example: https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prevent-abbreviations.md#prevent-abbreviations

@sindresorhus
Copy link
Member

Explain what's fixable in the rule docs. Example: sindresorhus/eslint-plugin-unicorn:docs/rules/prevent-abbreviations.md@master#prevent-abbreviations

@GMartigny Can you add this to the rule documentation for this rule so this PR can be merged?

@sindresorhus sindresorhus merged commit 9ec0565 into avajs:master May 17, 2019
@GMartigny GMartigny deleted the autofixFalsey branch May 17, 2019 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-fix falsey to falsy in the use-t-well rule
3 participants