Skip to content

Commit

Permalink
RN: Upgrade ESLint Packages (#32560)
Browse files Browse the repository at this point in the history
Summary:
Upgrades ESLint to v7.28.0. This is the latest version before v8.0.0, which would be a more involved upgrade.

Upgrades all ESLint-related dependencies to their latest version, except for [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype/). This is because eslint-plugin-flowtype@8.0.0 dropped support for ESLint v7.

Configures ESLint for Metro to extend `plugin:prettier/recommended`.

## Changelog

[General][Changed] - Upgraded packages to the latest versions for ESLint v7.

Pull Request resolved: #32560

Test Plan:
Run this on an open source checkout of `facebook/react-native`:

```
# See no new errors or warnings.
$ yarn run lint
```

Run this internally:

```
$ js1 test xplat/js/tools/__tests__/dependency-constraints-test.js
```

Verify linting works:

```
js1 lint xplat/js/RKJSModules/Libraries/Core/
```

Differential Revision: D32258399

Pulled By: yungsters

fbshipit-source-id: 6b19c1e2db13712103c5a1d504d68b3af4952ee6
  • Loading branch information
yungsters authored and facebook-github-bot committed Nov 9, 2021
1 parent 5c4ad93 commit efa96db
Show file tree
Hide file tree
Showing 6 changed files with 1,494 additions and 557 deletions.
5 changes: 1 addition & 4 deletions packages/eslint-config-react-native-community/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ module.exports = {
sourceType: 'module',
},

extends: [
'plugin:prettier/recommended', // https://github.com/prettier/eslint-plugin-prettier#recommended-configuration
'prettier/react',
],
extends: ['plugin:prettier/recommended'],

plugins: [
'eslint-comments',
Expand Down
18 changes: 9 additions & 9 deletions packages/eslint-config-react-native-community/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@
"@typescript-eslint/eslint-plugin": "^4.22.1",
"@typescript-eslint/parser": "^4.22.1",
"babel-eslint": "^10.1.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-flowtype": "2.50.3",
"eslint-plugin-jest": "22.4.1",
"eslint-plugin-prettier": "3.1.2",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^4.0.7",
"eslint-plugin-react-native": "^3.10.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-flowtype": "^7.0.0",
"eslint-plugin-jest": "^25.2.4",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.26.1",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-react-native": "^3.11.0",
"prettier": "^2.4.1"
},
"peerDependencies": {
"eslint": ">=7",
"prettier": ">=2"
},
"devDependencies": {
"eslint": "7.12.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1"
}
}
Loading

0 comments on commit efa96db

Please sign in to comment.