chore(widgets): add react and react hooks eslint config (#4838)

### Description

Add react and react hooks eslint rules for better linting in the widgets
project

### Drive-by changes

No

### Backward compatibility

Yes

### Testing

Manual testing
pull/4842/head
Jason Guo 3 weeks ago committed by GitHub
parent 5f41b11346
commit bf4c77996e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 14
      typescript/widgets/.eslintrc
  2. 2
      typescript/widgets/package.json
  3. 709
      yarn.lock

@ -1,6 +1,18 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"prettier"
],
"plugins": ["react", "react-hooks", "@typescript-eslint"],
"rules": {
// TODO use utils rootLogger in widgets lib
"no-console": ["off"]
"no-console": ["off"],
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
}
}

@ -32,6 +32,8 @@
"babel-loader": "^8.3.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-storybook": "^0.6.15",
"postcss": "^8.4.21",
"prettier": "^2.8.8",

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save