@blueprintjs/eslint-plugin
Advanced tools
Comparing version 0.4.0-beta.1 to 0.4.0-beta.2
@@ -50,2 +50,8 @@ "use strict"; | ||
function create(context, node) { | ||
var _a, _b; | ||
// We shouldn't lint on strings from imports/exports | ||
if (((_a = node.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.ImportDeclaration || | ||
((_b = node.parent) === null || _b === void 0 ? void 0 : _b.type) === experimental_utils_1.AST_NODE_TYPES.ExportNamedDeclaration) { | ||
return; | ||
} | ||
const nodeValue = node.type === experimental_utils_1.AST_NODE_TYPES.Literal ? node.raw : node.value.raw; | ||
@@ -52,0 +58,0 @@ const prefixMatches = getAllMatches(nodeValue); |
{ | ||
"name": "@blueprintjs/eslint-plugin", | ||
"version": "0.4.0-beta.1", | ||
"version": "0.4.0-beta.2", | ||
"description": "ESLint rules for use with @blueprintjs packages", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -55,2 +55,9 @@ /* | ||
function create(context: RuleContext<MessageIds, []>, node: TSESTree.Literal | TSESTree.TemplateElement): void { | ||
// We shouldn't lint on strings from imports/exports | ||
if ( | ||
node.parent?.type === AST_NODE_TYPES.ImportDeclaration || | ||
node.parent?.type === AST_NODE_TYPES.ExportNamedDeclaration | ||
) { | ||
return; | ||
} | ||
const nodeValue = node.type === AST_NODE_TYPES.Literal ? node.raw : node.value.raw; | ||
@@ -57,0 +64,0 @@ const prefixMatches = getAllMatches(nodeValue); |
@@ -165,3 +165,7 @@ /* | ||
'<div className="pt-icon-folder-open" />', | ||
// don't flag strings in export/import statements | ||
'import { test } from "packagewithpt-thatshouldnterror";', | ||
'export { test } from "packagewithpt-thatshouldnterror";', | ||
], | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78726
1489