@danielwaltz/eslint-config 2.3.1 → 2.5.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
@@ -1,6 +1,39 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## v2.5.0
5
+
6
+ [compare changes](https://github.com/danielwaltz/eslint-config/compare/v2.4.0...v2.5.0)
7
+
8
+ ### 🚀 Enhancements
9
+
10
+ - Add eslint plugin depend ([1dc8d39](https://github.com/danielwaltz/eslint-config/commit/1dc8d39))
11
+
12
+ ### 🩹 Fixes
13
+
14
+ - Update sxzz config ([5289ac5](https://github.com/danielwaltz/eslint-config/commit/5289ac5))
15
+
16
+ ### ❤️ Contributors
17
+
18
+ - Daniel Waltz ([@danielwaltz](https://github.com/danielwaltz))
19
+
20
+ ## v2.4.0
21
+
22
+ [compare changes](https://github.com/danielwaltz/eslint-config/compare/v2.3.1...v2.4.0)
23
+
24
+ ### 🚀 Enhancements
25
+
26
+ - Update sxzz config ([cb76e3e](https://github.com/danielwaltz/eslint-config/commit/cb76e3e))
27
+
28
+ ### 🏡 Chore
29
+
30
+ - Approve local builds ([78a36c4](https://github.com/danielwaltz/eslint-config/commit/78a36c4))
31
+ - Migrate from `unbuild` to `obuild` ([a765b63](https://github.com/danielwaltz/eslint-config/commit/a765b63))
32
+
33
+ ### ❤️ Contributors
34
+
35
+ - Daniel Waltz ([@danielwaltz](https://github.com/danielwaltz))
36
+
4
37
  ## v2.3.1
5
38
 
6
39
  [compare changes](https://github.com/danielwaltz/eslint-config/compare/v2.3.0...v2.3.1)
package/dist/index.d.mts CHANGED
@@ -1,16 +1,20 @@
1
- import * as eslint_flat_config_utils from 'eslint-flat-config-utils';
2
- import { DefaultConfigNamesMap, ResolvableFlatConfig } from 'eslint-flat-config-utils';
3
- export { DefaultConfigNamesMap, defineFlatConfig } from 'eslint-flat-config-utils';
4
- import * as eslint from 'eslint';
5
- import { Linter } from 'eslint';
6
- import { sxzz } from '@sxzz/eslint-config';
7
- export * from '@sxzz/eslint-config';
1
+ import { sxzz } from "@sxzz/eslint-config";
2
+ import * as eslint_flat_config_utils9 from "eslint-flat-config-utils";
3
+ import * as eslint_flat_config_utils4 from "eslint-flat-config-utils";
4
+ import { DefaultConfigNamesMap, DefaultConfigNamesMap as DefaultConfigNamesMap$1, ResolvableFlatConfig, defineFlatConfig } from "eslint-flat-config-utils";
5
+ import * as eslint5 from "eslint";
6
+ import * as eslint0 from "eslint";
7
+ import { Linter } from "eslint";
8
+ export * from "@sxzz/eslint-config";
8
9
 
10
+ //#region src/types.d.ts
9
11
  type BaseConfig = Linter.Config;
10
- type BaseConfigNames = keyof DefaultConfigNamesMap;
11
-
12
- declare function defineFlatConfigs<const TConfig extends BaseConfig = BaseConfig, const TConfigNames extends string = BaseConfigNames>(...configs: ResolvableFlatConfig<TConfig>[]): eslint_flat_config_utils.FlatConfigComposer<eslint.Linter.Config<eslint.Linter.RulesRecord> extends TConfig ? TConfig : eslint.Linter.Config<eslint.Linter.RulesRecord>, TConfigNames>;
13
-
14
- declare function danielwaltz<const TConfig extends BaseConfig = BaseConfig, const TConfigNames extends string = BaseConfigNames>(...params: Parameters<typeof sxzz>): eslint_flat_config_utils.FlatConfigComposer<eslint.Linter.Config<eslint.Linter.RulesRecord> extends TConfig ? TConfig : eslint.Linter.Config<eslint.Linter.RulesRecord>, TConfigNames>;
15
-
16
- export { danielwaltz, defineFlatConfigs };
12
+ type BaseConfigNames = keyof DefaultConfigNamesMap$1;
13
+ //#endregion
14
+ //#region src/utils.d.ts
15
+ declare function defineFlatConfigs<const TConfig extends BaseConfig = BaseConfig, const TConfigNames extends string = BaseConfigNames>(...configs: ResolvableFlatConfig<TConfig>[]): eslint_flat_config_utils9.FlatConfigComposer<eslint5.Linter.Config<eslint5.Linter.RulesRecord> extends TConfig ? TConfig : eslint5.Linter.Config<eslint5.Linter.RulesRecord>, TConfigNames>;
16
+ //#endregion
17
+ //#region src/index.d.ts
18
+ declare function danielwaltz<const TConfig extends BaseConfig = BaseConfig, const TConfigNames extends string = BaseConfigNames>(...params: Parameters<typeof sxzz>): eslint_flat_config_utils4.FlatConfigComposer<eslint0.Linter.Config<eslint0.Linter.RulesRecord> extends TConfig ? TConfig : eslint0.Linter.Config<eslint0.Linter.RulesRecord>, TConfigNames>;
19
+ //#endregion
20
+ export { DefaultConfigNamesMap, danielwaltz, defineFlatConfig, defineFlatConfigs };
package/dist/index.mjs CHANGED
@@ -1,143 +1,149 @@
1
- import { sxzz, hasVue } from '@sxzz/eslint-config';
2
- export * from '@sxzz/eslint-config';
3
- import erasableSyntaxOnlyPlugin from 'eslint-plugin-erasable-syntax-only';
4
- import vueA11yPlugin from 'eslint-plugin-vuejs-accessibility';
5
- import { composer } from 'eslint-flat-config-utils';
6
- export { defineFlatConfig } from 'eslint-flat-config-utils';
1
+ import { hasVue, sxzz } from "@sxzz/eslint-config";
2
+ import { configs } from "eslint-plugin-depend";
3
+ import erasableSyntaxOnlyPlugin from "eslint-plugin-erasable-syntax-only";
4
+ import vueA11yPlugin from "eslint-plugin-vuejs-accessibility";
5
+ import { composer, defineFlatConfig } from "eslint-flat-config-utils";
7
6
 
7
+ export * from "@sxzz/eslint-config"
8
+
9
+ //#region src/configs/depend.ts
10
+ function dependConfigs() {
11
+ return [{
12
+ name: "danielwaltz/depend",
13
+ ...configs["flat/recommended"]
14
+ }];
15
+ }
16
+
17
+ //#endregion
18
+ //#region src/configs/typescript.ts
8
19
  function typescriptConfigs() {
9
- return [
10
- {
11
- name: "danielwaltz/erasable-syntax-only",
12
- ...erasableSyntaxOnlyPlugin.configs.recommended
13
- }
14
- ];
20
+ return [{
21
+ name: "danielwaltz/erasable-syntax-only",
22
+ ...erasableSyntaxOnlyPlugin.configs.recommended
23
+ }];
15
24
  }
16
25
 
26
+ //#endregion
27
+ //#region src/configs/unicorn.ts
17
28
  function unicornConfigs() {
18
- return [
19
- {
20
- name: "danielwaltz/unicorn",
21
- rules: {
22
- "unicorn/filename-case": [
23
- "error",
24
- {
25
- cases: { camelCase: true, kebabCase: true, pascalCase: true },
26
- ignore: [/^[A-Z]+\..*$/, /import_map\.json/]
27
- }
28
- ]
29
- }
30
- }
31
- ];
29
+ return [{
30
+ name: "danielwaltz/unicorn",
31
+ rules: { "unicorn/filename-case": ["error", {
32
+ cases: {
33
+ camelCase: true,
34
+ kebabCase: true,
35
+ pascalCase: true
36
+ },
37
+ ignore: [/^[A-Z]+\..*$/, /import_map\.json/]
38
+ }] }
39
+ }];
32
40
  }
33
41
 
42
+ //#endregion
43
+ //#region src/configs/vue.ts
34
44
  function vueConfigs() {
35
- return [
36
- ...vueA11yPlugin.configs["flat/recommended"],
37
- {
38
- name: "danielwaltz/vue",
39
- files: ["**/*.vue"],
40
- rules: {
41
- // Base
42
- "vue/block-lang": ["error", { script: { lang: ["ts", "tsx"] } }],
43
- "vue/block-order": [
44
- "error",
45
- { order: ["script", "template", "style"] }
46
- ],
47
- "vue/block-tag-newline": "error",
48
- "vue/component-api-style": ["error", ["script-setup"]],
49
- "vue/component-name-in-template-casing": "error",
50
- "vue/component-options-name-casing": "error",
51
- "vue/custom-event-name-casing": "error",
52
- "vue/define-emits-declaration": ["error", "type-based"],
53
- "vue/define-macros-order": [
54
- "error",
55
- {
56
- order: [
57
- "definePageMeta",
58
- "defineOptions",
59
- "defineModal",
60
- "defineProps",
61
- "defineEmits",
62
- "defineSlots"
63
- ],
64
- defineExposeLast: true
65
- }
66
- ],
67
- "vue/define-props-declaration": ["error", "type-based"],
68
- // "vue/define-props-destructuring": "error",
69
- "vue/enforce-style-attribute": ["error", { allow: ["scoped"] }],
70
- "vue/html-button-has-type": "error",
71
- "vue/html-comment-content-newline": "error",
72
- "vue/html-comment-content-spacing": "error",
73
- "vue/html-comment-indent": "error",
74
- "vue/match-component-file-name": [
75
- "error",
76
- { extensions: ["vue", "tsx"] }
77
- ],
78
- "vue/match-component-import-name": "error",
79
- "vue/next-tick-style": ["error", "promise"],
80
- "vue/no-boolean-default": "error",
81
- "vue/no-duplicate-attr-inheritance": "error",
82
- "vue/no-empty-component-block": "error",
83
- "vue/no-import-compiler-macros": "error",
84
- "vue/no-multiple-objects-in-class": "error",
85
- "vue/no-ref-object-reactivity-loss": "error",
86
- "vue/no-required-prop-with-default": ["error", { autofix: true }],
87
- "vue/no-reserved-component-names": "error",
88
- "vue/no-root-v-if": "error",
89
- "vue/no-template-target-blank": "error",
90
- "vue/no-unsupported-features": ["error", { version: "^3.5.0" }],
91
- "vue/no-unused-emit-declarations": "error",
92
- "vue/no-unused-properties": "error",
93
- "vue/no-unused-refs": "error",
94
- "vue/no-use-v-else-with-v-for": "error",
95
- "vue/no-useless-mustaches": "error",
96
- "vue/no-useless-v-bind": "error",
97
- "vue/no-v-text": "error",
98
- "vue/padding-line-between-blocks": "error",
99
- "vue/prefer-define-options": "error",
100
- "vue/prefer-prop-type-boolean-first": "error",
101
- "vue/prefer-separate-static-class": "error",
102
- "vue/prefer-true-attribute-shorthand": "error",
103
- "vue/prefer-use-template-ref": "error",
104
- "vue/require-direct-export": "error",
105
- "vue/require-macro-variable-name": "error",
106
- "vue/require-name-property": "error",
107
- "vue/require-typed-ref": "error",
108
- "vue/slot-name-casing": "error",
109
- "vue/v-bind-style": [
110
- "error",
111
- "shorthand",
112
- { sameNameShorthand: "always" }
113
- ],
114
- "vue/v-for-delimiter-style": "error",
115
- // "vue/v-on-handler-style": ["error", ["method", "inline"]],
116
- // Accessibility
117
- "vuejs-accessibility/alt-text": [
118
- "error",
119
- { img: ["AppImg", "BaseImg", "NuxtImg"] }
120
- ],
121
- "vuejs-accessibility/anchor-has-content": [
122
- "error",
123
- { components: ["AppLink", "BaseLink", "NuxtLink"] }
124
- ]
125
- }
126
- }
127
- ];
45
+ return [...vueA11yPlugin.configs["flat/recommended"], {
46
+ name: "danielwaltz/vue",
47
+ files: ["**/*.vue"],
48
+ rules: {
49
+ "vue/block-lang": ["error", { script: { lang: ["ts", "tsx"] } }],
50
+ "vue/block-order": ["error", { order: [
51
+ "script",
52
+ "template",
53
+ "style"
54
+ ] }],
55
+ "vue/block-tag-newline": "error",
56
+ "vue/component-api-style": ["error", ["script-setup"]],
57
+ "vue/component-name-in-template-casing": "error",
58
+ "vue/component-options-name-casing": "error",
59
+ "vue/custom-event-name-casing": "error",
60
+ "vue/define-emits-declaration": ["error", "type-based"],
61
+ "vue/define-macros-order": ["error", {
62
+ order: [
63
+ "definePageMeta",
64
+ "defineOptions",
65
+ "defineModal",
66
+ "defineProps",
67
+ "defineEmits",
68
+ "defineSlots"
69
+ ],
70
+ defineExposeLast: true
71
+ }],
72
+ "vue/define-props-declaration": ["error", "type-based"],
73
+ "vue/enforce-style-attribute": ["error", { allow: ["scoped"] }],
74
+ "vue/html-button-has-type": "error",
75
+ "vue/html-comment-content-newline": "error",
76
+ "vue/html-comment-content-spacing": "error",
77
+ "vue/html-comment-indent": "error",
78
+ "vue/match-component-file-name": ["error", { extensions: ["vue", "tsx"] }],
79
+ "vue/match-component-import-name": "error",
80
+ "vue/next-tick-style": ["error", "promise"],
81
+ "vue/no-boolean-default": "error",
82
+ "vue/no-duplicate-attr-inheritance": "error",
83
+ "vue/no-empty-component-block": "error",
84
+ "vue/no-import-compiler-macros": "error",
85
+ "vue/no-multiple-objects-in-class": "error",
86
+ "vue/no-ref-object-reactivity-loss": "error",
87
+ "vue/no-required-prop-with-default": ["error", { autofix: true }],
88
+ "vue/no-reserved-component-names": "error",
89
+ "vue/no-root-v-if": "error",
90
+ "vue/no-template-target-blank": "error",
91
+ "vue/no-unsupported-features": ["error", { version: "^3.5.0" }],
92
+ "vue/no-unused-emit-declarations": "error",
93
+ "vue/no-unused-properties": "error",
94
+ "vue/no-unused-refs": "error",
95
+ "vue/no-use-v-else-with-v-for": "error",
96
+ "vue/no-useless-mustaches": "error",
97
+ "vue/no-useless-v-bind": "error",
98
+ "vue/no-v-text": "error",
99
+ "vue/padding-line-between-blocks": "error",
100
+ "vue/prefer-define-options": "error",
101
+ "vue/prefer-prop-type-boolean-first": "error",
102
+ "vue/prefer-separate-static-class": "error",
103
+ "vue/prefer-true-attribute-shorthand": "error",
104
+ "vue/prefer-use-template-ref": "error",
105
+ "vue/require-direct-export": "error",
106
+ "vue/require-macro-variable-name": "error",
107
+ "vue/require-name-property": "error",
108
+ "vue/require-typed-ref": "error",
109
+ "vue/slot-name-casing": "error",
110
+ "vue/v-bind-style": [
111
+ "error",
112
+ "shorthand",
113
+ { sameNameShorthand: "always" }
114
+ ],
115
+ "vue/v-for-delimiter-style": "error",
116
+ "vuejs-accessibility/alt-text": ["error", { img: [
117
+ "AppImg",
118
+ "BaseImg",
119
+ "NuxtImg"
120
+ ] }],
121
+ "vuejs-accessibility/anchor-has-content": ["error", { components: [
122
+ "AppLink",
123
+ "BaseLink",
124
+ "NuxtLink"
125
+ ] }]
126
+ }
127
+ }];
128
128
  }
129
129
 
130
- function defineFlatConfigs(...configs) {
131
- return composer(...configs);
130
+ //#endregion
131
+ //#region src/utils.ts
132
+ function defineFlatConfigs(...configs$1) {
133
+ return composer(...configs$1);
132
134
  }
133
135
 
136
+ //#endregion
137
+ //#region src/index.ts
134
138
  function danielwaltz(...params) {
135
- const composer = defineFlatConfigs();
136
- composer.prepend(sxzz(...params));
137
- composer.append(typescriptConfigs());
138
- composer.append(unicornConfigs());
139
- if (hasVue()) composer.append(vueConfigs());
140
- return composer;
139
+ const composer$1 = defineFlatConfigs();
140
+ composer$1.prepend(sxzz(...params));
141
+ composer$1.append(dependConfigs());
142
+ composer$1.append(typescriptConfigs());
143
+ composer$1.append(unicornConfigs());
144
+ if (hasVue()) composer$1.append(vueConfigs());
145
+ return composer$1;
141
146
  }
142
147
 
143
- export { danielwaltz, defineFlatConfigs };
148
+ //#endregion
149
+ export { danielwaltz, defineFlatConfig, defineFlatConfigs };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@danielwaltz/eslint-config",
3
- "version": "2.3.1",
4
- "packageManager": "pnpm@10.10.0",
3
+ "version": "2.5.0",
4
+ "packageManager": "pnpm@10.11.1",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "eslint-config"
@@ -27,8 +27,8 @@
27
27
  }
28
28
  },
29
29
  "scripts": {
30
- "build": "unbuild",
31
- "stub": "unbuild --stub",
30
+ "build": "obuild",
31
+ "stub": "obuild --stub",
32
32
  "lint": "eslint",
33
33
  "type-check": "tsc --noEmit",
34
34
  "prepack": "pnpm build",
@@ -40,16 +40,17 @@
40
40
  "prettier": ">=3"
41
41
  },
42
42
  "dependencies": {
43
- "@sxzz/eslint-config": "^6.2.0",
44
- "eslint-flat-config-utils": "^2.0.1",
43
+ "@sxzz/eslint-config": "^7.0.2",
44
+ "eslint-flat-config-utils": "^2.1.0",
45
+ "eslint-plugin-depend": "^1.2.0",
45
46
  "eslint-plugin-erasable-syntax-only": "^0.3.1",
46
47
  "eslint-plugin-vuejs-accessibility": "^2.4.1"
47
48
  },
48
49
  "devDependencies": {
49
- "@tsconfig/node22": "^22.0.1",
50
- "@types/node": "~22.15.3",
50
+ "@tsconfig/node22": "^22.0.2",
51
+ "@types/node": "~22.15.30",
51
52
  "changelogen": "^0.6.1",
52
- "typescript": "~5.8.3",
53
- "unbuild": "^3.5.0"
53
+ "obuild": "^0.2.1",
54
+ "typescript": "~5.8.3"
54
55
  }
55
56
  }
package/dist/index.d.ts DELETED
@@ -1,16 +0,0 @@
1
- import * as eslint_flat_config_utils from 'eslint-flat-config-utils';
2
- import { DefaultConfigNamesMap, ResolvableFlatConfig } from 'eslint-flat-config-utils';
3
- export { DefaultConfigNamesMap, defineFlatConfig } from 'eslint-flat-config-utils';
4
- import * as eslint from 'eslint';
5
- import { Linter } from 'eslint';
6
- import { sxzz } from '@sxzz/eslint-config';
7
- export * from '@sxzz/eslint-config';
8
-
9
- type BaseConfig = Linter.Config;
10
- type BaseConfigNames = keyof DefaultConfigNamesMap;
11
-
12
- declare function defineFlatConfigs<const TConfig extends BaseConfig = BaseConfig, const TConfigNames extends string = BaseConfigNames>(...configs: ResolvableFlatConfig<TConfig>[]): eslint_flat_config_utils.FlatConfigComposer<eslint.Linter.Config<eslint.Linter.RulesRecord> extends TConfig ? TConfig : eslint.Linter.Config<eslint.Linter.RulesRecord>, TConfigNames>;
13
-
14
- declare function danielwaltz<const TConfig extends BaseConfig = BaseConfig, const TConfigNames extends string = BaseConfigNames>(...params: Parameters<typeof sxzz>): eslint_flat_config_utils.FlatConfigComposer<eslint.Linter.Config<eslint.Linter.RulesRecord> extends TConfig ? TConfig : eslint.Linter.Config<eslint.Linter.RulesRecord>, TConfigNames>;
15
-
16
- export { danielwaltz, defineFlatConfigs };