Skip to content

Add a npm command to automatically fix the potentially fixable errors#1459

Merged
ocean90 merged 1 commit into
GlotPress:developfrom
amieiro:lint-js-with-fix
Sep 10, 2022
Merged

Add a npm command to automatically fix the potentially fixable errors#1459
ocean90 merged 1 commit into
GlotPress:developfrom
amieiro:lint-js-with-fix

Conversation

@amieiro
Copy link
Copy Markdown
Member

@amieiro amieiro commented Jun 20, 2022

What?

This PR adds a npm command to automatically fix the potentially fixable errors.

Why?

When you execute the npm run lint:js command, sometimes it founds some errors:

image

The output recommends using the --fix parameter to automatically fix the potentially fixable errors.

If you try to use this parameter with the npm run lint:js command, it doesn't work, because it executes the command without the parameter:

image

How?

This PR adds a new command with this new parameter, npm run lint:js-fix, that tries to automatically fix the potentially fixable errors.

Testing Instructions

  1. Add some linting errors in a JavaScript file. E.g., remove the spaces between the brackets and the text.
  2. Execute the npm run lint:js to see the errors.
  3. Execute the new npm run lint:js-fix to see the errors fixed automatically.

Screenshots or screencast

@amieiro amieiro marked this pull request as ready for review June 20, 2022 09:30
Comment thread package.json
@ocean90 ocean90 added this to the 4.0 milestone Sep 10, 2022
@ocean90 ocean90 merged commit a8cbfa9 into GlotPress:develop Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants