Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how to avoid indentation problem with ESlint?

I hadn`t had this problem before I started using Vue 3 with ESlint. But now anytime I run my code I get multiple errors like:

C:\Users\Acer\Desktop\salam\src\views\HomeView.vue
2:1  error  Unexpected tab character  no-tabs
3:1  error  Unexpected tab character  no-tabs
4:1  error  Unexpected tab character  no-tabs
5:1  error  Unexpected tab character  no-tabs
6:1  error  Unexpected tab character  no-tabs		

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

C:\Users\Acer\Desktop\salam\src\views\Login.vue 2:1 error Unexpected tab character no-tabs 3:1 error Unexpected tab character no-tabs 4:1 error Unexpected tab character no-tabs 10:1 error Unexpected tab character no-tabs 10:1 error Expected indentation of 2 spaces but found 1 tab indent 10:8 error Component name "Login" should always be multi-word vue/multi-word-component-names 11:1 error Unexpected tab character no-tabs 11:1 error Expected indentation of 2 spaces but found 1 tab indent 12:1 error Unexpected tab character no-tabs 12:1 error Expected indentation of 4 spaces but found 2 tabs indent 13:1 error Unexpected tab character no-tabs 13:1 error Expected indentation of 2 spaces but found 1 tab indent 15:10 error Newline required at end of file but not found eol-last

✖ 18 problems (18 errors, 0 warnings) 5 errors and 0 warnings potentially fixable with the --fix option.

How can I disable this nasty feature of ESlint. How to make it not to pay attention to indentation or what is wrong my indentation and how can I make it correct…

>Solution :

If you want to turn off tab character.You can open the .eslintrc.js file and add a line rule.

rules: {
  'no-tabs': 'off'
}

But if you have just had enough, you can remove eslint from your project altogether.

This takes a few steps but it isn’t too difficult:

  • Delete .eslintrc.js file and .eslintignore file in your project
  • In your package.json, find and delete any dependencies which include eslint in the name
  • Remove any eslint configuration files, including any eslint configuration in package.json
  • Re-run npm install or yarn to clean up your project
  • Check any webpack configs for eslint loaders and references and delete those
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading