@so1ve/eslint-plugin 0.60.0 → 0.60.1
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 +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -168,7 +168,7 @@ const padAfterLastImport = createEslintRule({
|
|
|
168
168
|
"Program:exit"() {
|
|
169
169
|
if (lastImportNode) {
|
|
170
170
|
const nextToken = sourceCode.getTokenAfter(lastImportNode);
|
|
171
|
-
if (lastImportNode.loc.end.line + 1 === nextToken.loc.start.line) {
|
|
171
|
+
if (nextToken && lastImportNode.loc.end.line + 1 === nextToken.loc.start.line) {
|
|
172
172
|
context.report({
|
|
173
173
|
node: lastImportNode,
|
|
174
174
|
messageId: "padAfterLastImport",
|
package/dist/index.mjs
CHANGED
|
@@ -166,7 +166,7 @@ const padAfterLastImport = createEslintRule({
|
|
|
166
166
|
"Program:exit"() {
|
|
167
167
|
if (lastImportNode) {
|
|
168
168
|
const nextToken = sourceCode.getTokenAfter(lastImportNode);
|
|
169
|
-
if (lastImportNode.loc.end.line + 1 === nextToken.loc.start.line) {
|
|
169
|
+
if (nextToken && lastImportNode.loc.end.line + 1 === nextToken.loc.start.line) {
|
|
170
170
|
context.report({
|
|
171
171
|
node: lastImportNode,
|
|
172
172
|
messageId: "padAfterLastImport",
|