Skip to content

Indent rule under script tag #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tronjs opened this issue Nov 30, 2017 · 2 comments
Closed

Indent rule under script tag #266

tronjs opened this issue Nov 30, 2017 · 2 comments

Comments

@tronjs
Copy link

tronjs commented Nov 30, 2017

Tell us about your environment
Windows 10 x64
Webstorm 2017.2

  • ESLint Version: v4.12.0
  • eslint-plugin-vue Version: 4.0.0-beta.0
  • Node Version: v8.9.0

Please show your full configuration:

module.exports = {
   "env": {
      "browser": true,
      "es6": true
   },
   'plugins': ['vue'],
   'extends': [
      'airbnb-base',
      'eslint:recommended',
      'plugin:vue/recommended'
   ],
   "parserOptions": {
      'parser': 'babel-eslint',
      "sourceType": "module"
   },
   "rules": {
      "indent": [
         "error",
         3
      ],
      "linebreak-style": [
         "error",
         "windows"
      ],
      "quotes": [
         "error",
         "single"
      ],
      "semi": [
         "error",
         "always"
      ],
      "vue/max-attributes-per-line": ["error", {
         "singleline": 3,
         "multiline": {
            "max": 3,
            "allowFirstLine": true
         }
      }],
      "vue/html-indent": ["error", 3, {
         "attribute": 1,
         "closeBracket": 0,
         "ignores": []
      }]
   },
};

What did you do? Please include the actual source code causing the issue.

<script>
   export default {
      name: 'VUploader',
      props: {
      [...]

What did you expect to happen?
How I can config the indent rule to indent 3 spaces underneath the script tag? Currently it shows the below error and I must to do this:

<script>
export default {
   name: 'VUploader',
   props: {
   [...]

But I don't want to do that, it looks ugly to me. I prefer everything in first level underneath the script tag should be have the indent. Did I missing any related rules from the docs?

What actually happened? Please include the actual, raw output from ESLint.
32:1 error Expected indentation of 0 spaces but found 3 indent

@mysticatea
Copy link
Member

Thank you for this issue.

It seems a duplicate of #118.

@tronjs
Copy link
Author

tronjs commented Nov 30, 2017

Oh thank you. I should close this issue and waiting for the next version

@tronjs tronjs closed this as completed Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants