Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

PascalCase #32

Closed
alecmev opened this issue Mar 24, 2018 · 3 comments
Closed

PascalCase #32

alecmev opened this issue Mar 24, 2018 · 3 comments

Comments

@alecmev
Copy link

alecmev commented Mar 24, 2018

The following code currently gets flagged by variable-name:

const App = () => <div>Hello world!</div>;

The style guide discourages the use of name inference (here and here), so that kind of makes the example above (the notation I personally prefer) invalid, but not this one:

const App = function App() { return <div>Hello world!</div> };

I think the rule should be changed to this:

'variable-name': [true, 'check-format', 'allow-pascal-case']

A pure-component-specific exception would be nicer, of course, but, AFAIK, it doesn't exist.

@oliverbenns
Copy link

oliverbenns commented Apr 3, 2018

Related: palantir/tslint-react#120

@progre
Copy link
Owner

progre commented Apr 4, 2018

I'm still confused whether Airbnb React/JSX Style should be included or not...

@alecmev
Copy link
Author

alecmev commented Apr 5, 2018

Right, it never registered in my mind that this config is JS-only. At least currently. I'll close this then, since this is, indeed, a React-/JSX-specific problem.

@alecmev alecmev closed this as completed Apr 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants