From 06c26a48ccfdfc11c8e3e50cab444e3843d2fcdd Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Sat, 22 Oct 2016 14:38:47 -0700 Subject: [PATCH] [#304] emove deprecated no-duplicate-key rule closes #300 closes #304 --- Gruntfile.js | 3 ++- additional_rule_metadata.json | 10 +--------- recommended_ruleset.js | 1 - tslint-warnings.csv | 4 +--- tslint.json | 3 +-- 5 files changed, 5 insertions(+), 16 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index b6c53fd78..b8a7f711e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -324,7 +324,8 @@ module.exports = function(grunt) { 'no-unexternalized-strings': true, 'object-literal-key-quotes': true, 'no-relative-imports': true, - 'no-empty-line-after-opening-brace': true + 'no-empty-line-after-opening-brace': true, + 'no-duplicate-key': true }; var errors = []; getAllRuleNames().forEach(function(ruleName) { diff --git a/additional_rule_metadata.json b/additional_rule_metadata.json index a48a08105..76ac58151 100644 --- a/additional_rule_metadata.json +++ b/additional_rule_metadata.json @@ -245,14 +245,6 @@ "group": "Clarity", "commonWeaknessEnumeration": "710" }, - "no-duplicate-key": { - "issueClass": "SDL", - "issueType": "Error", - "severity": "Critical", - "level": "Mandatory", - "group": "Security", - "commonWeaknessEnumeration": "398, 694, 462" - }, "no-duplicate-variable": { "issueClass": "Non-SDL", "issueType": "Error", @@ -614,4 +606,4 @@ "recommendation": "[true, \"check-branch\", \"check-decl\", \"check-operator\", \"check-separator\", \"check-type\"],", "commonWeaknessEnumeration": "398, 710" } -} \ No newline at end of file +} diff --git a/recommended_ruleset.js b/recommended_ruleset.js index d0309647f..6c37abc38 100644 --- a/recommended_ruleset.js +++ b/recommended_ruleset.js @@ -16,7 +16,6 @@ module.exports = { "no-disable-auto-sanitization": true, "no-document-domain": true, "no-document-write": true, - "no-duplicate-key": true, "no-eval": true, "no-exec-script": true, "no-function-constructor-with-string-args": true, diff --git a/tslint-warnings.csv b/tslint-warnings.csv index 0e5612f92..e179fad9c 100644 --- a/tslint-warnings.csv +++ b/tslint-warnings.csv @@ -83,9 +83,7 @@ no-document-write,Do not use document.write,TSLINTMGIOVQ,tslint,SDL,Error,Critic CWE 85 - Doubled Character XSS Manipulations" no-duplicate-case,Do not use duplicate case labels in switch statements.,TSLINT3MSPFV,tslint,Non-SDL,Error,Critical,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" -no-duplicate-key,Disallows duplicate keys in object literals.,TSLINT8C37DG,tslint,SDL,Error,Critical,Mandatory,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 694, 462","CWE 398 - Indicator of Poor Code Quality -CWE 694 - Use of Multiple Resources with Duplicate Identifier -CWE 462 - Duplicate Key in Associative List (Alist)" +no-duplicate-key,Disallows duplicate keys in object literals.,TSLINT8C37DG,tslint,,,,,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, no-duplicate-variable,Disallows duplicate variable declarations in the same block scope.,TSLINT6TMGHL,tslint,Non-SDL,Error,Critical,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,398,"CWE 398 - Indicator of Poor Code Quality" no-empty,Disallows empty blocks.,TSLINTJ99V50,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,398,"CWE 398 - Indicator of Poor Code Quality" no-empty-interfaces,Do not use empty interfaces.,TSLINT1L2THN7,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality diff --git a/tslint.json b/tslint.json index 200a3cf30..b7c8955d5 100644 --- a/tslint.json +++ b/tslint.json @@ -82,7 +82,6 @@ "no-document-domain": true, "no-document-write": true, "no-duplicate-case": true, - "no-duplicate-key": true, "no-duplicate-parameter-names": true, "no-duplicate-variable": true, "no-empty": true, @@ -220,4 +219,4 @@ "insecure-random": true, "possible-timing-attack": true } -} \ No newline at end of file +}