Skip to content

Some rules are not fixable #379

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
casprwang opened this issue Feb 5, 2018 · 4 comments
Closed

Some rules are not fixable #379

casprwang opened this issue Feb 5, 2018 · 4 comments
Labels

Comments

@casprwang
Copy link

Tell us about your environment
OSX

  • ESLint Version:
    4.17.0
  • eslint-plugin-vue Version:
    4.0.0
  • Node Version:
    9.3
    Please show your full configuration:
// https://eslint.org/docs/user-guide/configuring

module.exports = {
  root: true,
  parserOptions: {
    parser: 'babel-eslint',
  },
  env: {
    browser: true,
  },
  // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
  // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
  extends: ['plugin:vue/strongly-recommended'],
  // required to lint *.vue files
  plugins: [
    'vue',
  ],
  // add your custom rules here
  rules: {
    // allow debugger during development
    "indent": [0, 2],
    "linebreak-style": ["error", "unix"],
    "quotes": [0, "single"],
    "semi": ["error", "never"],
    "brace-style": [2, "1tbs", {
      "allowSingleLine": true,
    }],
    "curly": [2, "all"],
    "no-console": ["error", {
      "allow": ["warn", "error", "log"],
    }],
    "no-unused-vars": 0,
    "no-empty": [0, "never"],
    "curly": 0,
    "comma-dangle": [2, "always-multiline"],
    "no-constant-condition": [2, {
      "checkLoops": false,
    }],
    "key-spacing": [
      0, {
        "multiLine": {
          "beforeColon": false,
          "afterColon": true,
        },
        "align": {
          "beforeColon": false,
          "afterColon": false,
          "on": "colon",
        },
      },
    ],
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  },
}

What did you do? Please include the actual source code causing the issue.
./node_modules/.bin/eslint --fix

What did you expect to happen?
fixed
What actually happened? Please include the actual, raw output from ESLint.

   9:53  error  Attribute "class" should be on a new line  vue/max-attributes-per-line
  30:50  error  Attribute "class" should be on a new line  vue/max-attributes-per-line
  51:55  error  Attribute "class" should be on a new line  vue/max-attributes-per-line
@casprwang casprwang changed the title Some plugins are not fixable Some rules are not fixable Feb 5, 2018
@mysticatea
Copy link
Member

mysticatea commented Feb 6, 2018

Yeah, not all rules are fixable.
If you want a rule to fix code automatically, please make a concrete proposal for each rule.

@casprwang
Copy link
Author

@mysticatea thanks for responding, do you know if those rules could be fixable in the future, or on a plan?

@mysticatea
Copy link
Member

There is no plan. Changes will come based on issues since issues are consideration or requests on Vue community.

A volunteer works on vue/max-attributes-per-line (#380)

@casprwang
Copy link
Author

Thanks for clarifying, I hope that PR would be merged soon. It would be awesome to fix vue/max-attributes-per-line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants