Skip to content

Commit 0a649eb

Browse files
authored
Add option to ignore import validation
1 parent dd14594 commit 0a649eb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/rules/no-deprecated-colors.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ module.exports = {
1111
create(context) {
1212
return {
1313
JSXOpeningElement(node) {
14+
const options = context.options[0] || {}
15+
const ignoreImport = options.ignoreImport || false
16+
1417
// Skip if component was not imported from @primer/components
15-
if (!isPrimerComponent(node.name, context.getScope(node))) {
18+
if (!ignoreImport && !isPrimerComponent(node.name, context.getScope(node))) {
1619
return
1720
}
1821

0 commit comments

Comments
 (0)