Compare commits

..
3 Commits
Author SHA1 Message Date
Frieder Bluemle acff43ce87 Fix ESLint setup (#240) 2021-12-16 11:58:25 +01:00
Yuta Sugimura f62bcec9e2 feat: update to react native 0.66.4 (#239) 2021-12-15 08:19:49 +01:00
Mike Hardy a67375cc3b fix(lint): typescript requires special no-shadow (#238)
In pure javascript eslint config from `@react-native-community`, the no-shadow rule is on,
which is good, but for typescript it generates false-positives and needs a specific configuration change
to use a typescript-specific rule

Reference: 
- https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-shadow.md
- https://github.com/typescript-eslint/typescript-eslint/issues/2552#issuecomment-691694839
2021-11-29 08:43:21 +01:00
2 changed files with 9 additions and 1 deletions

No files matched your search

+6
View File
@@ -1,4 +1,10 @@
module.exports = {
root: true,
extends: '@react-native-community',
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
rules: {
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
},
};
+3 -1
View File
@@ -11,7 +11,7 @@
},
"dependencies": {
"react": "17.0.2",
"react-native": "0.66.3"
"react-native": "0.66.4"
},
"devDependencies": {
"@babel/core": "^7.12.9",
@@ -20,6 +20,8 @@
"@types/jest": "^26.0.23",
"@types/react-native": "^0.66.4",
"@types/react-test-renderer": "^17.0.1",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"babel-jest": "^26.6.3",
"eslint": "^7.14.0",
"jest": "^26.6.3",