@dartess/eslint-plugin 0.2.1 → 0.3.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  [//]: # (https://keepachangelog.com/en/1.1.0/)
4
4
 
5
+ ## [0.3.0] - 2026-01-12
6
+
7
+ - add `eslint-plugin-react-hooks:recommended` config to `react` config
8
+
5
9
  ## [0.2.1] - 2026-01-10
6
10
 
7
11
  - add `recommended-post-format` config for using after formatting tools
package/README.md CHANGED
@@ -11,13 +11,12 @@ Also extends
11
11
 
12
12
  Also can extends (if it is applicable)
13
13
  * `eslint-plugin-react` — `recommended` & `jsx-runtime`
14
+ * `eslint-plugin-react-hooks` — `recommended`
14
15
  * `@next/eslint-plugin-next` — `recommended` & `core-web-vitals`
15
16
  * `eslint-config-next`
16
17
  * `eslint-plugin-mobx` — `recommended`
17
18
  * `eslint-plugin-storybook` — `recommended` & `csf-strict`
18
19
 
19
- _(We also use `eslint-plugin-unicorn` and `eslint-plugin-decorator-position` but only special rules, without `recommended` config)_
20
-
21
20
  All of it pinched with extra configs, setups and extra rules. Just take it and use it!
22
21
 
23
22
  ### Notes
@@ -5,7 +5,6 @@ import reactPlugin from 'eslint-plugin-react';
5
5
  import reactHooksPlugin from 'eslint-plugin-react-hooks';
6
6
  import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
7
7
  import vendorRulesReact from "./vendor-rules/react.js";
8
- import vendorRulesReactHooks from "./vendor-rules/react-hooks.js";
9
8
  const config = [
10
9
  {
11
10
  name: '@dartess/react-setup',
@@ -19,6 +18,7 @@ const config = [
19
18
  },
20
19
  },
21
20
  },
21
+ reactHooksPlugin.configs.flat.recommended,
22
22
  {
23
23
  name: 'react/recommended', // missed name, @see e.g. https://github.com/jsx-eslint/eslint-plugin-react/pull/3882
24
24
  ...reactPlugin.configs.flat.recommended,
@@ -71,11 +71,5 @@ const config = [
71
71
  'react/jsx-no-undef': 'off', // checked by typescript
72
72
  },
73
73
  },
74
- {
75
- name: '@dartess/react-hooks',
76
- rules: {
77
- ...vendorRulesReactHooks,
78
- },
79
- },
80
74
  ];
81
75
  export default config;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dartess/eslint-plugin",
3
3
  "type": "module",
4
- "version": "0.2.1",
4
+ "version": "0.3.0",
5
5
  "description": "A set of rules and configs for various TypeScript projects",
6
6
  "keywords": [
7
7
  "eslint",
@@ -1,10 +0,0 @@
1
- declare const rules: {
2
- /**
3
- * react-hooks
4
- * copied from
5
- * https://github.com/airbnb/javascript/blob/c25bce83be4db06e6a221d79686c485cd2ed5d5d/packages/eslint-config-airbnb/rules/react-hooks.js
6
- * */
7
- 'react-hooks/rules-of-hooks': "error";
8
- 'react-hooks/exhaustive-deps': "error";
9
- };
10
- export default rules;
@@ -1,17 +0,0 @@
1
- // This file contains code from the `eslint-config-airbnb` project
2
- // Original author: Jake Teton-Landis (https://twitter.com/@jitl)
3
- // License: MIT (see LICENSE-eslint-config-airbnb.md file)
4
- const rules = {
5
- /**
6
- * react-hooks
7
- * copied from
8
- * https://github.com/airbnb/javascript/blob/c25bce83be4db06e6a221d79686c485cd2ed5d5d/packages/eslint-config-airbnb/rules/react-hooks.js
9
- * */
10
- // Enforce Rules of Hooks
11
- // https://github.com/facebook/react/blob/c11015ff4f610ac2924d1fc6d569a17657a404fd/packages/eslint-plugin-react-hooks/src/RulesOfHooks.js
12
- 'react-hooks/rules-of-hooks': 'error',
13
- // Verify the list of the dependencies for Hooks like useEffect and similar
14
- // https://github.com/facebook/react/blob/1204c789776cb01fbaf3e9f032e7e2ba85a44137/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js
15
- 'react-hooks/exhaustive-deps': 'error',
16
- };
17
- export default rules;