@azat-io/eslint-config 2.38.0 → 2.40.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.
@@ -1,5 +1,5 @@
1
1
  import jsxA11y from "eslint-plugin-jsx-a11y";
2
- let a11y = (config) => {
2
+ function a11y(config) {
3
3
  if (!config.react && !config.qwik) {
4
4
  return {};
5
5
  }
@@ -48,7 +48,7 @@ let a11y = (config) => {
48
48
  "jsx-a11y/tabindex-no-positive": "error"
49
49
  }
50
50
  };
51
- };
51
+ }
52
52
  export {
53
53
  a11y
54
54
  };
@@ -1,6 +1,6 @@
1
1
  import path from "node:path";
2
2
  import { interopDefault } from "../utilities.js";
3
- let astro = async (config) => {
3
+ async function astro(config) {
4
4
  if (!config.astro) {
5
5
  return {};
6
6
  }
@@ -93,7 +93,7 @@ let astro = async (config) => {
93
93
  "astro/valid-compile": "error"
94
94
  }
95
95
  };
96
- };
96
+ }
97
97
  export {
98
98
  astro
99
99
  };
@@ -1,5 +1,4 @@
1
1
  import eslintCommentsPlugin from "@eslint-community/eslint-plugin-eslint-comments";
2
- import preferArrowPlugin from "eslint-plugin-prefer-arrow";
3
2
  import preferLetPlugin from "eslint-plugin-prefer-let";
4
3
  import deMorganPlugin from "eslint-plugin-de-morgan";
5
4
  import importXPlugin from "eslint-plugin-import-x";
@@ -9,7 +8,7 @@ import unicornPlugin from "eslint-plugin-unicorn";
9
8
  import regexpPlugin from "eslint-plugin-regexp";
10
9
  import jsdocPlugin from "eslint-plugin-jsdoc";
11
10
  import globals from "globals";
