[Solved] Error Mixed spaces and tabs no-mixed-spaces-and-tabs

"extensions": "eslint: Recommended" the attribute in the configuration file enables this rule.

Most code conventions require tabs or spaces for indentation. Therefore, if a single line code is indented with tabs and spaces, an error usually occurs.

This rule does not allow indenting with mixed spaces and tabs.

Example of error code for this rule:

/*eslint no-mixed-spaces-and-tabs: "error"*/

function add(x, y) {
// --->..return x + y;

      return x + y;
}

function main() {
// --->var x = 5,
// --->....y = 7;

    var x = 5,
        y = 7;
}

Example of the correct code for this rule:

/*eslint no-mixed-spaces-and-tabs: "error"*/

function add(x, y) {
// --->return x + y;
    return x + y;
}

This rule has a string option.

"smart tabs" when the latter is used for alignment, it is allowed to mix space and labels.

Smart tag

The correct code example for this rule includes the following "smart tabs" Options:

/*eslint no-mixed-spaces-and-tabs: ["error", "smart-tabs"]*/

function main() {
// --->var x = 5,
// --->....y = 7;

    var x = 5,
        y = 7;
}

Add this line:

/*eslint no-mixed-spaces-and-tabs: [“error”, “smart-tabs”]*/


<template>
	<comp-setup>
		
	</comp-setup>
</template>

<script>
/*eslint no-mixed-spaces-and-tabs: ["error", "smart-tabs"]*/
import CompSetup from './components/setupview'
export default {
  name: 'App',
  components: {
	  CompSetup,
  }
}
</script>

<style>

</style>


Read More: