eslint-plugin-react-intl-static
Advanced tools
Comparing version 0.0.0-alpha.6 to 0.0.0-alpha.7
@@ -6,3 +6,3 @@ module.exports = { | ||
'static-call': require('./rules/static-call'), | ||
} | ||
} | ||
}, | ||
} |
{ | ||
"name": "eslint-plugin-react-intl-static", | ||
"version": "0.0.0-alpha.6", | ||
"version": "0.0.0-alpha.7", | ||
"description": "ESLint plugin for validating static react-intl usage", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -100,3 +100,3 @@ const { | ||
descriptorNode.property.type === 'Identifier' | ||
) { | ||
) { | ||
// try to validate non-computed property access of messages | ||
@@ -145,3 +145,3 @@ try { | ||
context.report({ | ||
node: descriptorNode, | ||
node: node, | ||
message: 'message descriptor is required in "formatMessage"', | ||
@@ -148,0 +148,0 @@ }) |
@@ -67,2 +67,3 @@ const { | ||
attrNode.type === 'JSXAttribute' && | ||
attrNode.value && | ||
attrNode.value.type === 'JSXExpressionContainer' | ||
@@ -69,0 +70,0 @@ ) { |
@@ -18,3 +18,4 @@ const { join } = require('path') | ||
propertyNode.kind !== 'init' || | ||
(propertyNode.key.type !== 'Identifier' && propertyNode.key.type !== 'Literal') | ||
(propertyNode.key.type !== 'Identifier' && | ||
propertyNode.key.type !== 'Literal') | ||
) { | ||
@@ -49,3 +50,3 @@ context.report({ | ||
function getDefaultMessageFallback(context, messageId) { | ||
if(!messageId) return | ||
if (!messageId) return | ||
return getLocalizationValues(context)[messageId] | ||
@@ -52,0 +53,0 @@ } |
26462
686