Skip to content

Match component file name #667

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

Closed
1 of 4 tasks
rodrigopedra opened this issue Nov 17, 2018 · 0 comments
Closed
1 of 4 tasks

Match component file name #667

rodrigopedra opened this issue Nov 17, 2018 · 0 comments

Comments

@rodrigopedra
Copy link
Contributor

rodrigopedra commented Nov 17, 2018

Please describe what the rule should do:

This rule check if a component's name attribute matches its file name. By default it checks only .jsx files, but an additional option is provided to check both .jsx and .vue files

What category should the rule belong to?

  • Enforces code style
  • Warns about a potential error
  • Suggests an alternate way of doing something
  • Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

// src/MyComponent.jsx
export default {
  name: 'MComponent', // this rule would warn of the mismatch between component's name
  render() { return <div /> }
}

Additional context

As discussed with @chrisvfritz in the #589 PR comments

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

No branches or pull requests

3 participants