Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Match component file name #667

Closed
Closed
@rodrigopedra

Description

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /