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