build: add JSON and YAML linting via ESLint by Planeshifter · Pull Request #10975 · stdlib-js/stdlib
Ref: stdlib-js/metr-issue-tracker#55 - Add `eslint-plugin-jsonc` and `eslint-plugin-yml` as devDependencies - Create `etc/eslint/rules/json.js` with 10 rules enforcing JSON spec compliance (indent, no-dupe-keys, comma-dangle, etc.) - Create `etc/eslint/rules/yaml.js` with 12 rules for YAML formatting and best practices (indent, block-mapping, quotes as warn, etc.) - Add 5 config blocks to `eslint.config.cjs`: base JSON, cli_opts.json tab override, package.json key ordering (canonical stdlib order), base YAML, and GitHub Actions workflow key ordering - Un-ignore `.github/` and `.codecov.yml` in global ESLint ignores - Create custom `stdlib/yaml-license-header` rule enforcing Apache-2.0 license header at the start of YAML files - Register the new rule in the stdlib ESLint plugin - Add `.cjs` to the filename linter's supported extensions allowlist - Add `lint-json` and `lint-yaml` Make targets with `--cache` - Wire new targets into the top-level `lint` prerequisite --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: passed - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---