eslint-plugin-formatjs 6.4.10 → 6.4.11
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/index.js +10 -10
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/util.js.map +1 -1
package/index.js
CHANGED
|
@@ -240,16 +240,16 @@ let Element = /* @__PURE__ */ function(Element) {
|
|
|
240
240
|
function verifyAst$7(blocklist, ast) {
|
|
241
241
|
const errors = [];
|
|
242
242
|
for (const el of ast) {
|
|
243
|
-
if (isLiteralElement(el) && blocklist.includes(
|
|
244
|
-
if (isArgumentElement(el) && blocklist.includes(
|
|
245
|
-
if (isNumberElement(el) && blocklist.includes(
|
|
246
|
-
if (isDateElement(el) && blocklist.includes(
|
|
247
|
-
if (isTimeElement(el) && blocklist.includes(
|
|
248
|
-
if (isSelectElement(el) && blocklist.includes(
|
|
249
|
-
if (isTagElement(el) && blocklist.includes(
|
|
243
|
+
if (isLiteralElement(el) && blocklist.includes("literal")) errors.push(getMessage("literal"));
|
|
244
|
+
if (isArgumentElement(el) && blocklist.includes("argument")) errors.push(getMessage("argument"));
|
|
245
|
+
if (isNumberElement(el) && blocklist.includes("number")) errors.push(getMessage("number"));
|
|
246
|
+
if (isDateElement(el) && blocklist.includes("date")) errors.push(getMessage("date"));
|
|
247
|
+
if (isTimeElement(el) && blocklist.includes("time")) errors.push(getMessage("time"));
|
|
248
|
+
if (isSelectElement(el) && blocklist.includes("select")) errors.push(getMessage("select"));
|
|
249
|
+
if (isTagElement(el) && blocklist.includes("tag")) errors.push(getMessage("tag"));
|
|
250
250
|
if (isPluralElement(el)) {
|
|
251
|
-
if (blocklist.includes(
|
|
252
|
-
if (el.pluralType === "ordinal" && blocklist.includes(
|
|
251
|
+
if (blocklist.includes("plural")) errors.push(getMessage("argument"));
|
|
252
|
+
if (el.pluralType === "ordinal" && blocklist.includes("selectordinal")) errors.push(getMessage("selectordinal"));
|
|
253
253
|
}
|
|
254
254
|
if (isSelectElement(el) || isPluralElement(el)) {
|
|
255
255
|
const { options } = el;
|
|
@@ -4539,7 +4539,7 @@ var package_exports = /* @__PURE__ */ __exportAll({
|
|
|
4539
4539
|
});
|
|
4540
4540
|
var name$1 = "eslint-plugin-formatjs";
|
|
4541
4541
|
var description = "ESLint plugin for formatjs";
|
|
4542
|
-
var version$1 = "6.4.
|
|
4542
|
+
var version$1 = "6.4.11";
|
|
4543
4543
|
var license = "MIT";
|
|
4544
4544
|
var author = "Long Ho <holevietlong@gmail.com>";
|
|
4545
4545
|
var type = "module";
|