eslint-plugin-react-hooks-extra 2.0.0-beta.59 → 2.0.0-beta.64

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/README.md CHANGED
@@ -17,26 +17,29 @@ npm install --save-dev eslint-plugin-react-hooks-extra
17
17
  // @ts-check
18
18
  import js from "@eslint/js";
19
19
  import reactHooksExtra from "eslint-plugin-react-hooks-extra";
20
+ import { defineConfig } from "eslint/config";
20
21
  import tseslint from "typescript-eslint";
21
22
 
22
- export default tseslint.config({
23
- files: ["**/*.ts", "**/*.tsx"],
24
- extends: [
25
- js.configs.recommended,
26
- tseslint.configs.recommended,
27
- reactHooksExtra.configs.recommended,
28
- ],
29
- languageOptions: {
30
- parser: tseslint.parser,
31
- parserOptions: {
32
- projectService: true,
33
- tsconfigRootDir: import.meta.dirname,
23
+ export default defineConfig([
24
+ {
25
+ files: ["**/*.ts", "**/*.tsx"],
26
+ extends: [
27
+ js.configs.recommended,
28
+ tseslint.configs.recommended,
29
+ reactHooksExtra.configs.recommended,
30
+ ],
31
+ languageOptions: {
32
+ parser: tseslint.parser,
33
+ parserOptions: {
34
+ projectService: true,
35
+ tsconfigRootDir: import.meta.dirname,
36
+ },
37
+ },
38
+ rules: {
39
+ // Put rules you want to override here
34
40
  },
35
41
  },
36
- rules: {
37
- // Put rules you want to override here
38
- },
39
- });
42
+ ]);
40
43
  ```
41
44
 
42
45
  ## Rules
package/dist/index.d.ts CHANGED
@@ -4,9 +4,7 @@ import * as _eslint_react_kit0 from "@eslint-react/kit";
4
4
  declare const _default: {
5
5
  configs: {
6
6
  recommended: {
7
- plugins: {
8
- "react-hooks-extra": _eslint_react_kit0.CompatiblePlugin;
9
- };
7
+ plugins: {};
10
8
  name?: string;
11
9
  rules?: Record<string, _eslint_react_kit0.RuleConfig>;
12
10
  settings?: _eslint_react_kit0.SettingsConfig;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
+ import { getConfigAdapters, getDocsUrl, getSettingsFromContext } from "@eslint-react/shared";
1
2
  import * as AST from "@eslint-react/ast";
2
3
  import * as ER from "@eslint-react/core";
3
4
  import { constVoid, getOrElseUpdate, identity, not } from "@eslint-react/eff";
4
- import { getDocsUrl, getSettingsFromContext } from "@eslint-react/shared";
5
5
  import * as VAR from "@eslint-react/var";
6
6
  import { AST_NODE_TYPES } from "@typescript-eslint/types";
7
7
  import { match } from "ts-pattern";
@@ -29,7 +29,7 @@ const rules = { "react-hooks-extra/no-direct-set-state-in-use-effect": "warn" };
29
29
  //#endregion
30
30
  //#region package.json
31
31
  var name = "eslint-plugin-react-hooks-extra";
32
- var version = "2.0.0-beta.59";
32
+ var version = "2.0.0-beta.64";
33
33
 
34
34
  //#endregion
35
35
  //#region src/rules-hooks/use-no-direct-set-state-in-use-effect.ts
@@ -638,18 +638,7 @@ const plugin = {
638
638
 
639
639
  //#endregion
640
640
  //#region src/index.ts
641
- function toFlatConfig(config) {
642
- return {
643
- ...config,
644
- plugins: { "react-hooks-extra": plugin }
645
- };
646
- }
647
- function toLegacyConfig({ rules: rules$1 }) {
648
- return {
649
- plugins: ["react-hooks-extra"],
650
- rules: rules$1
651
- };
652
- }
641
+ const { toFlatConfig, toLegacyConfig } = getConfigAdapters("react-hooks-extra", plugin);
653
642
  var src_default = {
654
643
  ...plugin,
655
644
  configs: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-hooks-extra",
3
- "version": "2.0.0-beta.59",
3
+ "version": "2.0.0-beta.64",
4
4
  "description": "ESLint React's ESLint plugin for React Hooks related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -36,18 +36,18 @@
36
36
  "./package.json"
37
37
  ],
38
38
  "dependencies": {
39
- "@typescript-eslint/scope-manager": "^8.41.0",
40
- "@typescript-eslint/type-utils": "^8.41.0",
41
- "@typescript-eslint/types": "^8.41.0",
42
- "@typescript-eslint/utils": "^8.41.0",
39
+ "@typescript-eslint/scope-manager": "^8.42.0",
40
+ "@typescript-eslint/type-utils": "^8.42.0",
41
+ "@typescript-eslint/types": "^8.42.0",
42
+ "@typescript-eslint/utils": "^8.42.0",
43
43
  "string-ts": "^2.2.1",
44
44
  "ts-pattern": "^5.8.0",
45
- "@eslint-react/ast": "2.0.0-beta.59",
46
- "@eslint-react/eff": "2.0.0-beta.59",
47
- "@eslint-react/core": "2.0.0-beta.59",
48
- "@eslint-react/kit": "2.0.0-beta.59",
49
- "@eslint-react/var": "2.0.0-beta.59",
50
- "@eslint-react/shared": "2.0.0-beta.59"
45
+ "@eslint-react/ast": "2.0.0-beta.64",
46
+ "@eslint-react/core": "2.0.0-beta.64",
47
+ "@eslint-react/eff": "2.0.0-beta.64",
48
+ "@eslint-react/kit": "2.0.0-beta.64",
49
+ "@eslint-react/var": "2.0.0-beta.64",
50
+ "@eslint-react/shared": "2.0.0-beta.64"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/react": "^19.1.12",