Closed as not planned
Description
Since eslint v9, we have the following issue in MegaLinter
[eslint-plugin-jsonc] command: ['eslint', '--no-ignore', '--fix', '-c', '/action/lib/.automation/.eslintrc-json.json', '--no-config-lookup', '--format', '@microsoft/eslint-formatter-sarif', '-o', '/tmp/257cdc5b-5fd5-4117-9ea3-9a25b1c03ecb/sarif/JSON_ESLINT_PLUGIN_JSONC.sarif', 'json_fix_1.json']
[eslint-plugin-jsonc] CWD: /tmp/lint/.automation/test/json
[Sarif] ERROR: there is no SARIF output file found, and stdout doesn't contain SARIF
[Sarif] stdout:
Oops! Something went wrong! :(
ESLint: 9.0.0
TypeError [ERR_IMPORT_ATTRIBUTE_MISSING]: Module "file:///action/lib/.automation/.eslintrc-json.json?mtime=1712586949000" needs an import attribute of "type: json"
at validateAttributes (node:internal/modules/esm/assert:88:15)
at defaultLoad (node:internal/modules/esm/load:153:3)
at async ModuleLoader.load (node:internal/modules/esm/loader:403:7)
at async ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:45)
at async link (node:internal/modules/esm/module_job:78:21)
[eslint-plugin-jsonc] result: 2
Oops! Something went wrong! :(
ESLint: 9.0.0
.eslintrc-json.json contains the following:
{
"overrides": [
{
"files": ["*.json"],
"extends": [
"plugin:jsonc/recommended-with-jsonc"
],
"parser": "jsonc-eslint-parser",
"parserOptions": {
"jsonSyntax": "JSONC"
}
},
{
"files": ["*.jsonc"],
"extends": [
"plugin:jsonc/recommended-with-jsonc"
],
"parser": "jsonc-eslint-parser",
"parserOptions": {
"jsonSyntax": "JSONC"
}
},
{
"files": ["*.json5"],
"extends": [
"plugin:jsonc/recommended-with-json5"
],
"parser": "jsonc-eslint-parser",
"parserOptions": {
"jsonSyntax": "JSON5"
}
}
]
}
Is there some options /configs to change to make eslint-plugin-json work with eslint v9 ?
Many thanks :)
Activity