question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

arrow-parens es6 rule

See original GitHub issue

Hi, I’m having this problem when building the project:

/node_modules/eslint-config-airbnb-base/rules/es6.js:
08:39:17.462 	Configuration for rule "arrow-parens" is invalid:
08:39:17.462 	Value "as-needed,[object Object]" has more items than allowed.

Referenced from: /srv/node_modules/proj-conf/[.eslintrc](https://github.com/airbnb/javascript/files/969918/default.eslintrc.txt)
08:39:17.470     at validateRuleOptions (/srv/node_modules/eslint/lib/config/config-validator.js:116:15)
08:39:17.470     at /srv/node_modules/eslint/lib/config/config-validator.js:163:13
08:39:17.470     at Array.forEach (native)
08:39:17.470     at Object.validate (/srv/node_modules/eslint/lib/config/config-validator.js:162:35)
08:39:17.470     at load (/srv/node_modules/eslint/lib/config/config-file.js:523:19)
08:39:17.470     at /srv/node_modules/eslint/lib/config/config-file.js:392:36
08:39:17.470     at Array.reduceRight (native)
08:39:17.470     at applyExtends (/srv/node_modules/eslint/lib/config/config-file.js:363:28)
08:39:17.471     at load (/srv/node_modules/eslint/lib/config/config-file.js:530:22)
08:39:17.471     at /srv/node_modules/eslint/lib/config/config-file.js:392:36
08:39:17.498 error Command failed with exit code 1.

The problem is that the rule is set to “0” and the default is set to [‘error’, ‘as-needed’, { requireForBlockBody: true, }].

Did someone had this problem too? Could someone help me with this issue?

Thank you

PS:

"dependencies": {
    "eslint": "3.19.0",
    "eslint-config-airbnb": "14.1.0",
    "eslint-plugin-import": "2.2.0",
    "eslint-plugin-jsx-a11y": "4.0.0",
    "eslint-plugin-react": "6.10.3"
  }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:19

github_iconTop GitHub Comments

2reactions
flaviumcommented, May 10, 2017

Hi,

I solved the mystery. The problem is sass-lint. Its version of es-lint is ^2.7.0 . Sass-lint installs version 2.13.0 of es-lint witch conflicts with my 3.19.0 version of es-lint. So, I thing this issue can be closed.

Thank you for your support

1reaction
flaviumcommented, May 2, 2017

I did check. Yarn.lock contains the latest dependencies. I deleted yarn.lock, updated dependencies in package json, then install using yarn. A new yarn.lock file was created using the new dependencies. This didn’t solved the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

arrow-parens - ESLint - Pluggable JavaScript Linter
Rule Details. This rule enforces parentheses around arrow function parameters regardless of arity. For example: /*eslint-env es6*/ // ...
Read more >
Use parentheses for an arrow function parameters
Usually, it's enforced by ESLint rule arrow-parens or Prettier option arrowParens . While it looks nicer for these developers, ...
Read more >
Expected parentheses around arrow function argument ...
Parentheses around the parameter to an arrow function are optional in ES6 when there's only one argument, but ESLint complains about this by ......
Read more >
[ES6 Coding Style Discussion] Require parens for arrow function ...
The rule can be configured as `always`(default) or `as needed`. The question is, which style is preferred for us? FYR,
Read more >
support eslint "arrow-parens" feature : WEB-28650 - YouTrack
... remove redundant parentheses around single function argument in es6 arrow functions. ... This is supported by eslint, with the rule name arrow-parens....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found