Skip to content

Commit f3db6cc

Browse files
bradzacherfacebook-github-bot
authored andcommitted
update to ESLint v8
Summary: Changelog: [internal] - Upgrade ESLint version to the latest - Upgrade ESLint plugin versions to the latest to ensure compatibility - Switch from eslint-plugin-flowtype to eslint-plugin-ft-flow - Updates lint suppressions - all `flowtype/` rules to `ft-flow/` ### `flowtype` vs `ft-flow` `eslint-plugin-flowtype` is well out of date and no-longer maintained. It's been abandoned by its owner. This means it crashes on ESLint v8. `eslint-plugin-ft-flow` is a fork of the above and is maintained by the same people that own the `flow-typed` project. Reviewed By: jacdebug Differential Revision: D37727177 fbshipit-source-id: 516be42f947fec9c886526c182a608b3311c0b50
1 parent 9ecd203 commit f3db6cc

File tree

7 files changed

+856
-747
lines changed

7 files changed

+856
-747
lines changed

.eslintrc.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ module.exports = {
2626
// These rules are not required with hermes-eslint
2727
'ft-flow/define-flow-type': 0,
2828
'ft-flow/use-flow-type': 0,
29-
'flowtype/define-flow-type': 0,
30-
'flowtype/use-flow-type': 0,
3129
// flow handles this check for us, so it's not required
3230
'no-undef': 0,
3331
},

packages/eslint-config-react-native-community/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ module.exports = {
3737
{
3838
files: ['*.js'],
3939
parser: '@babel/eslint-parser',
40-
plugins: ['flowtype'],
40+
plugins: ['ft-flow'],
4141
rules: {
4242
// Flow Plugin
43-
// The following rules are made available via `eslint-plugin-flowtype`
43+
// The following rules are made available via `eslint-plugin-ft-flow`
4444

45-
'flowtype/define-flow-type': 1,
46-
'flowtype/use-flow-type': 1,
45+
'ft-flow/define-flow-type': 1,
46+
'ft-flow/use-flow-type': 1,
4747
},
4848
},
4949
{

packages/eslint-config-react-native-community/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@
1414
"@babel/core": "^7.14.0",
1515
"@babel/eslint-parser": "^7.18.2",
1616
"@react-native-community/eslint-plugin": "^1.1.0",
17-
"@typescript-eslint/eslint-plugin": "^5.15.0",
18-
"@typescript-eslint/parser": "^5.15.0",
19-
"eslint-config-prettier": "^8.3.0",
17+
"@typescript-eslint/eslint-plugin": "^5.30.5",
18+
"@typescript-eslint/parser": "^5.30.5",
19+
"eslint-config-prettier": "^8.5.0",
2020
"eslint-plugin-eslint-comments": "^3.2.0",
21-
"eslint-plugin-flowtype": "^8.0.0",
22-
"eslint-plugin-jest": "^25.2.4",
23-
"eslint-plugin-prettier": "^4.0.0",
24-
"eslint-plugin-react": "^7.26.1",
25-
"eslint-plugin-react-hooks": "^4.2.0",
26-
"eslint-plugin-react-native": "^3.11.0"
21+
"eslint-plugin-ft-flow": "^2.0.1",
22+
"eslint-plugin-jest": "^26.5.3",
23+
"eslint-plugin-prettier": "^4.2.1",
24+
"eslint-plugin-react": "^7.30.1",
25+
"eslint-plugin-react-hooks": "^4.6.0",
26+
"eslint-plugin-react-native": "^4.0.0"
2727
},
2828
"peerDependencies": {
2929
"eslint": ">=7",
3030
"prettier": ">=2"
3131
},
3232
"devDependencies": {
33-
"eslint": "^7.32.0",
33+
"eslint": "^8.19.0",
3434
"prettier": "^2.4.1"
3535
}
3636
}

0 commit comments

Comments
 (0)