kaxil commented on code in PR #77218:
URL: https://github.com/apache/airflow/pull/77218#discussion_r4607216190
##########
airflow-core/src/airflow/ui/.oxlintrc.json:
##########
@@ -606,6 +685,55 @@
},
"jsPlugins": ["eslint-plugin-i18next"],
"excludeFiles": ["src/**/*.test.tsx"]
+ },
+ {
+ "files": ["**/*.{js,jsx,ts,tsx}"],
+ "jsPlugins": [
+ {
+ "name": "react-js",
+ "specifier": "eslint-plugin-react"
+ },
+ {
+ "name": "typescript-js",
+ "specifier": "@typescript-eslint/eslint-plugin"
+ },
+ {
+ "name": "unicorn-js",
+ "specifier": "eslint-plugin-unicorn"
+ }
+ ],
+ "env": {
+ "browser": true
+ },
+ "rules": {
+ "react-js/destructuring-assignment": ["error", "always"],
+ "react-js/jsx-max-depth": [
+ "error",
+ {
+ "max": 7
+ }
+ ],
+ "react-js/jsx-no-leaked-render": "error",
+ "react-js/no-deprecated": "error",
+ "react-js/prefer-read-only-props": "error",
+ "typescript-js/no-invalid-this": [
+ "error",
+ {
+ "capIsConstructor": true
+ }
+ ],
+ "unicorn-js/better-regex": "error",
Review Comment:
`better-regex` and `prefer-dom-node-dataset` (line 735) are deprecated stubs
in eslint-plugin-unicorn 76, registered through `createDeprecatedRules` with
`create: () => ({})`, so neither can ever report. That's why both stayed silent
on the probes. Could we drop `better-regex` (removed upstream) and either drop
the dataset line or point it at `unicorn-js/dom-node-dataset` / the native
`unicorn/prefer-dom-node-dataset` (off at line 283)? Turning the dataset rule
on reports 14 existing sites, so fixing those can be a follow-up, since nothing
has checked them since the unicorn 76 bump anyway.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]