Movatterモバイル変換


[0]ホーム

URL:


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

Can't use Pascal case when declaring a stateless functional component (SFC) #120

Closed
@nickytonline

Description

@nickytonline

I'm currently having issues declaring SFCs when using the following tslint configuration:

{  "extends": ["tslint-config-airbnb", "tslint-react", "tslint-config-prettier"]}

and here is a sample component

import * as React from 'react';const DummyComponent = () => <div>Hello World!</div>;export default DummyComponent;

which results in the error

[tslint] variable name must be in lowerCamelCase or UPPER_CASE (variable-name)const DummyComponent: () => JSX.Element

I know that it is thetslint-config-airbnb causing the issue, but I would have thought that tslint-react would have a rule for Pascal cased SFCs.

I think that this rule is missing. I'd be happy to throw up a PR if that's the case. I just need to read up a bit on creating rules.

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp