mirror of
https://github.com/facebook/react.git
synced 2026-02-25 22:25:09 +00:00
Hermes parser is the preferred parser for Flow code going forward. We need to upgrade to this parser to support new Flow syntax like function `this` context type annotations or `ObjectType['prop']` syntax. Unfortunately, there's quite a few upgrades here to make it work somehow (dependencies between the changes) - ~Upgrade `eslint` to `8.*`~ reverted this as the React eslint plugin tests depend on the older version and there's a [yarn bug](https://github.com/yarnpkg/yarn/issues/6285) that prevents `devDependencies` and `peerDependencies` to different versions. - Remove `eslint-config-fbjs` preset dependency and inline the rules, imho this makes it a lot clearer what the rules are. - Remove the turned off `jsx-a11y/*` rules and it's dependency instead of inlining those from the `fbjs` config. - Update parser and dependency from `babel-eslint` to `hermes-eslint`. - `ft-flow/no-unused-expressions` rule replaces `no-unused-expressions` which now allows standalone type asserts, e.g. `(foo: number);` - Bunch of globals added to the eslint config - Disabled `no-redeclare`, seems like the eslint upgrade started making this more precise and warn against re-defined globals like `__EXPERIMENTAL__` (in rollup scripts) or `fetch` (when importing fetch from node-fetch). - Minor lint fixes like duplicate keys in objects.
42 lines
1.1 KiB
JSON
42 lines
1.1 KiB
JSON
{
|
|
"name": "eslint-plugin-react-hooks",
|
|
"description": "ESLint rules for React Hooks",
|
|
"version": "5.0.0",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/facebook/react.git",
|
|
"directory": "packages/eslint-plugin-react-hooks"
|
|
},
|
|
"files": [
|
|
"LICENSE",
|
|
"README.md",
|
|
"index.js",
|
|
"cjs"
|
|
],
|
|
"keywords": [
|
|
"eslint",
|
|
"eslint-plugin",
|
|
"eslintplugin",
|
|
"react"
|
|
],
|
|
"license": "MIT",
|
|
"bugs": {
|
|
"url": "https://github.com/facebook/react/issues"
|
|
},
|
|
"engines": {
|
|
"node": ">=10"
|
|
},
|
|
"homepage": "https://reactjs.org/",
|
|
"peerDependencies": {
|
|
"eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/eslint-parser": "^7.11.4",
|
|
"@typescript-eslint/parser-v2": "npm:@typescript-eslint/parser@^2.26.0",
|
|
"@typescript-eslint/parser-v3": "npm:@typescript-eslint/parser@^3.10.0",
|
|
"@typescript-eslint/parser-v4": "npm:@typescript-eslint/parser@^4.1.0",
|
|
"@typescript-eslint/parser-v5": "npm:@typescript-eslint/parser@^5.0.0-0",
|
|
"babel-eslint": "^10.0.3"
|
|
}
|
|
}
|