@danielwaltz/eslint-config 3.0.1 → 3.2.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 +33 -0
- package/dist/index.mjs +104 -115
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## v3.2.0
|
|
5
|
+
|
|
6
|
+
[compare changes](https://github.com/danielwaltz/eslint-config/compare/v3.1.0...v3.2.0)
|
|
7
|
+
|
|
8
|
+
### 🚀 Enhancements
|
|
9
|
+
|
|
10
|
+
- Update configs ([c997c0c](https://github.com/danielwaltz/eslint-config/commit/c997c0c))
|
|
11
|
+
|
|
12
|
+
### 🩹 Fixes
|
|
13
|
+
|
|
14
|
+
- Allow top level await in vue sfcs ([b443be9](https://github.com/danielwaltz/eslint-config/commit/b443be9))
|
|
15
|
+
|
|
16
|
+
### ❤️ Contributors
|
|
17
|
+
|
|
18
|
+
- Daniel Waltz ([@danielwaltz](https://github.com/danielwaltz))
|
|
19
|
+
|
|
20
|
+
## v3.1.0
|
|
21
|
+
|
|
22
|
+
[compare changes](https://github.com/danielwaltz/eslint-config/compare/v3.0.1...v3.1.0)
|
|
23
|
+
|
|
24
|
+
### 🚀 Enhancements
|
|
25
|
+
|
|
26
|
+
- Add new directives rule ([389eac9](https://github.com/danielwaltz/eslint-config/commit/389eac9))
|
|
27
|
+
|
|
28
|
+
### 🏡 Chore
|
|
29
|
+
|
|
30
|
+
- Update tsconfig version ([f20749d](https://github.com/danielwaltz/eslint-config/commit/f20749d))
|
|
31
|
+
- Update deps ([f518fb3](https://github.com/danielwaltz/eslint-config/commit/f518fb3))
|
|
32
|
+
|
|
33
|
+
### ❤️ Contributors
|
|
34
|
+
|
|
35
|
+
- Daniel Waltz ([@danielwaltz](https://github.com/danielwaltz))
|
|
36
|
+
|
|
4
37
|
## v3.0.1
|
|
5
38
|
|
|
6
39
|
[compare changes](https://github.com/danielwaltz/eslint-config/compare/v3.0.0...v3.0.1)
|
package/dist/index.mjs
CHANGED
|
@@ -1,30 +1,21 @@
|
|
|
1
|
-
import { hasVue, sxzz } from "@sxzz/eslint-config";
|
|
1
|
+
import { baseline, hasVue, sxzz } from "@sxzz/eslint-config";
|
|
2
2
|
import e18e from "@e18e/eslint-plugin";
|
|
3
3
|
import erasableSyntaxOnlyPlugin from "eslint-plugin-erasable-syntax-only";
|
|
4
4
|
import vueA11yPlugin from "eslint-plugin-vuejs-accessibility";
|
|
5
|
-
import { composer, defineFlatConfig } from "eslint-flat-config-utils";
|
|
6
|
-
|
|
7
|
-
export * from "@sxzz/eslint-config"
|
|
8
|
-
|
|
9
|
-
//#region src/configs/e18e.ts
|
|
5
|
+
import { composer as composer$1, defineFlatConfig } from "eslint-flat-config-utils";
|
|
6
|
+
export * from "@sxzz/eslint-config";
|
|
10
7
|
function e18eConfigs() {
|
|
11
8
|
return [{
|
|
12
9
|
...e18e.configs.recommended,
|
|
13
10
|
name: "danielwaltz/e18e"
|
|
14
11
|
}];
|
|
15
12
|
}
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/configs/typescript.ts
|
|
19
13
|
function typescriptConfigs() {
|
|
20
14
|
return [{
|
|
21
15
|
name: "danielwaltz/erasable-syntax-only",
|
|
22
16
|
...erasableSyntaxOnlyPlugin.configs.recommended
|
|
23
17
|
}];
|
|
24
18
|
}
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region src/configs/unicorn.ts
|
|
28
19
|
function unicornConfigs() {
|
|
29
20
|
return [{
|
|
30
21
|
name: "danielwaltz/unicorn",
|
|
@@ -38,114 +29,112 @@ function unicornConfigs() {
|
|
|
38
29
|
}] }
|
|
39
30
|
}];
|
|
40
31
|
}
|
|
41
|
-
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region src/configs/vue.ts
|
|
44
32
|
function vueConfigs() {
|
|
45
|
-
return [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"script",
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
33
|
+
return [
|
|
34
|
+
...vueA11yPlugin.configs["flat/recommended"],
|
|
35
|
+
{
|
|
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
|
+
"defineModel",
|
|
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-negated-condition": "error",
|
|
77
|
+
"vue/no-negated-v-if-condition": "error",
|
|
78
|
+
"vue/no-ref-object-reactivity-loss": "error",
|
|
79
|
+
"vue/no-required-prop-with-default": ["error", { autofix: true }],
|
|
80
|
+
"vue/no-reserved-component-names": "error",
|
|
81
|
+
"vue/no-root-v-if": "error",
|
|
82
|
+
"vue/no-template-target-blank": "error",
|
|
83
|
+
"vue/no-undef-directives": "error",
|
|
84
|
+
"vue/no-unsupported-features": ["error", { version: "^3.5.0" }],
|
|
85
|
+
"vue/no-unused-emit-declarations": "error",
|
|
86
|
+
"vue/no-unused-properties": "error",
|
|
87
|
+
"vue/no-unused-refs": "error",
|
|
88
|
+
"vue/no-use-v-else-with-v-for": "error",
|
|
89
|
+
"vue/no-useless-mustaches": "error",
|
|
90
|
+
"vue/no-useless-v-bind": "error",
|
|
91
|
+
"vue/no-v-text": "error",
|
|
92
|
+
"vue/padding-line-between-blocks": "error",
|
|
93
|
+
"vue/prefer-define-options": "error",
|
|
94
|
+
"vue/prefer-prop-type-boolean-first": "error",
|
|
95
|
+
"vue/prefer-separate-static-class": "error",
|
|
96
|
+
"vue/prefer-true-attribute-shorthand": "error",
|
|
97
|
+
"vue/prefer-use-template-ref": "error",
|
|
98
|
+
"vue/require-direct-export": "error",
|
|
99
|
+
"vue/require-macro-variable-name": "error",
|
|
100
|
+
"vue/require-name-property": "error",
|
|
101
|
+
"vue/require-typed-ref": "error",
|
|
102
|
+
"vue/slot-name-casing": "error",
|
|
103
|
+
"vue/v-bind-style": [
|
|
104
|
+
"error",
|
|
105
|
+
"shorthand",
|
|
106
|
+
{ sameNameShorthand: "always" }
|
|
69
107
|
],
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"vue/
|
|
85
|
-
|
|
86
|
-
"
|
|
87
|
-
"vue/no-negated-v-if-condition": "error",
|
|
88
|
-
"vue/no-ref-object-reactivity-loss": "error",
|
|
89
|
-
"vue/no-required-prop-with-default": ["error", { autofix: true }],
|
|
90
|
-
"vue/no-reserved-component-names": "error",
|
|
91
|
-
"vue/no-root-v-if": "error",
|
|
92
|
-
"vue/no-template-target-blank": "error",
|
|
93
|
-
"vue/no-unsupported-features": ["error", { version: "^3.5.0" }],
|
|
94
|
-
"vue/no-unused-emit-declarations": "error",
|
|
95
|
-
"vue/no-unused-properties": "error",
|
|
96
|
-
"vue/no-unused-refs": "error",
|
|
97
|
-
"vue/no-use-v-else-with-v-for": "error",
|
|
98
|
-
"vue/no-useless-mustaches": "error",
|
|
99
|
-
"vue/no-useless-v-bind": "error",
|
|
100
|
-
"vue/no-v-text": "error",
|
|
101
|
-
"vue/padding-line-between-blocks": "error",
|
|
102
|
-
"vue/prefer-define-options": "error",
|
|
103
|
-
"vue/prefer-prop-type-boolean-first": "error",
|
|
104
|
-
"vue/prefer-separate-static-class": "error",
|
|
105
|
-
"vue/prefer-true-attribute-shorthand": "error",
|
|
106
|
-
"vue/prefer-use-template-ref": "error",
|
|
107
|
-
"vue/require-direct-export": "error",
|
|
108
|
-
"vue/require-macro-variable-name": "error",
|
|
109
|
-
"vue/require-name-property": "error",
|
|
110
|
-
"vue/require-typed-ref": "error",
|
|
111
|
-
"vue/slot-name-casing": "error",
|
|
112
|
-
"vue/v-bind-style": [
|
|
113
|
-
"error",
|
|
114
|
-
"shorthand",
|
|
115
|
-
{ sameNameShorthand: "always" }
|
|
116
|
-
],
|
|
117
|
-
"vue/v-for-delimiter-style": "error",
|
|
118
|
-
"vuejs-accessibility/alt-text": ["error", { img: [
|
|
119
|
-
"AppImg",
|
|
120
|
-
"BaseImg",
|
|
121
|
-
"NuxtImg"
|
|
122
|
-
] }],
|
|
123
|
-
"vuejs-accessibility/anchor-has-content": ["error", { components: [
|
|
124
|
-
"AppLink",
|
|
125
|
-
"BaseLink",
|
|
126
|
-
"NuxtLink"
|
|
127
|
-
] }]
|
|
108
|
+
"vue/v-for-delimiter-style": "error",
|
|
109
|
+
"vuejs-accessibility/alt-text": ["error", { img: [
|
|
110
|
+
"AppImg",
|
|
111
|
+
"BaseImg",
|
|
112
|
+
"NuxtImg"
|
|
113
|
+
] }],
|
|
114
|
+
"vuejs-accessibility/anchor-has-content": ["error", { components: [
|
|
115
|
+
"AppLink",
|
|
116
|
+
"BaseLink",
|
|
117
|
+
"NuxtLink"
|
|
118
|
+
] }]
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: "danielwaltz/vue/baseline",
|
|
123
|
+
files: ["**/*.vue"],
|
|
124
|
+
...baseline({ ignoreFeatures: ["top-level-await"] })
|
|
128
125
|
}
|
|
129
|
-
|
|
126
|
+
];
|
|
130
127
|
}
|
|
131
|
-
|
|
132
|
-
//#endregion
|
|
133
|
-
//#region src/utils.ts
|
|
134
128
|
function defineFlatConfigs(...configs) {
|
|
135
|
-
return composer(...configs);
|
|
129
|
+
return composer$1(...configs);
|
|
136
130
|
}
|
|
137
|
-
|
|
138
|
-
//#endregion
|
|
139
|
-
//#region src/index.ts
|
|
140
131
|
function danielwaltz(...params) {
|
|
141
|
-
const composer
|
|
142
|
-
composer
|
|
143
|
-
composer
|
|
144
|
-
composer
|
|
145
|
-
composer
|
|
146
|
-
if (hasVue()) composer
|
|
147
|
-
return composer
|
|
132
|
+
const composer = defineFlatConfigs();
|
|
133
|
+
composer.prepend(sxzz(...params));
|
|
134
|
+
composer.append(e18eConfigs());
|
|
135
|
+
composer.append(typescriptConfigs());
|
|
136
|
+
composer.append(unicornConfigs());
|
|
137
|
+
if (hasVue()) composer.append(vueConfigs());
|
|
138
|
+
return composer;
|
|
148
139
|
}
|
|
149
|
-
|
|
150
|
-
//#endregion
|
|
151
|
-
export { danielwaltz, defineFlatConfig, defineFlatConfigs };
|
|
140
|
+
export { danielwaltz, defineFlatConfig, defineFlatConfigs };
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielwaltz/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0
|
|
5
|
-
"packageManager": "pnpm@10.28.
|
|
4
|
+
"version": "3.2.0",
|
|
5
|
+
"packageManager": "pnpm@10.28.2",
|
|
6
6
|
"author": "Daniel Waltz",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
"prettier": ">=3"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@e18e/eslint-plugin": "^0.1.
|
|
49
|
-
"@sxzz/eslint-config": "^7.
|
|
50
|
-
"eslint-flat-config-utils": "^
|
|
48
|
+
"@e18e/eslint-plugin": "^0.1.4",
|
|
49
|
+
"@sxzz/eslint-config": "^7.6.0",
|
|
50
|
+
"eslint-flat-config-utils": "^3.0.0",
|
|
51
51
|
"eslint-plugin-erasable-syntax-only": "^0.4.0",
|
|
52
52
|
"eslint-plugin-vuejs-accessibility": "^2.4.1"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@tsconfig/
|
|
56
|
-
"@types/node": "~24.10.
|
|
55
|
+
"@tsconfig/node24": "^24.0.4",
|
|
56
|
+
"@types/node": "~24.10.11",
|
|
57
57
|
"changelogen": "^0.6.2",
|
|
58
|
-
"obuild": "^0.4.
|
|
58
|
+
"obuild": "^0.4.22",
|
|
59
59
|
"typescript": "~5.9.3"
|
|
60
60
|
}
|
|
61
61
|
}
|