@so1ve/eslint-plugin 3.24.0 → 3.25.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/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -270,7 +270,7 @@ const rule$7 = createEslintRule({
|
|
|
270
270
|
expectedLine = endNode.loc.end.line + 1;
|
|
271
271
|
tokenLine = token?.loc.start.line;
|
|
272
272
|
const commentLine = nextComment?.loc.start.line;
|
|
273
|
-
if (token && (expectedLine === tokenLine || expectedLine === commentLine) && token.value !== "}" && token.value !== "<\/script>") return endNode;
|
|
273
|
+
if (token && (expectedLine === tokenLine || expectedLine === commentLine || tokenLine === endNode.loc.end.line) && token.value !== "}" && token.value !== "<\/script>") return endNode;
|
|
274
274
|
return null;
|
|
275
275
|
}
|
|
276
276
|
const startNode = sourceCode.getCommentsBefore(node)[0] || node;
|
|
@@ -296,7 +296,7 @@ const rule$7 = createEslintRule({
|
|
|
296
296
|
});
|
|
297
297
|
for (const node of exportNodes) {
|
|
298
298
|
const prevNode = getPreviousNode(node);
|
|
299
|
-
if ((!prevNode || !isExportDeclaration(prevNode)) && !
|
|
299
|
+
if ((!prevNode || !isExportDeclaration(prevNode)) && (!lastImportNode || prevNode !== lastImportNode)) {
|
|
300
300
|
const beforeFixNode = checkNewline(node, "before");
|
|
301
301
|
if (beforeFixNode) context.report({
|
|
302
302
|
node,
|