From edfec3e641d28d58f070b9aed6d5331a0a2288fc Mon Sep 17 00:00:00 2001 From: Chris Cuellar <58723+ChrisC@users.noreply.github.com> Date: Sun, 5 Oct 2025 13:06:30 -0700 Subject: [PATCH] fixes linter for directories with `json` files Fixes error when linting the `json-modules` feature which points to test/language/import/import-attributes, containing .json fixture files. The linter's file_is_test() function was only filtering out FIXTURE.js files but not .json files, so it tried to read frontmatter from the JSON files and failed. --- tools/web-features/lint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/web-features/lint.py b/tools/web-features/lint.py index faa119cc9a..48d6027807 100755 --- a/tools/web-features/lint.py +++ b/tools/web-features/lint.py @@ -22,7 +22,7 @@ def read_features(filename): return yaml.safe_load(frontmatter).get('features', []) def file_is_test(filename): - return not filename.endswith('FIXTURE.js') + return not (filename.endswith('FIXTURE.js') or filename.endswith('.json')) def pattern_from_path_spec(path_spec): return re.compile(re.sub('\*', '.*', path_spec))