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

'one-var': separateRequires does not work in consecutive mode #10784

Closed
tarol opened this issue Aug 22, 2018 · 1 comment · Fixed by #10886
Closed

'one-var': separateRequires does not work in consecutive mode #10784

tarol opened this issue Aug 22, 2018 · 1 comment · Fixed by #10886
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 rule Relates to ESLint's core rules

Comments

@tarol
Copy link

tarol commented Aug 22, 2018

Tell us about your environment

  • **ESLint Version:**5.3.0
  • **Node Version:**8.11.3
  • **npm Version:**6.2.0

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

Please show your full configuration:

Configuration
module.exports = {
  env: {
    browser: true,
    commonjs: true,
    es6: true,
    node: true,
    jest: true
  },
  parser: 'babel-eslint',
  rules: {
    'one-var': [2, { var: 'consecutive', let: 'consecutive', const: 'consecutive', separateRequires: true }],
  }
};

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

const foo = require("foo");
const bar = "bar";

What did you expect to happen?
no error
What actually happened? Please include the actual, raw output from ESLint.
[eslint] Combine this with the previous 'const' statement. (one-var)

@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Aug 22, 2018
@ilyavolodin ilyavolodin 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 and removed triage An ESLint team member will look at this issue soon labels Aug 22, 2018
@ilyavolodin
Copy link
Member

I can reproduce this issue. Seem like a bug to me. It looks like const: 'consecutive' takes priority.

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Mar 28, 2019
@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 Mar 28, 2019
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 rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants