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.

Rule Enhancement Proposal: func-names with never

See original GitHub issue

EDIT: this proposal was updated in https://github.com/eslint/eslint/issues/6059#issuecomment-216719718


From requireAnonymousFunctions and requireMatchingFunctionName.

This proposal is to add some options.

{
    "func-names": [
        "error",
        "always" or "never",
        {
            "sameAsVariable": false
        }
}
  • "always" (default) - This is the current behavior.
  • "never" - This will disallow a use of function expression names.
  • sameAsVariable (default is false) - If this is true, the function expression name must be the same as the variable name which is the destination of the assignment. For example: let foo = function foo() {};. But if the destination is module.exports, this rule will ignore it.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
albertocommented, May 27, 2016

@eslint/eslint-team opinions?

I can champion this one

0reactions
Mouvediacommented, Jun 7, 2016

@nzakas after 3 refusals, I don’t think Ill submit a new one… I learned my lesson 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

func-names - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
PEP 8 – Style Guide for Python Code
Python Enhancement Proposals (PEPs) ... Consistency within one module or function is the most important. ... Module Level Dunder Names.
Read more >
Coding like Shakespeare: Practical Function Naming ...
Avoid pointless function names. Obviously, the production code should never contain functions named without strict meaning. Or named just for ...
Read more >
What is the naming convention in Python for variable and ...
See Python PEP 8: Function and Variable Names: Function names should be lowercase, with words separated by underscores as necessary to ...
Read more >
Google C++ Style Guide
General Naming Rules; File Names; Type Names; Variable Names ... you can create an object dynamically and never delete it by using a...
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