@agilebot/eslint-config 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @agilebot/eslint-config v0.3.1
2
+ * @license @agilebot/eslint-config v0.3.2
3
3
  *
4
4
  * Copyright (c) Agilebot, Inc. and its affiliates.
5
5
  *
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @agilebot/eslint-config v0.3.1
2
+ * @license @agilebot/eslint-config v0.3.2
3
3
  *
4
4
  * Copyright (c) Agilebot, Inc. and its affiliates.
5
5
  *
@@ -387,11 +387,10 @@ function unicorn(opts) {
387
387
  // src/configs/react.ts
388
388
  function react(opts) {
389
389
  return {
390
- plugins: ["react", "react-hooks", "jsx-a11y"],
390
+ plugins: ["react", "@eslint-react", "react-hooks", "jsx-a11y"],
391
391
  extends: [
392
392
  "plugin:react/recommended",
393
393
  "plugin:react-hooks/recommended",
394
- "plugin:react-prefer-function-component/recommended",
395
394
  "plugin:jsx-a11y/recommended"
396
395
  ],
397
396
  rules: {
@@ -436,6 +435,8 @@ function react(opts) {
436
435
  "react/no-unused-prop-types": "error",
437
436
  // img之类的void元素不应该有children
438
437
  "react/void-dom-elements-no-children": "error",
438
+ "@eslint-react/no-class-component": "error",
439
+ "@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "error",
439
440
  "jsx-a11y/click-events-have-key-events": "off",
440
441
  "jsx-a11y/no-static-element-interactions": "off",
441
442
  "jsx-a11y/alt-text": "off"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilebot/eslint-config",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Agilebot's ESLint config",
5
5
  "bin": {
6
6
  "eslint-agilebot": "bin/eslint-agilebot"
@@ -19,6 +19,7 @@
19
19
  "homepage": "https://github.com/sh-agilebot/frontend-toolkit/tree/master/packages/eslint-config#readme",
20
20
  "dependencies": {
21
21
  "@cspell/eslint-plugin": "^8.7.0",
22
+ "@eslint-react/eslint-plugin": "^1.5.10",
22
23
  "@stylistic/eslint-plugin": "^1.7.0",
23
24
  "@typescript-eslint/eslint-plugin": "~7.7.0",
24
25
  "@typescript-eslint/parser": "~7.7.0",
@@ -39,17 +40,16 @@
39
40
  "eslint-plugin-promise": "^6.0.0",
40
41
  "eslint-plugin-react": "^7.34.1",
41
42
  "eslint-plugin-react-hooks": "^4.6.0",
42
- "eslint-plugin-react-prefer-function-component": "^3.3.0",
43
43
  "eslint-plugin-unicorn": "^52.0.0",
44
44
  "eslint-plugin-unused-imports": "^3.2.0",
45
45
  "eslint-plugin-vue": "^9.25.0",
46
46
  "eslint-plugin-you-dont-need-lodash-underscore": "^6.13.0",
47
47
  "vue-eslint-parser": "^9.4.2",
48
- "@agilebot/eslint-utils": "0.3.1"
48
+ "@agilebot/eslint-utils": "0.3.2"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "eslint": "^7.0.0 || ^8.0.0",
52
- "@agilebot/eslint-plugin": "0.3.1"
52
+ "@agilebot/eslint-plugin": "0.3.2"
53
53
  },
54
54
  "files": [
55
55
  "bin",