@azat-io/eslint-config 2.35.0 → 2.37.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/dist/index.js CHANGED
@@ -49,7 +49,9 @@ const index = async ({
49
49
  configFunctions.map((createConfigFunction) => createConfigFunction(config))
50
50
  );
51
51
  return defineConfig([
52
- gitignore(),
52
+ gitignore({
53
+ strict: false
54
+ }),
53
55
  {
54
56
  ignores: [
55
57
  "benchmark/**/*"
@@ -1,15 +1,18 @@
1
1
  import packageJsonPlugin from "eslint-plugin-package-json";
2
2
  import jsoncParser from "jsonc-eslint-parser";
3
+ import depend from "eslint-plugin-depend";
3
4
  let packageJson = (_config) => ({
4
5
  name: "azat-io/package-json/rules",
5
6
  files: ["**/package.json"],
6
7
  plugins: {
8
+ depend,
7
9
  "package-json": packageJsonPlugin
8
10
  },
9
11
  languageOptions: {
10
12
  parser: jsoncParser
11
13
  },
12
14
  rules: {
15
+ "depend/ban-dependencies": "error",
13
16
  "package-json/no-empty-fields": "error",
14
17
  "package-json/no-redundant-files": "error",
15
18
  "package-json/order-properties": [
@@ -3,11 +3,24 @@ let react = async (config) => {
3
3
  if (!config.react) {
4
4
  return {};
5
5
  }
6
- let [reactCompilerPlugin, reactHooksPlugin, reactPerfPlugin, reactPlugin] = await Promise.all([
6
+ let [
7
+ reactCompilerPlugin,
8
+ reactDomPlugin,
9
+ reactHooksPlugin,
10
+ reactHooksExtraPlugin,
11
+ reactNamingConventionPlugin,
12
+ reactPerfPlugin,
13
+ reactWebApiPlugin,
14
+ reactXPlugin
15
+ ] = await Promise.all([
7
16
  interopDefault(import("eslint-plugin-react-compiler")),
17
+ interopDefault(import("eslint-plugin-react-dom")),
8
18
  interopDefault(import("eslint-plugin-react-hooks")),
19
+ interopDefault(import("eslint-plugin-react-hooks-extra")),
20
+ interopDefault(import("eslint-plugin-react-naming-convention")),
9
21
  interopDefault(import("eslint-plugin-react-perf")),
10
- interopDefault(import("eslint-plugin-react"))
22
+ interopDefault(import("eslint-plugin-react-web-api")),
23
+ interopDefault(import("eslint-plugin-react-x"))
11
24
  ]);
12
25
  let files = ["**/*.jsx"];
13
26
  if (config.typescript) {
@@ -17,87 +30,92 @@ let react = async (config) => {
17
30
  name: "azat-io/react/rules",
18
31
  files,
19
32
  plugins: {
20
- react: reactPlugin,
21
33
  "react-compiler": reactCompilerPlugin,
34
+ "react-dom": reactDomPlugin,
22
35
  "react-hooks": reactHooksPlugin,
23
- "react-perf": reactPerfPlugin
36
+ "react-hooks-extra": reactHooksExtraPlugin,
37
+ "react-naming-convention": reactNamingConventionPlugin,
38
+ "react-perf": reactPerfPlugin,
39
+ "react-web-api": reactWebApiPlugin,
40
+ "react-x": reactXPlugin
24
41
  },
25
42
  rules: {
26
- "react/button-has-type": "error",
27
- "react/checked-requires-onchange-or-readonly": "error",
28
- "react/forbid-prop-types": "error",
29
- "react/forward-ref-uses-ref": "error",
30
- "react/function-component-definition": [
31
- "error",
32
- {
33
- namedComponents: "arrow-function"
34
- }
35
- ],
36
- "react/hook-use-state": [
37
- "error",
38
- {
39
- allowDestructuredState: true
40
- }
41
- ],
42
- "react/jsx-boolean-value": "error",
43
- "react/jsx-curly-brace-presence": [
44
- "error",
45
- {
46
- children: "never",
47
- propElementValues: "always",
48
- props: "never"
49
- }
50
- ],
51
- "react/jsx-fragments": "error",
52
- "react/jsx-key": "error",
53
- "react/jsx-no-comment-textnodes": "error",
54
- "react/jsx-no-constructed-context-values": "error",
55
- "react/jsx-no-duplicate-props": "error",
56
- "react/jsx-no-leaked-render": "error",
57
- "react/jsx-no-target-blank": "error",
58
- "react/jsx-no-undef": "error",
59
- "react/jsx-no-useless-fragment": "error",
60
- "react/jsx-pascal-case": "error",
61
- "react/jsx-uses-vars": "error",
62
- "react/no-array-index-key": "error",
63
- "react/no-arrow-function-lifecycle": "error",
64
- "react/no-children-prop": "error",
65
- "react/no-danger-with-children": "error",
66
- "react/no-deprecated": "error",
67
- "react/no-did-mount-set-state": "error",
68
- "react/no-did-update-set-state": "error",
69
- "react/no-direct-mutation-state": "error",
70
- "react/no-find-dom-node": "error",
71
- "react/no-invalid-html-attribute": "error",
72
- "react/no-is-mounted": "error",
73
- "react/no-namespace": "error",
74
- "react/no-redundant-should-component-update": "error",
75
- "react/no-render-return-value": "error",
76
- "react/no-string-refs": "error",
77
- "react/no-this-in-sfc": "error",
78
- "react/no-typos": "error",
79
- "react/no-unescaped-entities": "error",
80
- "react/no-unknown-property": "error",
81
- "react/no-unused-class-component-methods": "error",
82
- "react/no-unused-state": "error",
83
- "react/no-will-update-set-state": "error",
84
- "react/require-render-return": "error",
85
- "react/self-closing-comp": [
86
- "error",
87
- {
88
- component: true,
89
- html: true
90
- }
91
- ],
92
- "react/style-prop-object": "error",
93
- "react/void-dom-elements-no-children": "error",
94
43
  "react-compiler/react-compiler": "error",
44
+ "react-dom/no-children-in-void-dom-elements": "error",
45
+ "react-dom/no-dangerously-set-innerhtml": "error",
46
+ "react-dom/no-dangerously-set-innerhtml-with-children": "error",
47
+ "react-dom/no-find-dom-node": "error",
48
+ "react-dom/no-flush-sync": "error",
49
+ "react-dom/no-hydrate": "error",
50
+ "react-dom/no-missing-button-type": "error",
51
+ "react-dom/no-missing-iframe-sandbox": "error",
52
+ "react-dom/no-namespace": "error",
53
+ "react-dom/no-render": "error",
54
+ "react-dom/no-render-return-value": "error",
55
+ "react-dom/no-script-url": "error",
56
+ "react-dom/no-unknown-property": "error",
57
+ "react-dom/no-unsafe-iframe-sandbox": "error",
58
+ "react-dom/no-unsafe-target-blank": "error",
59
+ "react-dom/no-use-form-state": "error",
60
+ "react-dom/no-void-elements-with-children": "error",
95
61
  "react-hooks/exhaustive-deps": "error",
96
62
  "react-hooks/rules-of-hooks": "error",
63
+ "react-hooks-extra/no-direct-set-state-in-use-effect": "error",
64
+ "react-hooks-extra/no-direct-set-state-in-use-layout-effect": "error",
65
+ "react-hooks-extra/no-unnecessary-use-callback": "error",
66
+ "react-hooks-extra/no-unnecessary-use-memo": "error",
67
+ "react-hooks-extra/no-unnecessary-use-prefix": "error",
68
+ "react-hooks-extra/prefer-use-state-lazy-initialization": "error",
69
+ "react-naming-convention/component-name": "error",
70
+ "react-naming-convention/context-name": "error",
71
+ "react-naming-convention/filename-extension": "error",
72
+ "react-naming-convention/use-state": "error",
97
73
  "react-perf/jsx-no-jsx-as-prop": "error",
98
74
  "react-perf/jsx-no-new-array-as-prop": "error",
99
75
  "react-perf/jsx-no-new-function-as-prop": "error",
100
- "react-perf/jsx-no-new-object-as-prop": "error"
76
+ "react-perf/jsx-no-new-object-as-prop": "error",
77
+ "react-web-api/no-leaked-absolute-orientation-sensor": "error",
78
+ "react-web-api/no-leaked-ambient-light-sensor": "error",
79
+ "react-web-api/no-leaked-animation-frame": "error",
80
+ "react-web-api/no-leaked-broadcast-channel": "error",
81
+ "react-web-api/no-leaked-event-listener": "error",
82
+ "react-web-api/no-leaked-event-source": "error",
83
+ "react-web-api/no-leaked-geolocation": "error",
84
+ "react-web-api/no-leaked-gravity-sensor": "error",
85
+ "react-web-api/no-leaked-gyroscope": "error",
86
+ "react-web-api/no-leaked-idle-callback": "error",
87
+ "react-web-api/no-leaked-intersection-observer": "error",
88
+ "react-web-api/no-leaked-interval": "error",
89
+ "react-web-api/no-leaked-linear-acceleration-sensor": "error",
90
+ "react-web-api/no-leaked-magnetometer": "error",
91
+ "react-web-api/no-leaked-mutation-observer": "error",
92
+ "react-web-api/no-leaked-orientation-sensor": "error",
93
+ "react-web-api/no-leaked-performance-observer": "error",
94
+ "react-web-api/no-leaked-relative-accelerometer": "error",
95
+ "react-web-api/no-leaked-resize-observer": "error",
96
+ "react-web-api/no-leaked-timeout": "error",
97
+ "react-web-api/no-leaked-websocket": "error",
98
+ "react-x/jsx-key-before-spread": "error",
99
+ "react-x/jsx-no-duplicate-props": "error",
100
+ "react-x/jsx-no-iife": "error",
101
+ "react-x/jsx-no-undef": "error",
102
+ "react-x/jsx-uses-react": "error",
103
+ "react-x/jsx-uses-vars": "error",
104
+ "react-x/no-access-state-in-setstate": "error",
105
+ "react-x/no-array-index-key": "error",
106
+ "react-x/no-class-component": "error",
107
+ "react-x/no-complex-conditional-rendering": "error",
108
+ "react-x/no-component-will-mount": "error",
109
+ "react-x/no-component-will-receive-props": "error",
110
+ "react-x/no-component-will-update": "error",
111
+ "react-x/no-duplicate-key": "error",
112
+ "react-x/no-nested-component-definitions": "error",
113
+ "react-x/no-unsafe-component-will-update": "error",
114
+ "react-x/no-unstable-context-value": "error",
115
+ "react-x/no-unused-state": "error",
116
+ "react-x/no-use-context": "error",
117
+ "react-x/no-useless-fragment": "error",
118
+ "react-x/prefer-react-namespace-import": "error"
101
119
  },
102
120
  settings: {
103
121
  react: {
@@ -49,10 +49,12 @@ let vitest = async (config) => {
49
49
  "vitest/no-interpolation-in-snapshots": "error",
50
50
  "vitest/no-standalone-expect": "error",
51
51
  "vitest/no-test-return-statement": "error",
52
+ "vitest/prefer-called-once": "error",
52
53
  "vitest/prefer-called-with": "error",
53
54
  "vitest/prefer-comparison-matcher": "error",
54
55
  "vitest/prefer-each": "error",
55
56
  "vitest/prefer-equality-matcher": "error",
57
+ "vitest/prefer-expect-assertions": "error",
56
58
  "vitest/prefer-expect-resolves": "error",
57
59
  "vitest/prefer-hooks-in-order": "error",
58
60
  "vitest/prefer-hooks-on-top": "error",
@@ -70,7 +72,8 @@ let vitest = async (config) => {
70
72
  "vitest/require-top-level-describe": "error",
71
73
  "vitest/valid-describe-callback": "error",
72
74
  "vitest/valid-expect": "error",
73
- "vitest/valid-expect-in-promise": "error"
75
+ "vitest/valid-expect-in-promise": "error",
76
+ "vitest/warn-todo": "error"
74
77
  },
75
78
  settings: {
76
79
  vitest: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azat-io/eslint-config",
3
- "version": "2.35.0",
3
+ "version": "2.37.0",
4
4
  "description": "ESLint shareable config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -27,36 +27,41 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
30
- "@vitest/eslint-plugin": "1.2.7",
30
+ "@vitest/eslint-plugin": "1.3.3",
31
31
  "astro-eslint-parser": "^1.2.2",
32
32
  "eslint-config-flat-gitignore": "^2.1.0",
33
- "eslint-import-resolver-typescript": "^4.4.3",
33
+ "eslint-import-resolver-typescript": "^4.4.4",
34
34
  "eslint-plugin-astro": "^1.3.1",
35
35
  "eslint-plugin-de-morgan": "^1.3.0",
36
- "eslint-plugin-import-x": "^4.15.2",
37
- "eslint-plugin-jsdoc": "^51.0.1",
36
+ "eslint-plugin-depend": "^1.2.0",
37
+ "eslint-plugin-import-x": "^4.16.1",
38
+ "eslint-plugin-jsdoc": "^51.3.1",
38
39
  "eslint-plugin-jsx-a11y": "^6.10.2",
39
40
  "eslint-plugin-n": "^17.20.0",
40
- "eslint-plugin-package-json": "^0.40.0",
41
- "eslint-plugin-perfectionist": "^4.14.0",
41
+ "eslint-plugin-package-json": "^0.42.0",
42
+ "eslint-plugin-perfectionist": "^4.15.0",
42
43
  "eslint-plugin-prefer-arrow": "^1.2.3",
43
44
  "eslint-plugin-prefer-let": "^4.0.0",
44
45
  "eslint-plugin-promise": "^7.2.1",
45
46
  "eslint-plugin-qwik": "^1.14.1",
46
- "eslint-plugin-react": "^7.37.5",
47
47
  "eslint-plugin-react-compiler": "19.1.0-rc.1-rc-af1b7da-20250421",
48
+ "eslint-plugin-react-dom": "^1.52.2",
48
49
  "eslint-plugin-react-hooks": "^6.0.0",
50
+ "eslint-plugin-react-hooks-extra": "^1.52.2",
51
+ "eslint-plugin-react-naming-convention": "^1.52.2",
49
52
  "eslint-plugin-react-perf": "^3.3.3",
53
+ "eslint-plugin-react-web-api": "^1.52.2",
54
+ "eslint-plugin-react-x": "^1.52.2",
50
55
  "eslint-plugin-regexp": "^2.9.0",
51
- "eslint-plugin-sonarjs": "^3.0.2",
52
- "eslint-plugin-svelte": "^3.9.2",
56
+ "eslint-plugin-sonarjs": "^3.0.4",
57
+ "eslint-plugin-svelte": "^3.10.1",
53
58
  "eslint-plugin-unicorn": "^59.0.1",
54
59
  "eslint-plugin-vue": "^10.2.0",
55
60
  "globals": "^16.2.0",
56
61
  "jsonc-eslint-parser": "^2.4.0",
57
62
  "svelte-eslint-parser": "^1.2.0",
58
- "typescript-eslint": "^8.34.1",
59
- "vue-eslint-parser": "^10.1.3"
63
+ "typescript-eslint": "^8.35.1",
64
+ "vue-eslint-parser": "^10.1.4"
60
65
  },
61
66
  "peerDependencies": {
62
67
  "eslint": ">=9.28.0"
package/readme.md CHANGED
@@ -8,7 +8,7 @@
8
8
  width="160"
9
9
  />
10
10
 
11
- [![Version](https://img.shields.io/npm/v/@azat-io/eslint-config.svg?color=4a32c3&labelColor=26272b)](https://npmjs.com/package/@azat-io/eslint-configt)
11
+ [![Version](https://img.shields.io/npm/v/@azat-io/eslint-config.svg?color=4a32c3&labelColor=26272b)](https://npmjs.com/package/@azat-io/eslint-config)
12
12
  [![GitHub License](https://img.shields.io/badge/license-MIT-232428.svg?color=4a32c3&labelColor=26272b)](https://github.com/azat-io/eslint-config/blob/main/license.md)
13
13
 
14
14
  A comprehensive and flexible ESLint configuration that supports a wide range of frameworks and environments. Easily integrate clean, consistent code standards across projects by enabling settings for specific tools and libraries.
@@ -126,6 +126,7 @@ This config uses the following plugins:
126
126
  - [@vitest/eslint-plugin](https://github.com/vitest-dev/eslint-plugin-vitest)
127
127
  - [eslint-plugin-astro](https://github.com/ota-meshi/eslint-plugin-astro)
128
128
  - [eslint-plugin-de-morgan](https://github.com/azat-io/eslint-plugin-de-morgan)
129
+ - [eslint-plugin-depend](https://github.com/es-tooling/eslint-plugin-depend)
129
130
  - [eslint-plugin-import-x](https://github.com/un-ts/eslint-plugin-import-x)
130
131
  - [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc)
131
132
  - [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
@@ -136,10 +137,14 @@ This config uses the following plugins:
136
137
  - [eslint-plugin-prefer-let](https://github.com/thefrontside/javascript/tree/v3/packages/eslint-plugin-prefer-let)
137
138
  - [eslint-plugin-promise](https://github.com/eslint-community/eslint-plugin-promise)
138
139
  - [eslint-plugin-qwik](https://github.com/QwikDev/qwik/tree/main/packages/eslint-plugin-qwik)
139
- - [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react)
140
140
  - [eslint-plugin-react-compiler](https://github.com/facebook/react/tree/main/compiler/packages/eslint-plugin-react-compiler)
141
+ - [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react)
141
142
  - [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks)
143
+ - [eslint-plugin-react-hooks-extra](https://github.com/Rel1cx/eslint-react)
144
+ - [eslint-plugin-react-naming-convention](https://github.com/Rel1cx/eslint-react)
142
145
  - [eslint-plugin-react-perf](https://github.com/cvazac/eslint-plugin-react-perf)
146
+ - [eslint-plugin-react-web-api](https://github.com/Rel1cx/eslint-react)
147
+ - [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react)
143
148
  - [eslint-plugin-regexp](https://github.com/ota-meshi/eslint-plugin-regexp)
144
149
  - [eslint-plugin-sonarjs](https://github.com/SonarSource/SonarJS/tree/master/packages/jsts/src/rules)
145
150
  - [eslint-plugin-svelte](https://github.com/sveltejs/eslint-plugin-svelte)