@azat-io/eslint-config 2.49.0 → 2.50.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.
@@ -380,6 +380,7 @@ function core(config) {
380
380
  "jsdoc/no-defaults": "error",
381
381
  "jsdoc/no-multi-asterisks": "error",
382
382
  "jsdoc/no-undefined-types": "error",
383
+ "jsdoc/prefer-import-tag": "error",
383
384
  "jsdoc/require-asterisk-prefix": "error",
384
385
  "jsdoc/require-description": "error",
385
386
  "jsdoc/require-description-complete-sentence": "error",
@@ -401,6 +402,7 @@ function core(config) {
401
402
  "jsdoc/require-returns-check": "error",
402
403
  "jsdoc/require-returns-description": "error",
403
404
  "jsdoc/require-returns-type": "error",
405
+ "jsdoc/require-template-description": "error",
404
406
  "jsdoc/require-yields-check": "error",
405
407
  "jsdoc/valid-types": "error",
406
408
  "prefer-let/prefer-let": "error",
package/dist/index.js CHANGED
@@ -50,6 +50,28 @@ const index = async ({
50
50
  (createConfigFunction) => Promise.resolve(createConfigFunction(config))
51
51
  )
52
52
  );
53
+ let plugins = configs.reduce(
54
+ (accumulator, current) => current.plugins ? {
55
+ ...accumulator,
56
+ ...current.plugins
57
+ } : accumulator,
58
+ {}
59
+ );
60
+ function prepareExtends(extendsConfig) {
61
+ if (!extendsConfig) {
62
+ return [];
63
+ }
64
+ function prepareExtendedConfig(currentConfig) {
65
+ return {
66
+ ...currentConfig,
67
+ plugins: {
68
+ ...plugins,
69
+ ...currentConfig.plugins
70
+ }
71
+ };
72
+ }
73
+ return Array.isArray(extendsConfig) ? extendsConfig.map(prepareExtendedConfig) : [prepareExtendedConfig(extendsConfig)];
74
+ }
53
75
  return defineConfig([
54
76
  gitignore({
55
77
  strict: false
@@ -61,12 +83,7 @@ const index = async ({
61
83
  name: "azat-io/benchmark/ignores"
62
84
  },
63
85
  ...configs,
64
- ...Array.isArray(customExtends) ? customExtends : [
65
- {
66
- name: "azat-io/custom-extends",
67
- ...customExtends
68
- }
69
- ]
86
+ ...prepareExtends(customExtends)
70
87
  ]);
71
88
  };
72
89
  export {
@@ -41,7 +41,6 @@ async function react(config) {
41
41
  },
42
42
  rules: {
43
43
  "react-compiler/react-compiler": "error",
44
- "react-dom/no-children-in-void-dom-elements": "error",
45
44
  "react-dom/no-dangerously-set-innerhtml": "error",
46
45
  "react-dom/no-dangerously-set-innerhtml-with-children": "error",
47
46
  "react-dom/no-find-dom-node": "error",
@@ -61,11 +60,6 @@ async function react(config) {
61
60
  "react-hooks/exhaustive-deps": "error",
62
61
  "react-hooks/rules-of-hooks": "error",
63
62
  "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
63
  "react-naming-convention/component-name": "error",
70
64
  "react-naming-convention/context-name": "error",
71
65
  "react-naming-convention/filename-extension": "error",
@@ -99,6 +93,8 @@ async function react(config) {
99
93
  "react-x/jsx-no-duplicate-props": "error",
100
94
  "react-x/jsx-no-iife": "error",
101
95
  "react-x/jsx-no-undef": "error",
96
+ "react-x/jsx-shorthand-boolean": "error",
97
+ "react-x/jsx-shorthand-fragment": "error",
102
98
  "react-x/jsx-uses-react": "error",
103
99
  "react-x/jsx-uses-vars": "error",
104
100
  "react-x/no-access-state-in-setstate": "error",
@@ -110,12 +106,18 @@ async function react(config) {
110
106
  "react-x/no-component-will-update": "error",
111
107
  "react-x/no-duplicate-key": "error",
112
108
  "react-x/no-nested-component-definitions": "error",
109
+ "react-x/no-unnecessary-key": "error",
110
+ "react-x/no-unnecessary-use-callback": "error",
111
+ "react-x/no-unnecessary-use-memo": "error",
112
+ "react-x/no-unnecessary-use-prefix": "error",
113
113
  "react-x/no-unsafe-component-will-update": "error",
114
114
  "react-x/no-unstable-context-value": "error",
115
+ "react-x/no-unused-props": "error",
115
116
  "react-x/no-unused-state": "error",
116
117
  "react-x/no-use-context": "error",
117
118
  "react-x/no-useless-fragment": "error",
118
- "react-x/prefer-react-namespace-import": "error"
119
+ "react-x/prefer-namespace-import": "error",
120
+ "react-x/prefer-use-state-lazy-initialization": "error"
119
121
  },
120
122
  settings: {
121
123
  react: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azat-io/eslint-config",
3
- "version": "2.49.0",
3
+ "version": "2.50.0",
4
4
  "description": "ESLint shareable config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -27,30 +27,30 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
30
- "@vitest/eslint-plugin": "1.3.12",
30
+ "@vitest/eslint-plugin": "1.3.13",
31
31
  "astro-eslint-parser": "^1.2.2",
32
32
  "eslint-config-flat-gitignore": "^2.1.0",
33
33
  "eslint-import-resolver-typescript": "^4.4.4",
34
34
  "eslint-plugin-astro": "^1.3.1",
35
- "eslint-plugin-de-morgan": "^1.3.1",
35
+ "eslint-plugin-de-morgan": "^2.0.0",
36
36
  "eslint-plugin-depend": "^1.3.1",
37
37
  "eslint-plugin-import-x": "^4.16.1",
38
- "eslint-plugin-jsdoc": "^60.1.1",
38
+ "eslint-plugin-jsdoc": "^60.5.0",
39
39
  "eslint-plugin-jsx-a11y": "^6.10.2",
40
40
  "eslint-plugin-n": "^17.23.1",
41
41
  "eslint-plugin-package-json": "^0.56.3",
42
42
  "eslint-plugin-perfectionist": "^4.15.0",
43
43
  "eslint-plugin-prefer-let": "^4.0.0",
44
44
  "eslint-plugin-promise": "^7.2.1",
45
- "eslint-plugin-qwik": "^1.16.0",
45
+ "eslint-plugin-qwik": "^1.16.1",
46
46
  "eslint-plugin-react-compiler": "^19.1.0-rc.2",
47
- "eslint-plugin-react-dom": "^1.53.1",
47
+ "eslint-plugin-react-dom": "^2.0.2",
48
48
  "eslint-plugin-react-hooks": "^6.0.0-rc.2",
49
- "eslint-plugin-react-hooks-extra": "^1.53.1",
50
- "eslint-plugin-react-naming-convention": "^1.53.1",
49
+ "eslint-plugin-react-hooks-extra": "^2.0.2",
50
+ "eslint-plugin-react-naming-convention": "^2.0.2",
51
51
  "eslint-plugin-react-perf": "^3.3.3",
52
- "eslint-plugin-react-web-api": "^1.53.1",
53
- "eslint-plugin-react-x": "^1.53.1",
52
+ "eslint-plugin-react-web-api": "^2.0.2",
53
+ "eslint-plugin-react-x": "^2.0.2",
54
54
  "eslint-plugin-regexp": "^2.10.0",
55
55
  "eslint-plugin-sonarjs": "^3.0.5",
56
56
  "eslint-plugin-svelte": "^3.12.4",
@@ -59,7 +59,7 @@
59
59
  "globals": "^16.4.0",
60
60
  "jsonc-eslint-parser": "^2.4.1",
61
61
  "svelte-eslint-parser": "^1.3.3",
62
- "typescript-eslint": "^8.44.1",
62
+ "typescript-eslint": "^8.45.0",
63
63
  "vue-eslint-parser": "^10.2.0"
64
64
  },
65
65
  "peerDependencies": {