-1

I'm trying to eliminate all the semi-colons of my Vue project and I've searched how to do it with eslint command line. I've fount this pattern :

eslint --no-eslintrc --fix --rule 'rule definition here'

However, I've tried different implementations with no success :

1) eslint --no-eslintrc --fix --rule 'semi: false'
2) eslint --no-eslintrc --fix --rule 'semi: 0'
3) eslint --no-eslintrc --fix --rule 'semi: 0' .
3) eslint '**/*.{js,vue,ts}' --no-eslintrc --fix --rule 'semi: 0'
3) eslint --no-eslintrc --fix --rule 'semi: ['error','never']'

It seems I still didn't come across the right sintaxis.

Any idea on this?

Thank you in advance for your suggestions,

PS: I have errors like : ESLint: 8.57.1 No files matching the pattern "['error','never']'" were found. Please check for typing mistakes in the pattern. or ESLint: 8.57.1 No files matching the pattern "0'" were found. Please check for typing mistakes in the pattern.

1 Answer 1

0

Finally, I came up with this command :

(using parsers to recognize nuxt vue and typescript languages)

"fix-one-rule": "eslint --fix --parser vue-eslint-parser --parser-options \"{'parser': '@typescript-eslint/parser'}\" --rule \"{'semi': ['error', 'never']}\""

this one didn't show any console error, however it didn't fix the semi-commas neither, so I decided just to use the Eslint extension, hover to one of this warnings and inside the Quick-fix, just select correct all instances of this error in this page. It is not optimal because I need to go through all the files of the project, but it is one option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.