12
- let core = (config) => {
11
+ function core(config) {
13
12
  let files = ["**/*.js", "**/*.cjs", "**/*.mjs"];
14
13
  if (config.typescript) {
15
14
  files.push("**/*.ts", "**/*.cts", "**/*.mts");
@@ -48,7 +47,6 @@ let core = (config) => {
48
47
  "eslint-comments": eslintCommentsPlugin,
49
48
  "import-x": importXPlugin,
50
49
  jsdoc: jsdocPlugin,
51
- "prefer-arrow": preferArrowPlugin,
52
50
  "prefer-let": preferLetPlugin,
53
51
  promise: promisePlugin,
54
52
  regexp: regexpPlugin,
@@ -89,6 +87,13 @@ let core = (config) => {
89
87
  eqeqeq: "error",
90
88
  "for-direction": "error",
91
89
  "func-names": ["error", "never"],
90
+ "func-style": [
91
+ "error",
92
+ "declaration",
93
+ {
94
+ allowTypeAnnotation: true
95
+ }
96
+ ],
92
97
  "getter-return": "error",
93
98
  "id-length": [
94
99
  "error",
@@ -386,14 +391,6 @@ let core = (config) => {
386
391
  "jsdoc/require-returns-type": "error",
387
392
  "jsdoc/require-yields-check": "error",
388
393
  "jsdoc/valid-types": "error",
389
- "prefer-arrow/prefer-arrow-functions": [
390
- "error",
391
- {
392
- classPropertiesAllowed: false,
393
- disallowPrototype: true,
394
- singleReturnOnly: false
395
- }
396
- ],
397
394
  "prefer-let/prefer-let": "error",
398
395
  "promise/catch-or-return": "error",
399
396
  "promise/no-callback-in-promise": "error",
@@ -532,6 +529,7 @@ let core = (config) => {
532
529
  "unicorn/new-for-builtins": "error",
533
530
  "unicorn/no-array-for-each": "error",
534
531
  "unicorn/no-array-method-this-argument": "error",
532
+ "unicorn/no-array-reverse": "error",
535
533
  "unicorn/no-await-in-promise-methods": "error",
536
534
  "unicorn/no-for-loop": "error",
537
535
  "unicorn/no-hex-escape": "error",
@@ -581,6 +579,7 @@ let core = (config) => {
581
579
  "unicorn/prefer-array-some": "error",
582
580
  "unicorn/prefer-at": "error",
583
581
  "unicorn/prefer-blob-reading-methods": "error",
582
+ "unicorn/prefer-class-fields": "error",
584
583
  "unicorn/prefer-date-now": "error",
585
584
  "unicorn/prefer-default-parameters": "error",
586
585
  "unicorn/prefer-dom-node-append": "error",
@@ -639,6 +638,7 @@ let core = (config) => {
639
638
  }
640
639
  ],
641
640
  "unicorn/require-array-join-separator": "error",
641
+ "unicorn/require-module-specifiers": "error",
642
642
  "unicorn/require-number-to-fixed-digits-argument": "error",
643
643
  "unicorn/template-indent": "error",
644
644
  "unicorn/text-encoding-identifier-case": "error",
@@ -650,7 +650,7 @@ let core = (config) => {
650
650
  }
651
651
  }
652
652
  };
653
- };
653
+ }
654
654
  export {
655
655
  core
656
656
  };
@@ -1,5 +1,5 @@
1
1
  import { interopDefault } from "../utilities.js";
2
- let node = async (config) => {
2
+ async function node(config) {
3
3
  if (!config.node) {
4
4
  return {};
5
5
  }
@@ -51,7 +51,7 @@ let node = async (config) => {
51
51
  "node/process-exit-as-throw": "error"
52
52
  }
53
53
  };
54
- };
54
+ }
55
55
  export {
56
56
  node
57
57
  };
@@ -1,49 +1,52 @@
1
1
  import packageJsonPlugin from "eslint-plugin-package-json";
2
2
  import jsoncParser from "jsonc-eslint-parser";
3
3
  import depend from "eslint-plugin-depend";
4
- let packageJson = (_config) => ({
5
- name: "azat-io/package-json/rules",
6
- files: ["**/package.json"],
7
- plugins: {
8
- depend,
9
- "package-json": packageJsonPlugin
10
- },
11
- languageOptions: {
12
- parser: jsoncParser
13
- },
14
- rules: {
15
- "depend/ban-dependencies": "error",
16
- "package-json/no-empty-fields": "error",
17
- "package-json/no-redundant-files": "error",
18
- "package-json/order-properties": [
19
- "error",
20
- {
21
- order: "sort-package-json"
22
- }
23
- ],
24
- "package-json/repository-shorthand": [
25
- "error",
26
- {
27
- form: "shorthand"
28
- }
29
- ],
30
- "package-json/require-author": "error",
31
- "package-json/require-description": "error",
32
- "package-json/require-engines": "error",
33
- "package-json/require-keywords": "error",
34
- "package-json/require-name": "error",
35
- "package-json/require-type": "error",
36
- "package-json/require-version": "error",
37
- "package-json/sort-collections": "error",
38
- "package-json/unique-dependencies": "error",
39
- "package-json/valid-author": "error",
40
- "package-json/valid-bin": "error",
41
- "package-json/valid-name": "error",
42
- "package-json/valid-package-definition": "error",
43
- "package-json/valid-scripts": "error",
44
- "package-json/valid-version": "error"
45
- }
46
- });
4
+ function packageJson(_config) {
5
+ return {
6
+ name: "azat-io/package-json/rules",
7
+ files: ["**/package.json"],
8
+ plugins: {
9
+ depend,
10
+ "package-json": packageJsonPlugin
11
+ },
12
+ languageOptions: {
13
+ parser: jsoncParser
14
+ },
15
+ rules: {
16
+ "depend/ban-dependencies": "error",
17
+ "package-json/no-empty-fields": "error",
18
+ "package-json/no-redundant-files": "error",
19
+ "package-json/order-properties": [
20
+ "error",
21
+ {
22
+ order: "sort-package-json"
23
+ }
24
+ ],
25
+ "package-json/repository-shorthand": [
26
+ "error",
27
+ {
28
+ form: "shorthand"
29
+ }
30
+ ],
31
+ "package-json/require-author": "error",
32
+ "package-json/require-description": "error",
33
+ "package-json/require-engines": "error",
34
+ "package-json/require-keywords": "error",
35
+ "package-json/require-name": "error",
36
+ "package-json/require-type": "error",
37
+ "package-json/require-version": "error",
38
+ "package-json/sort-collections": "error",
39
+ "package-json/unique-dependencies": "error",
40
+ "package-json/valid-author": "error",
41
+ "package-json/valid-bin": "error",
42
+ "package-json/valid-license": "error",
43
+ "package-json/valid-name": "error",
44
+ "package-json/valid-package-definition": "error",
45
+ "package-json/valid-scripts": "error",
46
+ "package-json/valid-version": "error"
47
+ }
48
+ };
49
+ }
47
50
  export {
48
51
  packageJson
49
52
  };
@@ -1,5 +1,5 @@
1
1
  import { interopDefault } from "../utilities.js";
2
- let perfectionist = async (config) => {
2
+ async function perfectionist(config) {
3
3
  if (!config.perfectionist) {
4
4
  return {};
5
5
  }
@@ -60,7 +60,7 @@ let perfectionist = async (config) => {
60
60
  }
61
61
  }
62
62
  };
63
- };
63
+ }
64
64
  export {
65
65
  perfectionist
66
66
  };
@@ -1,5 +1,5 @@
1
1
  import { interopDefault } from "../utilities.js";
2
- let qwik = async (config) => {
2
+ async function qwik(config) {
3
3
  if (!config.qwik) {
4
4
  return {};
5
5
  }
@@ -27,7 +27,7 @@ let qwik = async (config) => {
27
27
  "qwik/valid-lexical-scope": "error"
28
28
  }
29
29
  };
30
- };
30
+ }
31
31
  export {
32
32
  qwik
33
33
  };
