-
-
Notifications
You must be signed in to change notification settings - Fork 638
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
Add and enable @react-native-community/eslint-config
.
#4119
Labels
Comments
chrisbobbe
added
upstream: RN
Issues related to an issue in React Native
a-tools
labels
May 20, 2020
JSON diff: {
globals: {
+ __fbBatchedBridgeConfig: false
- clearImmediate: false
+ clearImmediate: true
- exports: true
+ exports: false
- setImmediate: false
+ setImmediate: true
- Map: false
+ Map: true
- Promise: false
+ Promise: true
- Set: false
+ Set: true
- requestAnimationFrame: false
+ requestAnimationFrame: true
- requestIdleCallback: false
+ requestIdleCallback: true
}
rules: {
+ no-reserved-keys: 0
+ eslint-comments/no-aggregating-enable: 1
+ eslint-comments/no-unlimited-disable: 1
+ eslint-comments/no-unused-disable: 1
+ eslint-comments/no-unused-enable: 1
+ prettier/prettier: 2
+ space-in-brackets: 0
+ react/wrap-multilines: 0
+ react-hooks/rules-of-hooks: "error"
+ react-hooks/exhaustive-deps: "error"
+ react-native/no-inline-styles: 1
}
plugins: [
+ "eslint-comments"
+ "prettier"
+ "react"
+ "react-hooks"
+ "react-native"
+ "jest"
"import"
- "react"
"jsx-a11y"
- "jest"
"flowtype"
]
extends: [
"/Users/chrisbobbe/dev/zulip-mobile/node_modules/eslint-config-airbnb-base/rules/best-practices.js"
"/Users/chrisbobbe/dev/zulip-mobile/node_modules/eslint-config-airbnb-base/rules/errors.js"
"/Users/chrisbobbe/dev/zulip-mobile/node_modules/eslint-config-airbnb-base/rules/node.js"
"/Users/chrisbobbe/dev/zulip-mobile/node_modules/eslint-config-airbnb-base/rules/style.js"
"/Users/chrisbobbe/dev/zulip-mobile/node_modules/eslint-config-airbnb-base/rules/variables.js"
"/Users/chrisbobbe/dev/zulip-mobile/node_modules/eslint-config-airbnb-base/rules/es6.js"
"/Users/chrisbobbe/dev/zulip-mobile/node_modules/eslint-config-airbnb-base/rules/imports.js"
"/Users/chrisbobbe/dev/zulip-mobile/node_modules/eslint-config-airbnb-base/index.js"
"/Users/chrisbobbe/dev/zulip-mobile/node_modules/eslint-config-airbnb-base/rules/strict.js"
"/Users/chrisbobbe/dev/zulip-mobile/node_modules/eslint-config-airbnb/rules/react.js"
"/Users/chrisbobbe/dev/zulip-mobile/node_modules/eslint-config-airbnb/rules/react-a11y.js"
+ "@react-native-community"
"airbnb"
"plugin:jest/recommended"
"./tools/formatting.eslintrc.yaml"
]
} |
chrisbobbe
added a commit
to chrisbobbe/zulip-mobile
that referenced
this issue
May 29, 2020
The libdef and one eslint-disable remained after b2934c3, so, remove those. See zulip#4119 for a proposed alternative, if we want to get RN-specific linting rules activated. That would be `@react-native-community/eslint-config`.
chrisbobbe
added a commit
to chrisbobbe/zulip-mobile
that referenced
this issue
May 29, 2020
The libdef and one eslint-disable remained after b2934c3, so, remove those. See zulip#4119 for a proposed alternative, if we want to get RN-specific linting rules activated. That would be `@react-native-community/eslint-config`.
chrisbobbe
added a commit
to chrisbobbe/zulip-mobile
that referenced
this issue
Jun 11, 2020
The libdef and one eslint-disable remained after b2934c3, so, remove those. See zulip#4119 for a proposed alternative, if we want to get RN-specific linting rules activated. That would be `@react-native-community/eslint-config`.
chrisbobbe
added a commit
to chrisbobbe/zulip-mobile
that referenced
this issue
Jul 13, 2020
The libdef and one eslint-disable remained after b2934c3, so, remove those. See zulip#4119 for a proposed alternative, if we want to get RN-specific linting rules activated. That would be `@react-native-community/eslint-config`.
chrisbobbe
added a commit
to chrisbobbe/zulip-mobile
that referenced
this issue
Aug 1, 2020
The libdef and one eslint-disable remained after b2934c3, so, remove those. See zulip#4119 for a proposed alternative, if we want to get RN-specific linting rules activated. That would be `@react-native-community/eslint-config`.
gnprice
pushed a commit
to chrisbobbe/zulip-mobile
that referenced
this issue
Aug 4, 2020
The libdef and one eslint-disable remained after b2934c3, so, remove those. See zulip#4119 for a proposed alternative, if we want to get RN-specific linting rules activated. That would be `@react-native-community/eslint-config`.
Closed
chrisbobbe
added a commit
to chrisbobbe/zulip-mobile
that referenced
this issue
Dec 1, 2020
Part of the RN v0.62 -> v0.63 changes to the template app [1], corresponding to facebook/react-native@82e823933. That RN commit upgrades a few other deps; we don't take those changes, for the following reasons: - We're already past ^7.6.2 of @babel/core. - We don't currently use @react-native-community/eslint-config (though we're considering it, in zulip#4119). - We don't currently use babel-jest. - We're already past ^25.1.0 of jest. - We're already past ^0.58.0 of metro-react-native-babel-preset. Run our usual `yarn yarn-deduplicate && yarn`, as prompted by `tools/test deps`. [1] https://react-native-community.github.io/upgrade-helper/?from=0.62.2&to=0.63.4
chrisbobbe
added a commit
to chrisbobbe/zulip-mobile
that referenced
this issue
Dec 1, 2020
Part of the RN v0.62 -> v0.63 changes to the template app [1], corresponding to facebook/react-native@82e823933. That RN commit upgrades a few other deps; we don't take those changes, for the following reasons: - We're already past ^7.6.2 of @babel/core. - We don't currently use @react-native-community/eslint-config (though we're considering it, in zulip#4119). - We don't currently use babel-jest. - We're already past ^25.1.0 of jest. - We're already past ^0.58.0 of metro-react-native-babel-preset. Run our usual `yarn yarn-deduplicate && yarn`, as prompted by `tools/test deps`. [1] https://react-native-community.github.io/upgrade-helper/?from=0.62.2&to=0.63.4
chrisbobbe
added a commit
to chrisbobbe/zulip-mobile
that referenced
this issue
Dec 1, 2020
Part of the RN v0.62 -> v0.63 changes to the template app [1], corresponding to facebook/react-native@82e823933. That RN commit upgrades a few other deps; we don't take those changes, for the following reasons: - We're already past ^7.6.2 of @babel/core. - We don't currently use @react-native-community/eslint-config (though we're considering it, in zulip#4119). - We don't currently use babel-jest. - We're already past ^25.1.0 of jest. - We're already past ^0.58.0 of metro-react-native-babel-preset. Run our usual `yarn yarn-deduplicate && yarn`, as prompted by `tools/test deps`. [1] https://react-native-community.github.io/upgrade-helper/?from=0.62.2&to=0.63.4
gnprice
pushed a commit
to chrisbobbe/zulip-mobile
that referenced
this issue
Jan 4, 2021
Part of the RN v0.62 -> v0.63 changes to the template app [1], corresponding to facebook/react-native@82e823933. That RN commit upgrades a few other deps; we don't take those changes, for the following reasons: - We're already past ^7.6.2 of @babel/core. - We don't currently use @react-native-community/eslint-config (though we're considering it, in zulip#4119). - We don't currently use babel-jest. - We're already past ^25.1.0 of jest. - We're already past ^0.58.0 of metro-react-native-babel-preset. Run our usual `yarn yarn-deduplicate && yarn`, as prompted by `tools/test deps`. [1] https://react-native-community.github.io/upgrade-helper/?from=0.62.2&to=0.63.4
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is included in the RN upgrade guide for v0.59.10 to v0.60.0.
Surprisingly, this didn't flag any errors in existing code. I confirmed that it was indeed activated by making an example that didn't get flagged before, but newly does. (A
no-global-assign
on attempting to reassign__fbBatchedBridgeConfig
; see this.)Here's the output of
with and without @react-native-community/eslint-config enabled:
printed-config-with-rnc.txt
printed-config-before.txt
One annoying bit is that one of its
devDependencies
hastypescript
as apeerDependency
, so I get this:See also discussion.
The text was updated successfully, but these errors were encountered: