Skip to content

ci: Rename ESLint script & add autofix script

Paul Gascou-Vaillancourt requested to merge eslint-npm-scripts into master

What does this MR do?

This simply renames the NPM lint script to eslint, and it also adds a eslint:fix script to run ESLint with --autofix.

Why is this needed?

It's not but it would make it clearer what the script actually does (ie run ESLint).

In the future, we might need some stylelint scripts since we're currently working on including CSS in gitlab-ui. When that happens, we could re-add a lint script that runs both stylelint and eslint (and possibly even prettier).

FWIW, gitlab has a eslint script, so being consistent with CE/EE might be an argument in favor of this change. If it comes down to consistency, eslint:fix should probably be renamed to eslint-fix but let's consider the : notation which is pretty popular in the NPM ecosystem.

What now?

Nothing urgent here, if we decide this change is not needed, I won't mind closing this MR. Just wanted to gather some opinions since everything starts with a Merge Request now.

Edited by Paul Gascou-Vaillancourt

Merge request reports