Expected Spaces Not Tabs

  • Is there a way to turn this off? I would prefer to use my common workflow in all my projects which use tabs not spaces, but when I do it in any vue file I get a compile error

  • Admin

    You can change the indent ESLint rule in /.eslintrc > rules. http://eslint.org/docs/rules/indent

  • @packy Did you end up finding a solution? I always use tabs but I spent a couple hours trying to get eslint to accept my tabs and settled for 4 spaces instead of 2.

  • As @rstoenescu said, just edit the .eslintrc.js file in your project to look like this:

    module.exports = {
      root: true,
      parser: 'babel-eslint',
      parserOptions: {
        sourceType: 'module'
      env: {
        browser: true,
      // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
      extends: 'standard',
      // required to lint *.vue files
      plugins: [
      globals: {
        'cordova': true,
        'DEV': true,
        'PROD': true,
        '__THEME': true
      // add your custom rules here
      'rules': {
        // allow paren-less arrow functions
        'arrow-parens': 0,
        'one-var': 0,
        'import/first': 0,
        // allow debugger during development
        'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
        'brace-style': [2, 'stroustrup', { 'allowSingleLine': true }],
        'indent': ['error', 'tab'] // This is the required line to use tabs instead of spaces

    Please note, I copied the whole file, but the only line you need to add is 'indent': ['error', 'tab'] to the rules section.

Log in to reply