`func-style` "expression" conflicts with ESM named exports
See original GitHub issueWhat rule do you want to change?
func-style
Does this change cause the rule to produce more or fewer warnings? Fewer or more, depending on how the option is configured.
How will the change be implemented? (New option, new default behavior, etc.)?
A new namedExports
option, which can be set to “expression” or “declaration” or “ignore”.
Please provide some example code that this change will affect:
/* eslint func-style: [2, "expression"] */
export function foo() {}
What does the rule currently do for this code? warns
What will the rule do after it’s changed?
/* eslint func-style: [2, "expression", { "namedExports": "declaration"] */
will cause no warning to be issued.
Are you willing to submit a pull request to implement this change? Yes.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:14 (11 by maintainers)
Top Results From Across the Web
export - JavaScript - MDN Web Docs
Default exports export default expression; export default function ... You can also rename named exports to avoid naming conflicts:.
Read more >Mixed default and named exports in Node with ES5 syntax
NameType = NameType; (i.e. the accepted answer)? My understanding is that assigning a value to exports doesn't affect the import (that's ...
Read more >@passport-next/eslint-config-passport-next - npm package | Snyk
Let's not be so opinionated. import/no-named-export - Could even be a bad practice as ... though I may revisit if this reports too...
Read more >export Keyword
You can have multiple named exports per module but only one default export. ... functions and classes are exported as declarations, not expressions, ......
Read more >eslint-config-ash-nazg | Yarn - Package Manager
... less necessary); func-style - Declarations are simpler so appealing also. ... Let's not be so opinionated. import/no-named-export - Could even be 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
@krainboltgreene this enhancement doesn’t have consensus from the team yet.
If and when this issue gets accepted, a PR will be welcome 😃
I’ll champion this.