eslint: Ignore the meson-* & subprojects folder in the workspace
Modify eslint configuration to ignore the meson-* folder (ignores
the meson build log files - that fails(below) the json validation
test). This helps users to re-use the build directory while running the
local CI.
Also ignoring the meson subprojects folder as , we dont want eslint to be checking
for errors that are not part of openbmc.
Fixes :
/home/zshelle/sandbox/bmc1/openpower-hw-diags/build/meson-logs/testlog-ubasan.json
2:2 error End of file expected json/*
/home/zshelle/sandbox/bmc1/openpower-hw-diags/build/meson-logs/testlog-valgrind.json
2:2 error End of file expected json/*
/home/zshelle/sandbox/bmc1/openpower-hw-diags/build/meson-logs/testlog.json
2:2 error End of file expected json/*
✖ 3 problems (3 errors, 0 warnings)
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: If2f03aab86db953187a5ca8f3828263582d56712
diff --git a/config/eslint-global-config.json b/config/eslint-global-config.json
index abd7853..4e3da2f 100644
--- a/config/eslint-global-config.json
+++ b/config/eslint-global-config.json
@@ -1,3 +1,11 @@
{
- "extends": ["plugin:json/recommended-with-comments"]
+ "extends": ["plugin:json/recommended-with-comments"],
+
+ // Generated json files created by meson does not pass
+ // the standard eslint json validation, so ignoring them.
+
+ // We dont want to lint the json files in the suprojects, so
+ // ignoring the json files in the subprojects folder
+
+ "ignorePatterns":["**/meson-*/*.json", "subprojects/**/*.json"]
}