@saasmakers/eslint 0.1.6 → 0.1.8
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/dist/index.cjs +7 -4
- package/dist/index.mjs +7 -4
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -137,11 +137,11 @@ const rule$c = {
|
|
|
137
137
|
meta: {
|
|
138
138
|
docs: {
|
|
139
139
|
category: "Best Practices",
|
|
140
|
-
description: "Enforce sorted test functions grouped by method with sorted exceptions and middlewares",
|
|
140
|
+
description: "Enforce sorted test functions grouped by method with sorted errors, exceptions and middlewares",
|
|
141
141
|
recommended: true
|
|
142
142
|
},
|
|
143
143
|
fixable: "code",
|
|
144
|
-
messages: { sortError: "Test functions should be grouped by method with sorted exceptions and middlewares." },
|
|
144
|
+
messages: { sortError: "Test functions should be grouped by method with sorted errors, exceptions and middlewares." },
|
|
145
145
|
schema: [],
|
|
146
146
|
type: "suggestion"
|
|
147
147
|
},
|
|
@@ -157,9 +157,12 @@ const rule$c = {
|
|
|
157
157
|
}
|
|
158
158
|
function getTestPriority(testName) {
|
|
159
159
|
if (testName.includes(".middlewares.")) {
|
|
160
|
-
return
|
|
160
|
+
return 4;
|
|
161
161
|
}
|
|
162
162
|
if (testName.includes(".exceptions.")) {
|
|
163
|
+
return 3;
|
|
164
|
+
}
|
|
165
|
+
if (testName.includes(".errors.")) {
|
|
163
166
|
return 2;
|
|
164
167
|
}
|
|
165
168
|
return 1;
|
|
@@ -171,7 +174,7 @@ const rule$c = {
|
|
|
171
174
|
function getSpecificName(testName) {
|
|
172
175
|
const parts = testName.split(".");
|
|
173
176
|
const specialIndex = parts.findIndex(
|
|
174
|
-
(part) => part === "exceptions" || part === "middlewares"
|
|
177
|
+
(part) => part === "errors" || part === "exceptions" || part === "middlewares"
|
|
175
178
|
);
|
|
176
179
|
if (specialIndex === -1) {
|
|
177
180
|
return parts.slice(2).join(".");
|
package/dist/index.mjs
CHANGED
|
@@ -133,11 +133,11 @@ const rule$c = {
|
|
|
133
133
|
meta: {
|
|
134
134
|
docs: {
|
|
135
135
|
category: "Best Practices",
|
|
136
|
-
description: "Enforce sorted test functions grouped by method with sorted exceptions and middlewares",
|
|
136
|
+
description: "Enforce sorted test functions grouped by method with sorted errors, exceptions and middlewares",
|
|
137
137
|
recommended: true
|
|
138
138
|
},
|
|
139
139
|
fixable: "code",
|
|
140
|
-
messages: { sortError: "Test functions should be grouped by method with sorted exceptions and middlewares." },
|
|
140
|
+
messages: { sortError: "Test functions should be grouped by method with sorted errors, exceptions and middlewares." },
|
|
141
141
|
schema: [],
|
|
142
142
|
type: "suggestion"
|
|
143
143
|
},
|
|
@@ -153,9 +153,12 @@ const rule$c = {
|
|
|
153
153
|
}
|
|
154
154
|
function getTestPriority(testName) {
|
|
155
155
|
if (testName.includes(".middlewares.")) {
|
|
156
|
-
return
|
|
156
|
+
return 4;
|
|
157
157
|
}
|
|
158
158
|
if (testName.includes(".exceptions.")) {
|
|
159
|
+
return 3;
|
|
160
|
+
}
|
|
161
|
+
if (testName.includes(".errors.")) {
|
|
159
162
|
return 2;
|
|
160
163
|
}
|
|
161
164
|
return 1;
|
|
@@ -167,7 +170,7 @@ const rule$c = {
|
|
|
167
170
|
function getSpecificName(testName) {
|
|
168
171
|
const parts = testName.split(".");
|
|
169
172
|
const specialIndex = parts.findIndex(
|
|
170
|
-
(part) => part === "exceptions" || part === "middlewares"
|
|
173
|
+
(part) => part === "errors" || part === "exceptions" || part === "middlewares"
|
|
171
174
|
);
|
|
172
175
|
if (specialIndex === -1) {
|
|
173
176
|
return parts.slice(2).join(".");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasmakers/eslint",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.8",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Shared ESLint config for SaaS Makers projects",
|
|
7
7
|
"license": "MIT",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/estree": "1.0.8",
|
|
41
|
-
"eslint": "9.39.
|
|
41
|
+
"eslint": "9.39.2",
|
|
42
42
|
"typescript": "5.9.3",
|
|
43
43
|
"@saasmakers/config": "0.1.20"
|
|
44
44
|
},
|