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.

Incorrect documentation for func-style

See original GitHub issue

Tell us about your environment

  • ESLint Version:
  • Node Version:
  • npm Version:

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

Please show your full configuration:

Configuration

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



What did you expect to happen?

The correct code example for the configuration /*eslint func-style: ["error", "expression"]*/ shouldn’t have an arrow function, as they’re disallowed by default.

https://eslint.org/docs/rules/func-style#expression

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

/*eslint func-style: ["error", "expression"]*/

var foo = function() {
    // ...
};

var foo = () => {};

Are you willing to submit a pull request to fix this bug?

Maybe.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
platinumazurecommented, Feb 10, 2020

Should we disallow the allowArrowFunctions: true option when the user is using “expression” mode? It’s not a great experience to have an option that doesn’t do anything in some cases.

0reactions
anikethsahacommented, Mar 5, 2020

Should we disallow the allowArrowFunctions: true option when the user is using “expression” mode? It’s not a great experience to have an option that doesn’t do anything in some cases.

I think allowArrowFunctions does nothing as arrow function cant be possible for declaration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

func-style - Pluggable JavaScript Linter - ESLint
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
class-func-style - npm Package Health Analysis - Snyk
class-func-style. v1.0.0. utility for classNames and functional css styling For more information about how to use this package see README.
Read more >
eslint Parsing error: Unexpected token function with async
It's an error regarding func-style . ... Check the docs for further examples, https://eslint.org/docs/rules/func-style.
Read more >
macOS Big Sur 11.0.1 Release Notes - Apple Developer
func style (_ slider: UISlider) { if slider. ... fileExporter() modifier to present a system interface for exporting one or more documents from...
Read more >
ESLint Code Checks | SAP Help Portal
valid-jsdoc, off, warning, requireReturn = false ... func-style, off, off ... For more information about the rules, see the rules documentation provided on ......
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