wearerequired / lint-action

✨ GitHub Action for detecting and auto-fixing lint errors
MIT License
551 stars 130 forks source link

ESlint usage incompatible with `eslint.config.js` #788

Open NoiSek opened 2 months ago

NoiSek commented 2 months ago

This action's default usage of --ext when using the eslint linter prevents the action from running when using the modern eslint.config.js flat file configuration.

This problem seems to have been highlighted by three other parties in #730, #739, and #759 but those issues were not addressed.

If there is no critical reason that this can't be updated, please keep this one open for discussion if possible. I would be happy to PR a fix for this myself if there are no major obstacles or objections.

rkuykendall commented 1 week ago

I think this may be a fix: https://github.com/wearerequired/lint-action/pull/799

I just had it only use ext if the argument is passed in.

I can't tell how to test it or use it on my own repo though.

rkuykendall commented 1 week ago

I figured out how to use it in my repo but now I can't figure out how to make eslint_extensions optional.

rkuykendall commented 1 week ago

Also, eslint_extensions defaults to JS, so we may have a problem there. I wonder if using a version check on eslint somehow is a better solution.