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.

`func-style` "expression" conflicts with ESM named exports

See original GitHub issue

What 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:open
  • Created 4 years ago
  • Reactions:2
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
mdjermanoviccommented, May 14, 2020

@krainboltgreene this enhancement doesn’t have consensus from the team yet.

If and when this issue gets accepted, a PR will be welcome 😃

1reaction
mdjermanoviccommented, Feb 26, 2020

I’ll champion this.

Read more comments on GitHub >

github_iconTop 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 >

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