Rule Enhancement Proposal: func-names with never
See original GitHub issueEDIT: 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 isfalse
) - If this istrue
, 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 ismodule.exports
, this rule will ignore it.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@eslint/eslint-team opinions?
I can champion this one
@nzakas after 3 refusals, I don’t think Ill submit a new one… I learned my lesson 😃