3

eslint has an api (docs) that allows lints to provide fixes for a lint error. So by running eslint --fix, issues like missing semi-colons can be fixed automatically.

I couldn't find anything like this for flake8 or pylint.

Is there a Python linter that has an API to build automatic fixes for a lint?

There is a related issue that is asking only about auto fixing formatting issues: How do I automatically fix lint issues reported by pylint?

EDIT:

I'm not interested in formatting specifically. I'm interested in finding an API equivalent to eslint that enables me to build lints and automatic fixes for those lints

cdignam
  • 1,376
  • 1
  • 15
  • 21

0 Answers0