Skip to content
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

Version 3.9.0 may have broken multiline array indentation with a chained method call #7484

Closed
ianlyons opened this issue Oct 30, 2016 · 1 comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly patch candidate This issue may necessitate a patch release in the next few days regression Something broke rule Relates to ESLint's core rules

Comments

@ianlyons
Copy link

Tell us about your environment
Using eslint through grunt-eslint, which depends on "eslint": "^3.0.0", per its package.json. This reproduces on multiple operating systems; let me know if I should be more specific here.

  • ESLint Version:
    3.9.0
  • Node Version:
    4.4.0
  • npm Version:
    2.14.20

What parser (default, Babel-ESLint, etc.) are you using?
default

Please show your full configuration:
Note that there is a custom plugin, but it shouldn't in any way impact this functionality.


{
  "root": true,
  "ecmaVersion": 6,
  "parser": "espree",
  "plugins": ["blend"],
  "env": {
    "node": true,
    "mocha": true,
    "es6": true
  },
  "rules": {
    "no-eval": 2,
    "no-constant-condition": 1,
    "no-unused-expressions": 1,
    "no-loop-func": 2,
    "no-process-env": 1,
    "no-var": 2,
    "quotes": [2, "single", {
      "allowTemplateLiterals": true
    }],
    "handle-callback-err": 2,
    "no-path-concat": 2,
    "default-case": 2,
    "indent": [2, 2],
    "block-scoped-var": 2,
    "no-self-compare": 2,
    "no-redeclare": 2,
    "quote-props": [2, "as-needed"],
    "blend/lodash-arity": 2,
    "blend/collapse-trivial-function": 2,
    "blend/provide-no-return-value": 2,
    "blend/lodash-use-object-predicate": 2,
    "blend/lodash-map-predicate": 2,
    "camelcase": [2, { "properties": "never" }],
    "semi": 2,

    // imported from JSHint
    "no-undef": 2,
    "eqeqeq": [2, "smart"],
    "guard-for-in": 2,
    "wrap-iife": [2, "any"],
    "no-use-before-define": 2,
    "linebreak-style": 2,
    "comma-style": [2, "last"],
    "no-new": 2,
    "strict": [2, "safe"],
    "max-depth": [2, 4],
    "no-bitwise": 2,
    "no-caller": 2,
    "no-unused-vars": [2, {
        "args": "none"
    }],
    "max-len": [2, {
        "code": 120,
        "ignoreComments": true,
        "ignoreStrings": true,
        "ignoreTemplateLiterals": true
    }],
    "no-cond-assign": [2, "except-parens"],

    // imported from JSCS
    "space-infix-ops": 2,
    "keyword-spacing": 2,
    "array-bracket-spacing": [2, "never"],
    "space-in-parens": [2, "never"],
    "key-spacing": [2, {
      "beforeColon": false,
      "afterColon": true,
      "mode": "minimum"
    }],
    "space-unary-ops": [2, {
      "words": false,
      "nonwords": false
    }],
    "no-trailing-spaces": 2,
    "brace-style": [2, "1tbs", {
      "allowSingleLine": true
    }],
    "eol-last": 2,
    "space-before-blocks": [2, "always"],
    "no-mixed-spaces-and-tabs": 2,
    "no-multiple-empty-lines": [2, { "max": 1 }],
    "one-var": [2, "never"],
    "space-before-function-paren": [2, "never"],
    "no-spaced-func": 2,
    "arrow-parens": [2, "as-needed"],
    "object-curly-spacing": [2, "always"],
    "no-dupe-keys": 2,
    "prefer-const": [2, { "destructuring": "all" }],
    "no-const-assign": 2,
    "no-extra-semi": 2,
    "arrow-body-style": [2, "as-needed"],
    "prefer-template": 2,
    "template-curly-spacing": [2, "never"]
  }
}

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

const fn = function(events) {
  return IfThen(
    'If in review go to review',
    [{
      type: conditionTypes.FIELD_RESPONSE,
    }],
    [{
      property: 'property'
    }].concat(events)
  );
};

What did you expect to happen?
I expected this to be valid.

What actually happened? Please include the actual, raw output from ESLint.

  73:5  error  Expected indentation of 2 spaces but found 4  indent
@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Oct 30, 2016
@not-an-aardvark not-an-aardvark added bug ESLint is working incorrectly rule Relates to ESLint's core rules accepted There is consensus among the team that this change meets the criteria for inclusion regression Something broke and removed triage An ESLint team member will look at this issue soon labels Oct 30, 2016
@not-an-aardvark
Copy link
Member

Thanks, I can reproduce this.

@not-an-aardvark not-an-aardvark added the patch candidate This issue may necessitate a patch release in the next few days label Oct 30, 2016
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly patch candidate This issue may necessitate a patch release in the next few days regression Something broke rule Relates to ESLint's core rules
Projects
None yet
Development

No branches or pull requests

3 participants