Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull in filenames/match-exported #1185

Open
graingert opened this issue Nov 23, 2016 · 4 comments
Open

Pull in filenames/match-exported #1185

graingert opened this issue Nov 23, 2016 · 4 comments

Comments

@graingert
Copy link
Contributor

// Considered problem only if the file isn't named foo.js or foo/index.js 
export default function foo() {}
 
// Considered problem only if the file isn't named Foo.js or Foo/index.js 
module.exports = class Foo() {}
 
// Considered problem only if the file isn't named someVariable.js or someVariable/index.js 
module.exports = someVariable;
 
// Never considered a problem 
export default { foo: "bar" };

https://www.npmjs.com/package/eslint-plugin-filenames#matching-exported-values-match-exported

@ljharb
Copy link
Collaborator

ljharb commented Nov 25, 2016

Due to eslint limitations with shared configs, this will sadly add another peer dependency for both eslint-config-airbnb-base and eslint-config-airbnb.

That said, this is a good rule that I think we should indeed add, but I'd like to test out the plugin on our codebase before adding it here.

@graingert
Copy link
Contributor Author

@ljharb agreed

@graingert
Copy link
Contributor Author

@ljharb any chance to look at this?

@ljharb
Copy link
Collaborator

ljharb commented Dec 27, 2017

I haven't had a chance to test it out yet; but in general i'm pretty loath to ever add another peer dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants