PascalCase
alecmev opened this issue · 3 comments
alecmev commented
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 commented
Related: palantir/tslint-react#120
progre commented
I'm still confused whether Airbnb React/JSX Style should be included or not...
alecmev commented
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.