Add --fix option
See original GitHub issueIn some error cases, the linter can programmatically know what the schema should have been.
It would be awesome to provide a --fix
option that would automatically resolve these errors.
Some example rules that could be fixed by the linter this way:
EnumValuesAllCaps
EnumValuesSortedAlphabetically
FieldsAreCamelCased
InputObjectValuesAreCamelCased
TypesAreCapitalized
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:22 (7 by maintainers)
Top Results From Across the Web
How to run eslint --fix from npm script - Stack Overflow
You can run below command: npm run lint -- --fix.
Read more >Command Line Interface - ESLint - Pluggable JavaScript Linter
This option allows you to specify the type of fixes to apply when using either --fix or --fix-dry-run . Argument Type: String. One...
Read more >NPM — How to Run ESLint --fix From npm Script - Future Studio
Run ESLint --fix From npm Script. You can pass along CLI flags to your npm commands. You must add two dashes after your...
Read more >Add a --fix option for no-tabs #6980 - eslint/eslint - GitHub
I'm using Node v6.4.0 and ESLint v3.3.1. I think it would be useful to have an autofix option for the no-tabs rule.
Read more >How to Use ESLint "fix": Options, Issue Types, Exit Codes, and ...
eslint --fix --fix-type enables targeting of specific categories of issues to fix. We'll discuss the types in more detail below, but an example ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @bbohen!
No promises but I’ll try to get a rough copy up and then we can iterate 🙂
@cjoudrey - I’ll wait to see what @bbohen says