grunt-banana-checker
Advanced tools
Comparing version 0.11.0 to 0.11.1
{ | ||
"name": "grunt-banana-checker", | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"description": "Checker for the 'Banana' JSON-file format for interface messages, as used by MediaWiki and jQuery.i18n.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -9,3 +9,3 @@ # banana-checker | ||
* Both files include a `@metadata` object. | ||
* Each defined source message is documentated. | ||
* Each defined source message is documented. | ||
* Each defined documentation entry has a matching source message. | ||
@@ -15,3 +15,3 @@ | ||
You can use Banana checker [standalone](#command-line-interface), or as [Grunt plugin](#getting-started-grunt-plugin). | ||
You can use Banana checker [standalone](#command-line-interface) or as a [Grunt plugin](#getting-started-grunt-plugin). | ||
@@ -34,3 +34,3 @@ ## Getting started (Grunt plugin) | ||
In Gruntfile.js, add a configuation key for `banana` and set it to an empty object. | ||
In Gruntfile.js, add a configuration key for `banana` and set it to an empty object. | ||
@@ -163,3 +163,3 @@ We will use this object to declare which directory contains the interface messages. For example, to enable grunt-banana-checker for a single directory only, configure it like so: | ||
Whether to fail if any message key is not prefixed by the given prefix, or if multiple, one of the | ||
given prefices. | ||
given prefixes. | ||
@@ -166,0 +166,0 @@ #### disallowUnusedDocumentation |
@@ -29,2 +29,3 @@ 'use strict'; | ||
disallowUnusedTranslations: false, | ||
disallowEmptyDocumentation: true, | ||
ignoreMissingBlankTranslations: true, | ||
@@ -31,0 +32,0 @@ |
@@ -16,3 +16,3 @@ #!/usr/bin/env node | ||
switch ( key ) { | ||
// String option | ||
// String options | ||
case 'sourceFile': | ||
@@ -23,5 +23,6 @@ case 'documentationFile': | ||
// Boolean option, default-true | ||
// Boolean options | ||
case 'disallowBlankTranslations': | ||
case 'disallowUnusedDocumentation': | ||
case 'disallowEmptyDocumentation': | ||
case 'allowLeadingWhitespace': | ||
@@ -32,12 +33,2 @@ case 'ignoreMissingBlankTranslations': | ||
case 'requireMetadata': | ||
if ( value === undefined || value === '1' || value === 'true' ) { | ||
options[ key ] = true; | ||
} else if ( value === '0' || value === 'false' ) { | ||
options[ key ] = false; | ||
} else { | ||
console.error( `banana-check: Invalid option ignored, --${key}=${value}` ); | ||
} | ||
break; | ||
// Boolean option, default-false | ||
case 'disallowDuplicateTranslations': | ||
@@ -49,3 +40,3 @@ case 'disallowUnusedTranslations': | ||
options[ key ] = true; | ||
} else if ( value === undefined || value === '0' || value === 'false' ) { | ||
} else if ( value === '0' || value === 'false' ) { | ||
options[ key ] = false; | ||
@@ -57,3 +48,3 @@ } else { | ||
// Array option | ||
// Array options | ||
case 'requireCompleteTranslationLanguages': | ||
@@ -64,2 +55,3 @@ case 'requireCompleteTranslationMessages': | ||
break; | ||
default: | ||
@@ -66,0 +58,0 @@ console.error( `banana-check: Invalid option ignored, --${key}` ); |
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
26786
528