@saasmakers/eslint 1.0.11 → 1.0.13
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 +12 -0
- package/dist/index.mjs +12 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -200,9 +200,18 @@ function getStatementKind(node) {
|
|
|
200
200
|
if (isSuperCall(node)) {
|
|
201
201
|
return isSingleLine(node) ? "singleline-super" : "multiline-super";
|
|
202
202
|
}
|
|
203
|
+
if (isVoidExpression(node.expression)) {
|
|
204
|
+
return isSingleLine(node) ? "singleline-void" : "multiline-void";
|
|
205
|
+
}
|
|
203
206
|
if (isDirectivePrologue(node)) {
|
|
204
207
|
return null;
|
|
205
208
|
}
|
|
209
|
+
if (node.expression.type === index$1.distExports.AST_NODE_TYPES.AssignmentExpression) {
|
|
210
|
+
if (expressionUsesThis(node.expression)) {
|
|
211
|
+
return isSingleLine(node) ? "singleline-this" : "multiline-this";
|
|
212
|
+
}
|
|
213
|
+
return isSingleLine(node) ? "singleline-assignment" : "multiline-assignment";
|
|
214
|
+
}
|
|
206
215
|
if (expressionUsesThis(node.expression)) {
|
|
207
216
|
return isSingleLine(node) ? "singleline-this" : "multiline-this";
|
|
208
217
|
}
|
|
@@ -257,6 +266,9 @@ function isThisReceiver(node) {
|
|
|
257
266
|
}
|
|
258
267
|
return false;
|
|
259
268
|
}
|
|
269
|
+
function isVoidExpression(expression) {
|
|
270
|
+
return expression.type === index$1.distExports.AST_NODE_TYPES.UnaryExpression && expression.operator === "void";
|
|
271
|
+
}
|
|
260
272
|
const rule$a = {
|
|
261
273
|
defaultOptions: [],
|
|
262
274
|
meta: {
|
package/dist/index.mjs
CHANGED
|
@@ -198,9 +198,18 @@ function getStatementKind(node) {
|
|
|
198
198
|
if (isSuperCall(node)) {
|
|
199
199
|
return isSingleLine(node) ? "singleline-super" : "multiline-super";
|
|
200
200
|
}
|
|
201
|
+
if (isVoidExpression(node.expression)) {
|
|
202
|
+
return isSingleLine(node) ? "singleline-void" : "multiline-void";
|
|
203
|
+
}
|
|
201
204
|
if (isDirectivePrologue(node)) {
|
|
202
205
|
return null;
|
|
203
206
|
}
|
|
207
|
+
if (node.expression.type === distExports.AST_NODE_TYPES.AssignmentExpression) {
|
|
208
|
+
if (expressionUsesThis(node.expression)) {
|
|
209
|
+
return isSingleLine(node) ? "singleline-this" : "multiline-this";
|
|
210
|
+
}
|
|
211
|
+
return isSingleLine(node) ? "singleline-assignment" : "multiline-assignment";
|
|
212
|
+
}
|
|
204
213
|
if (expressionUsesThis(node.expression)) {
|
|
205
214
|
return isSingleLine(node) ? "singleline-this" : "multiline-this";
|
|
206
215
|
}
|
|
@@ -255,6 +264,9 @@ function isThisReceiver(node) {
|
|
|
255
264
|
}
|
|
256
265
|
return false;
|
|
257
266
|
}
|
|
267
|
+
function isVoidExpression(expression) {
|
|
268
|
+
return expression.type === distExports.AST_NODE_TYPES.UnaryExpression && expression.operator === "void";
|
|
269
|
+
}
|
|
258
270
|
const rule$a = {
|
|
259
271
|
defaultOptions: [],
|
|
260
272
|
meta: {
|