diff --git a/.github/linters/.eslintrc-aura.json b/.automation/test/salesforce/bad/force-app/main/default/aura/.eslintrc.json similarity index 100% rename from .github/linters/.eslintrc-aura.json rename to .automation/test/salesforce/bad/force-app/main/default/aura/.eslintrc.json diff --git a/TEMPLATES/.eslintrc-aura.json b/.automation/test/salesforce/good/force-app/main/default/aura/.eslintrc.json similarity index 100% rename from TEMPLATES/.eslintrc-aura.json rename to .automation/test/salesforce/good/force-app/main/default/aura/.eslintrc.json diff --git a/.github/linters/.eslintrc-lwc.json b/.github/linters/.eslintrc-lwc.json deleted file mode 100644 index 49ca97d4beb..00000000000 --- a/.github/linters/.eslintrc-lwc.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": ["@salesforce/eslint-config-lwc/recommended"], - "overrides": [ - { - "files": ["*.test.js"], - "rules": { - "@lwc/lwc/no-unexpected-wire-adapter-usages": "off" - } - } - ] -} diff --git a/CHANGELOG.md b/CHANGELOG.md index 63f8177beab..e8c30ee2bea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l - Fixes - Trivy: use `misconfig` instead of the deprecated `config` scanner, updating the default arguments + - Update calls to sfdx-scanner to output a CSV file for Aura & LWC - Doc - Removed obsolete warning for semgrep as the issue has been fixed diff --git a/TEMPLATES/.eslintrc-lwc.json b/TEMPLATES/.eslintrc-lwc.json deleted file mode 100644 index 49ca97d4beb..00000000000 --- a/TEMPLATES/.eslintrc-lwc.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": ["@salesforce/eslint-config-lwc/recommended"], - "overrides": [ - { - "files": ["*.test.js"], - "rules": { - "@lwc/lwc/no-unexpected-wire-adapter-usages": "off" - } - } - ] -} diff --git a/megalinter/descriptors/salesforce.megalinter-descriptor.yml b/megalinter/descriptors/salesforce.megalinter-descriptor.yml index 3271ba20591..48c66456054 100644 --- a/megalinter/descriptors/salesforce.megalinter-descriptor.yml +++ b/megalinter/descriptors/salesforce.megalinter-descriptor.yml @@ -121,6 +121,8 @@ linters: - "**/aura/**/*.js" - "--severity-threshold" - "2" + - "--outfile" + - "{{REPORT_FOLDER}}/sfdx-scanner-report-aura.csv" - "--format" - "csv" cli_lint_mode: project @@ -132,8 +134,8 @@ linters: - "plugins" cli_version_arg_name: "" version_extract_regex: "(?<=@salesforce/sfdx-scanner )\\d+(\\.\\d+)+" - cli_lint_errors_count: regex_count - cli_lint_errors_regex: '"[0-9]+",' + cli_lint_errors_count: regex_sum + cli_lint_errors_regex: "found ([0-9]+) violation" examples: - "sfdx scanner:run" install: @@ -179,6 +181,8 @@ linters: - "**/lwc/**/*.js" - "--severity-threshold" - "2" + - "--outfile" + - "{{REPORT_FOLDER}}/sfdx-scanner-report-lwc.csv" - "--format" - "csv" cli_lint_mode: project @@ -190,8 +194,8 @@ linters: - "plugins" cli_version_arg_name: "" version_extract_regex: "(?<=@salesforce/sfdx-scanner )\\d+(\\.\\d+)+" - cli_lint_errors_count: regex_count - cli_lint_errors_regex: '"[0-9]+",' + cli_lint_errors_count: regex_sum + cli_lint_errors_regex: "found ([0-9]+) violation" examples: - "sfdx scanner:run" install: