summaryrefslogtreecommitdiff
path: root/dev/lint/global-declarations.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-02-14 20:25:41 -0500
committerGitHub <noreply@github.com>2021-02-14 20:25:41 -0500
commitd6332d2bc723f9aa60f2c886564bef49a6b91b84 (patch)
treea86c90cdc02f5a7d6633f69e48f3b9d289b61130 /dev/lint/global-declarations.js
parentd97c84f8ac1ac3dc6e058057aa7a4ad5c54930ac (diff)
Test html script ordering (#1396)
* Simplify getAllFiles * Add test to validate script order * Update script include order * Update content script order * Update sw.js and corresponding lint * Update manifest
Diffstat (limited to 'dev/lint/global-declarations.js')
-rw-r--r--dev/lint/global-declarations.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/dev/lint/global-declarations.js b/dev/lint/global-declarations.js
index 61739c42..914d1266 100644
--- a/dev/lint/global-declarations.js
+++ b/dev/lint/global-declarations.js
@@ -117,10 +117,10 @@ function main() {
const fix = (process.argv.length >= 2 && process.argv[2] === '--fix');
const directory = path.resolve(__dirname, '..', '..', 'ext');
const pattern = /\.js$/;
- const ignorePattern = /[\\/]ext[\\/]lib[\\/]/;
- const fileNames = getAllFiles(directory, null, (f) => pattern.test(f) && !ignorePattern.test(f));
+ const ignorePattern = /^lib[\\/]/;
+ const fileNames = getAllFiles(directory, (f) => pattern.test(f) && !ignorePattern.test(f));
for (const fileName of fileNames) {
- if (!validateGlobals(fileName, fix)) {
+ if (!validateGlobals(path.join(directory, fileName), fix)) {
process.exit(-1);
return;
}