From e5c3980e559a1fb5b5054dbb097cb28f0e464dac Mon Sep 17 00:00:00 2001 From: Nicholas Deis Date: Fri, 29 Nov 2024 19:09:07 -0700 Subject: [PATCH] Update staging tests --- staging/jsonc-flat.eslintrc.js | 4 ++++ staging/jsonc.eslintrc.js | 4 ++++ staging/mixed-flat.eslintrc.js | 4 ++++ staging/mixed.eslintrc.js | 4 ++++ staging/normal-flat.eslintrc.js | 4 ++++ staging/normal.eslintrc.js | 4 ++++ staging/staging.spec.js | 4 ++-- 7 files changed, 26 insertions(+), 2 deletions(-) diff --git a/staging/jsonc-flat.eslintrc.js b/staging/jsonc-flat.eslintrc.js index caca1a5..8fa6685 100644 --- a/staging/jsonc-flat.eslintrc.js +++ b/staging/jsonc-flat.eslintrc.js @@ -10,6 +10,10 @@ module.exports = [ }, rules: { "no-secrets/no-secrets": "error", + "no-secrets/no-pattern-match": [ + "error", + { patterns: { SecretJS: /const SECRET/, SecretJSON: /\"SECRET\"/ } }, + ], }, }, ]; diff --git a/staging/jsonc.eslintrc.js b/staging/jsonc.eslintrc.js index 4497a85..5986cfc 100644 --- a/staging/jsonc.eslintrc.js +++ b/staging/jsonc.eslintrc.js @@ -3,5 +3,9 @@ module.exports = { plugins: ["self"], rules: { "self/no-secrets": "error", + "self/no-pattern-match": [ + "error", + { patterns: { SecretJS: /const SECRET/, SecretJSON: /\"SECRET\"/ } }, + ], }, }; diff --git a/staging/mixed-flat.eslintrc.js b/staging/mixed-flat.eslintrc.js index caca1a5..8fa6685 100644 --- a/staging/mixed-flat.eslintrc.js +++ b/staging/mixed-flat.eslintrc.js @@ -10,6 +10,10 @@ module.exports = [ }, rules: { "no-secrets/no-secrets": "error", + "no-secrets/no-pattern-match": [ + "error", + { patterns: { SecretJS: /const SECRET/, SecretJSON: /\"SECRET\"/ } }, + ], }, }, ]; diff --git a/staging/mixed.eslintrc.js b/staging/mixed.eslintrc.js index e10beae..8c4ae7a 100644 --- a/staging/mixed.eslintrc.js +++ b/staging/mixed.eslintrc.js @@ -4,5 +4,9 @@ module.exports = { plugins: ["self"], rules: { "self/no-secrets": "error", + "self/no-pattern-match": [ + "error", + { patterns: { SecretJS: /const SECRET/, SecretJSON: /\"SECRET\"/ } }, + ], }, }; diff --git a/staging/normal-flat.eslintrc.js b/staging/normal-flat.eslintrc.js index 4cd3400..3c902bb 100644 --- a/staging/normal-flat.eslintrc.js +++ b/staging/normal-flat.eslintrc.js @@ -6,5 +6,9 @@ module.exports = { }, rules: { "no-secrets/no-secrets": "error", + "no-secrets/no-pattern-match": [ + "error", + { patterns: { SecretJS: /const SECRET/, SecretJSON: /\"SECRET\"/ } }, + ], }, }; diff --git a/staging/normal.eslintrc.js b/staging/normal.eslintrc.js index 54df6a0..5e0b5b6 100644 --- a/staging/normal.eslintrc.js +++ b/staging/normal.eslintrc.js @@ -3,5 +3,9 @@ module.exports = { plugins: ["self"], rules: { "self/no-secrets": "error", + "self/no-pattern-match": [ + "error", + { patterns: { SecretJS: /const SECRET/, SecretJSON: /\"SECRET\"/ } }, + ], }, }; diff --git a/staging/staging.spec.js b/staging/staging.spec.js index e105384..67e5b2d 100644 --- a/staging/staging.spec.js +++ b/staging/staging.spec.js @@ -13,7 +13,7 @@ const JSON_FILES = [ { name: "Should detect secrets in json files", file: "./staging/has-secret.json", - errorCount: 1, + errorCount: 2, }, ]; @@ -26,7 +26,7 @@ const JS_FILES = [ { name: "Should detect secrets in json files", file: "./staging/has-secret.js", - errorCount: 1, + errorCount: 2, }, ];