diff --git a/.github/linters/.eslintrc.yml b/.github/linters/.eslintrc.yml index 360a642c..3459e021 100644 --- a/.github/linters/.eslintrc.yml +++ b/.github/linters/.eslintrc.yml @@ -1,10 +1,8 @@ plugins: - jsonc overrides: - - files: - - "schemas/*.json" - - "examples/*.json" - parser: "jsonc-eslint-parser" + - files: "*.json" + parser: jsonc-eslint-parser rules: # These are the set of rules that belong to jsonc. For more information, # https://ota-meshi.github.io/eslint-plugin-jsonc/rules diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 41a971ec..affa29ee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,10 +28,20 @@ jobs: uses: github/super-linter/slim@v4 env: VALIDATE_ALL_CODEBASE: true - DEFAULT_BRANCH: main GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VALIDATE_MARKDOWN: true VALIDATE_JSON: true + # superlinter runs each linter on a per file bases and does not look + # at tool specific configuration to determine whether or not to the + # lint the given file. + # + # Due to that we need to globally include or exclude files. This also + # makes tools less flexible with one another in that if a tool + # requires a specific folder to be included and excluded, but other + # tools require must lint the excluded folder, then this pattern does + # not work. Instead superlinter cannot be used in that case, and the + # linter itself needs to be ran outside of superlinter. + FILTER_REGEX_INCLUDE: .*\/(custom|examples|schemas)\/.* jsonschema: name: Validate Schemas and Examples diff --git a/examples/incident_detected.json b/examples/incident_detected.json index f0ecf90b..35031de8 100644 --- a/examples/incident_detected.json +++ b/examples/incident_detected.json @@ -2,7 +2,7 @@ "context": { "version": "0.5.0-draft", "id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708", - "chain_id": "4c8cb7dd-3448-41de-8768-eec704e2829b", + "chainId": "4c8cb7dd-3448-41de-8768-eec704e2829b", "source": "/monitoring/prod1", "type": "dev.cdevents.incident.detected.0.3.0-draft", "timestamp": "2022-11-11T13:52:20.079Z" diff --git a/examples/incident_reported.json b/examples/incident_reported.json index e439d0b3..3b0f60d5 100644 --- a/examples/incident_reported.json +++ b/examples/incident_reported.json @@ -2,7 +2,7 @@ "context": { "version": "0.5.0-draft", "id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708", - "chain_id": "4c8cb7dd-3448-41de-8768-eec704e2829b", + "chainId": "4c8cb7dd-3448-41de-8768-eec704e2829b", "source": "/monitoring/prod1", "type": "dev.cdevents.incident.reported.0.3.0-draft", "timestamp": "2022-11-11T13:52:20.079Z" diff --git a/examples/incident_resolved.json b/examples/incident_resolved.json index 6cba3d9d..15e3abf0 100644 --- a/examples/incident_resolved.json +++ b/examples/incident_resolved.json @@ -2,7 +2,7 @@ "context": { "version": "0.5.0-draft", "id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708", - "chain_id": "4c8cb7dd-3448-41de-8768-eec704e2829b", + "chainId": "4c8cb7dd-3448-41de-8768-eec704e2829b", "source": "/monitoring/prod1", "type": "dev.cdevents.incident.resolved.0.3.0-draft", "timestamp": "2022-11-11T13:52:20.079Z"