wrec 0.30.0 → 0.30.1
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/package.json +1 -1
- package/scripts/lint.js +7 -0
- package/scripts/used-by.js +7 -0
package/package.json
CHANGED
package/scripts/lint.js
CHANGED
|
@@ -1396,6 +1396,13 @@ export function lintSource(filePath, sourceText, options = {}) {
|
|
|
1396
1396
|
// Runs the command-line interface for the linter.
|
|
1397
1397
|
function main() {
|
|
1398
1398
|
const args = process.argv.slice(2);
|
|
1399
|
+
const unknownFlags = args.filter(
|
|
1400
|
+
arg => arg.startsWith('--') && arg !== '--verbose'
|
|
1401
|
+
);
|
|
1402
|
+
if (unknownFlags.length > 0) {
|
|
1403
|
+
fail(`unknown option: ${unknownFlags[0]}`);
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1399
1406
|
const verbose = args.includes('--verbose');
|
|
1400
1407
|
const positionalArgs = args.filter(arg => arg !== '--verbose');
|
|
1401
1408
|
|
package/scripts/used-by.js
CHANGED
|
@@ -638,6 +638,13 @@ function isSupportedSourceFile(filePath, excludeTests = false) {
|
|
|
638
638
|
// Handles CLI arguments and runs the script.
|
|
639
639
|
function main() {
|
|
640
640
|
const args = process.argv.slice(2);
|
|
641
|
+
const unknownFlags = args.filter(
|
|
642
|
+
arg => arg.startsWith('--') && arg !== '--dry'
|
|
643
|
+
);
|
|
644
|
+
if (unknownFlags.length > 0) {
|
|
645
|
+
throw new Error(`unknown option: ${unknownFlags[0]}`);
|
|
646
|
+
}
|
|
647
|
+
|
|
641
648
|
const inputPaths = args.filter(arg => !arg.startsWith('--'));
|
|
642
649
|
|
|
643
650
|
if (inputPaths.length !== 1) {
|