Skip to content

Commit

Permalink
[CI] [Lint] [Dashboard] Make frontend linter automatically fix lint i…
Browse files Browse the repository at this point in the history
…ssues (#43515)

When making dashboard frontend changes, the linter outputs things like

`  0 errors and 7 warnings potentially fixable with the `--fix` option.`

This PR adds the `--fix` command to the linter script to automatically fix lint issues when possible.  This is consistent with how the other linters work in the script for non-frontend code.

Signed-off-by: Archit Kulkarni <[email protected]>
  • Loading branch information
architkulkarni committed Mar 11, 2024
1 parent e9dd050 commit a949436
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ci/lint/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ format_frontend() {
local filenames
# shellcheck disable=SC2207
filenames=($(find "${folder}"/src -name "*.ts" -or -name "*.tsx"))
"${folder}/"node_modules/.bin/eslint --max-warnings 0 "${filenames[@]}"
"${folder}/"node_modules/.bin/eslint --fix --max-warnings 0 "${filenames[@]}"
"${folder}/"node_modules/.bin/prettier -w "${filenames[@]}"
"${folder}/"node_modules/.bin/prettier --check "${folder}/"public/index.html
)
Expand Down

0 comments on commit a949436

Please sign in to comment.