@alexlit/config-eslint 143.1.0 → 145.0.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/index.js CHANGED
@@ -15,5 +15,6 @@ export { vitest } from './plugins/vitest.js';
15
15
  export { vueAccessibility } from './plugins/vue-accessibility.js';
16
16
  export { vueI18n } from './plugins/vue-i18n.js';
17
17
  export { vue } from './plugins/vue.js';
18
+ export { zod } from './plugins/zod.js';
18
19
 
19
20
  export { defaultPreset } from './presets/default.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexlit/config-eslint",
3
- "version": "143.1.0",
3
+ "version": "145.0.0",
4
4
  "private": false,
5
5
  "description": "Sharable ESLint configuration",
6
6
  "keywords": [
@@ -54,9 +54,10 @@
54
54
  "eslint-plugin-regexp": "^3.1.0",
55
55
  "eslint-plugin-sonarjs": "^4.1.0",
56
56
  "eslint-plugin-tailwindcss": "^3.18.3",
57
- "eslint-plugin-unicorn": "^67.0.0",
57
+ "eslint-plugin-unicorn": "^68.0.0",
58
58
  "eslint-plugin-vue": "^10.9.2",
59
59
  "eslint-plugin-vuejs-accessibility": "^2.5.0",
60
+ "eslint-plugin-zod": "^4.7.0",
60
61
  "globals": "^17.6.0",
61
62
  "jsonc-eslint-parser": "^3.1.0",
62
63
  "typescript": "^6.0.3",
@@ -14,23 +14,7 @@ export const unicorn = defineConfig([
14
14
  'error',
15
15
  { checkArrowFunctions: false },
16
16
  ],
17
- 'unicorn/no-array-reduce': ['error', { allowSimpleOperations: true }],
18
- 'unicorn/no-asterisk-prefix-in-documentation-comments': 'off',
19
- 'unicorn/no-empty-file': 'off',
20
- 'unicorn/no-for-each': 'off',
21
- 'unicorn/no-this-outside-of-class': 'off', // used in setters/getters
22
- 'unicorn/no-top-level-side-effects': 'off', // Vue.js specific
23
- 'unicorn/no-unused-properties': 'off', // don't respect local keys
24
- 'unicorn/prefer-dom-node-html-methods': 'off', // Safari not supports setHTML()
25
- 'unicorn/prefer-export-from': ['error', { checkUsedVariables: true }],
26
- 'unicorn/prefer-https': 'off', // SVG need HTTP
27
- 'unicorn/prefer-import-meta-properties': 'warn',
28
- 'unicorn/prefer-iterator-concat': 'off', // ES2026 only
29
- 'unicorn/prefer-module': 'warn',
30
- 'unicorn/prefer-node-protocol': 'warn',
31
- 'unicorn/prefer-temporal': 'off', // ES2026 only
32
- 'unicorn/prefer-type-literal-last': 'off', // perfectionist/sort-intersection-types
33
- 'unicorn/prevent-abbreviations': [
17
+ 'unicorn/name-replacements': [
34
18
  'warn',
35
19
  {
36
20
  allowList: {
@@ -58,6 +42,22 @@ export const unicorn = defineConfig([
58
42
  replacements: { index18n: { i18n: true } },
59
43
  },
60
44
  ],
45
+ 'unicorn/no-array-reduce': ['error', { allowSimpleOperations: true }],
46
+ 'unicorn/no-asterisk-prefix-in-documentation-comments': 'off',
47
+ 'unicorn/no-empty-file': 'off',
48
+ 'unicorn/no-for-each': 'off',
49
+ 'unicorn/no-this-outside-of-class': 'off', // used in setters/getters
50
+ 'unicorn/no-top-level-side-effects': 'off', // Vue.js specific
51
+ 'unicorn/no-unused-properties': 'off', // don't respect local keys
52
+ 'unicorn/prefer-dom-node-html-methods': 'off', // Safari not supports setHTML()
53
+ 'unicorn/prefer-export-from': ['error', { checkUsedVariables: true }],
54
+ 'unicorn/prefer-https': 'off', // SVG need HTTP
55
+ 'unicorn/prefer-import-meta-properties': 'warn',
56
+ 'unicorn/prefer-iterator-concat': 'off', // ES2026 only
57
+ 'unicorn/prefer-module': 'warn',
58
+ 'unicorn/prefer-node-protocol': 'warn',
59
+ 'unicorn/prefer-temporal': 'off', // ES2026 only
60
+ 'unicorn/prefer-type-literal-last': 'off', // perfectionist/sort-intersection-types
61
61
  'unicorn/relative-url-style': ['error', 'always'],
62
62
  },
63
63
  },
package/plugins/zod.js ADDED
@@ -0,0 +1,17 @@
1
+ import plugin from 'eslint-plugin-zod';
2
+ import { defineConfig } from 'eslint/config';
3
+
4
+ import { FILES } from '../presets/base.js';
5
+
6
+ /** @see [eslint-plugin-zod](https://github.com/marcalexiei/eslint-zod/tree/main/plugins/eslint-plugin-zod) */
7
+ export const zod = defineConfig([
8
+ {
9
+ files: FILES,
10
+ ...plugin.configs.recommended,
11
+
12
+ rules: {
13
+ ...plugin.configs.recommended.rules,
14
+ 'zod/consistent-import': ['error', { syntax: 'named' }],
15
+ },
16
+ },
17
+ ]);