-
Couldn't load subscription status.
- Fork 7
lints + flow #24
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
lints + flow #24
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,8 @@ settings: | |
| onlyFilesWithFlowAnnotation: true | ||
| globals: | ||
| __DEV__: true | ||
| ReactClass: true | ||
| ReactElement: true | ||
| rules: | ||
| react-native/no-unused-styles: 2 | ||
| react-native/split-platform-components: 2 | ||
|
|
@@ -43,3 +45,7 @@ rules: | |
| flowtype/type-id-match: | ||
| - 1 | ||
| - "^([A-Z][a-z0-9]+)+Type$" | ||
|
|
||
| react/jsx-filename-extension: | ||
| - 1 | ||
| - extensions: [".js", ".jsx"] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @robwise @alexfedoseev How about we put this into the shakacode linter? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @justin808 I commented on the styleguide repo, what's the reasoning? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @justin808 It should be: react/jsx-filename-extension:
- 1
- extensions: [".js"]
# or
react/jsx-filename-extension:
- 1
- extensions: [".jsx"]
In general I'm fine w/ either, but as we already have a big codebase, that's using |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "name": "app", | ||
| "dependencies": { | ||
| "immutable": "*", | ||
| "lodash": "*", | ||
| "normalizr": "*", | ||
| "react": "*", | ||
| "react-native": "*", | ||
| "react-native-elements": "*", | ||
| "react-native-router-flux": "*", | ||
| "react-native-vector-icons": "*", | ||
| "react-redux": "*", | ||
| "redux": "*", | ||
| "redux-immutable": "*", | ||
| "redux-thunk": "*", | ||
| "reselect": "*", | ||
| "whatwg-fetch": "*" | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robwise @alexfedoseev Should these go into the shakacode linter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it React Native specific?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These aren't React-Native specific, these are used when typing React with flow. If you use eslint-plugin-flowtype, defining these as globals isn't necessary and these can be removed. I would also recommend using the recommend configuation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is crazy train, I can't find anything about
ReactElementhere. AFAIR I had issues w/ it and bunch of examples were usingReact$Element—it is in the defs, but it wasn't work either. Then I found this post, where stated thatReactElementis removed from public API andReact.Elementshould be used instead. The funny thing is that it worked and still works, but: there is noElementproperty onReactobject lol.