@@ -1,5 +1,5 @@
1
1
  import { interopDefault } from "../utilities.js";
2
- let react = async (config) => {
2
+ async function react(config) {
3
3
  if (!config.react) {
4
4
  return {};
5
5
  }
@@ -125,7 +125,7 @@ let react = async (config) => {
125
125
  }
126
126
  }
127
127
  };
128
- };
128
+ }
129
129
  export {
130
130
  react
131
131
  };
@@ -1,5 +1,5 @@
1
1
  import { interopDefault } from "../utilities.js";
2
- let svelte = async (config) => {
2
+ async function svelte(config) {
3
3
  if (!config.svelte) {
4
4
  return {};
5
5
  }
@@ -85,7 +85,7 @@ let svelte = async (config) => {
85
85
  "svelte/valid-each-key": "error"
86
86
  }
87
87
  };
88
- };
88
+ }
89
89
  export {
90
90
  svelte
91
91
  };
@@ -1,5 +1,5 @@
1
1
  import { interopDefault } from "../utilities.js";
2
- let typescript = async (config) => {
2
+ async function typescript(config) {
3
3
  if (!config.typescript) {
4
4
  return {};
5
5
  }
@@ -229,7 +229,7 @@ let typescript = async (config) => {
229
229
  }
230
230
  }
231
231
  };
232
- };
232
+ }
233
233
  export {
234
234
  typescript
235
235
  };
