Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

[indent] Decorator indent error #143

Closed
atos1990 opened this issue Jul 11, 2018 · 3 comments
Closed

[indent] Decorator indent error #143

atos1990 opened this issue Jul 11, 2018 · 3 comments
Labels
bug/incomplete rule requires investigation bug that require more investigation

Comments

@atos1990
Copy link

Hi guys!
I have some problems with Eslint rule "Indent". When I try apply this rule on follow class:

@Component({
    props: {
        a: String
    }
})
export default class Test extends Vue {

    test() {
        console.log('Test');
    }
}

as a result I get

@Component({
    props: {
    a: String
    }
    })
export default class Test extends Vue {

    test() {
        console.log('Test');
    }
}

Anyone know how fix this problem?
Thank you!

@JFGHT
Copy link

JFGHT commented Jul 25, 2018

Yep, having the same issue here.

@yedeying
Copy link

same issue here, are there any solution?

@IgorSzymanski
Copy link

IgorSzymanski commented Aug 19, 2018

Same for me. Looks ugly.

@Component({
	components: {
	ErrorPage: () => import('@/components/ErrorPage.vue'),
	},
	head: {
	titleTemplate(title) {
	if (title) {
	return `${title}`
	}
	return 'Title'
	},
	htmlAttrs: {
	lang: 'en',
	},
	meta: [
	{ charset: 'utf-8' },
	{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
	],
	},
	})
export default class App extends Vue 
{
	get error() 
	{
		return this.$store.state.errorHandler.error
	}
}

My .eslintrc.json file:

{
  "root": true,
  "env": {
    "browser": true,
    "es6": true,
    "node": true
  },
  "extends": [
    "@vue/typescript",
    "plugin:vue/essential"
  ],
  "parser": "vue-eslint-parser",
  "parserOptions": {
    "parser": "typescript-eslint-parser",
    "sourceType": "module"
  },
  "plugins": [
    "babel",
    "typescript"
  ],
  "rules": {
    "semi": "off",
    "babel/semi": [
      "error",
      "never"
    ],
    "no-extra-semi": "error",
    "no-extra-parens": "error",
    "no-regex-spaces": "error",
    "curly": "error",
    "object-curly-newline": [
      "error",
      {
        "multiline": true
      }
    ],
    "object-curly-spacing": [
      "error",
      "always"
    ],
    "dot-location": [
      "error",
      "object"
    ],
    "dot-notation": "error",
    "no-else-return": "error",
    "no-alert": "error",
    "no-floating-decimal": "error",
    "brace-style": [
      "warn",
      "allman"
    ],
    "array-bracket-newline": [
      "error",
      {
        "multiline": true
      }
    ],
    "array-bracket-spacing": [
      "error",
      "never"
    ],
    "array-element-newline": [
      "error",
      {
        "multiline": true
      }
    ],
    "block-spacing": "error",
    "comma-dangle": [
      "error",
      "always-multiline"
    ],
    "comma-spacing": [
      "error",
      {
        "before": false,
        "after": true
      }
    ],
    "comma-style": [
      "error",
      "last"
    ],
    "computed-property-spacing": [
      "error",
      "never"
    ],
    "eol-last": "error",
    "func-call-spacing": [
      "error",
      "never"
    ],
    "function-paren-newline": [
      "error",
      {
        "minItems": 3
      }
    ],
    "indent": [
      "error",
      "tab"
    ],
    "quotes": [
      "error",
      "single"
    ],
    "no-multi-spaces": "error",
    "key-spacing": [
      "error",
      {
        "align": {
          "on": "value"
        }
      }
    ]
  }
}

@bradzacher bradzacher changed the title Decorator indent error [indent] Decorator indent error Nov 16, 2018
@bradzacher bradzacher added bug/incomplete rule requires investigation bug that require more investigation labels Nov 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/incomplete rule requires investigation bug that require more investigation
Projects
None yet
Development

No branches or pull requests

5 participants