package/dist/utilities.js CHANGED
@@ -1,4 +1,4 @@
1
- let interopDefault = async (module) => {
1
+ async function interopDefault(module) {
2
2
  try {
3
3
  let resolved = await module;
4
4
  if (typeof resolved === "object" && resolved !== null) {
@@ -11,7 +11,7 @@ let interopDefault = async (module) => {
11
11
  } catch (error) {
12
12
  throw new Error(`Cannot import module: ${String(error)}`);
13
13
  }
14
- };
14
+ }
15
15
  export {
16
16
  interopDefault
17
17
  };
@@ -1,5 +1,5 @@
1
1
  import { interopDefault } from "../utilities.js";
2
- let vitest = async (config) => {
2
+ async function vitest(config) {
3
3
  if (!config.vitest) {
4
4
  return {};
5
5
  }
@@ -80,7 +80,7 @@ let vitest = async (config) => {
80
80
  }
81
81
  }
82
82
  };
83
- };
83
+ }
84
84
  export {
85
85
  vitest
86
86
  };
package/dist/vue/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { interopDefault } from "../utilities.js";
2
- let vue = async (config) => {
2
+ async function vue(config) {
3
3
  if (!config.vue) {
4
4
  return {};
5
5
  }
@@ -194,7 +194,7 @@ let vue = async (config) => {
194
194
  },
195
195
  processor: vuePlugin.processors[".vue"]
196
196
  };
197
- };
197
+ }
198
198
  export {
199
199
  vue
200
200
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azat-io/eslint-config",
3
- "version": "2.38.0",
3
+ "version": "2.40.0",
4
4
  "description": "ESLint shareable config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -38,12 +38,11 @@
38
38
  "eslint-plugin-jsdoc": "^51.4.1",
39
39
  "eslint-plugin-jsx-a11y": "^6.10.2",
40
40
  "eslint-plugin-n": "^17.21.0",
41
- "eslint-plugin-package-json": "^0.44.1",
41
+ "eslint-plugin-package-json": "^0.45.1",
42
42
  "eslint-plugin-perfectionist": "^4.15.0",
43
- "eslint-plugin-prefer-arrow": "^1.2.3",
44
43
  "eslint-plugin-prefer-let": "^4.0.0",
45
44
  "eslint-plugin-promise": "^7.2.1",
46
- "eslint-plugin-qwik": "^1.14.1",
45
+ "eslint-plugin-qwik": "^1.15.0",
47
46
  "eslint-plugin-react-compiler": "19.1.0-rc.1-rc-af1b7da-20250421",
48
47
  "eslint-plugin-react-dom": "^1.52.3",
49
48
  "eslint-plugin-react-hooks": "^6.0.0",
@@ -55,12 +54,12 @@
55
54
  "eslint-plugin-regexp": "^2.9.0",
56
55
  "eslint-plugin-sonarjs": "^3.0.4",
57
56
  "eslint-plugin-svelte": "^3.11.0",
58
- "eslint-plugin-unicorn": "^59.0.1",
57
+ "eslint-plugin-unicorn": "^60.0.0",
59
58
  "eslint-plugin-vue": "^10.3.0",
60
59
  "globals": "^16.3.0",
61
60
  "jsonc-eslint-parser": "^2.4.0",
62
61
  "svelte-eslint-parser": "^1.3.0",
63
- "typescript-eslint": "^8.37.0",
62
+ "typescript-eslint": "^8.38.0",
64
63
  "vue-eslint-parser": "^10.2.0"
65
64
  },
66
65
  "peerDependencies": {
package/readme.md CHANGED
@@ -133,7 +133,6 @@ This config uses the following plugins:
133
133
  - [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n)
134
134
  - [eslint-plugin-package-json](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json)
135
135
  - [eslint-plugin-perfectionist](https://github.com/azat-io/eslint-plugin-perfectionist)
136
- - [eslint-plugin-prefer-arrow](https://github.com/TristonJ/eslint-plugin-prefer-arrow)
137
136
  - [eslint-plugin-prefer-let](https://github.com/thefrontside/javascript/tree/v3/packages/eslint-plugin-prefer-let)
138
137
  - [eslint-plugin-promise](https://github.com/eslint-community/eslint-plugin-promise)
139
138
  - [eslint-plugin-qwik](https://github.com/QwikDev/qwik/tree/main/packages/eslint-plugin-qwik)