From 223ea5d7b2be389c167dab0b402c7519d65e2e05 Mon Sep 17 00:00:00 2001 From: Kunal Nagpal Date: Thu, 16 Feb 2017 05:41:27 +0530 Subject: [PATCH 1/2] Updated eslint-plugin-lodash --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 0b8d42aae..f0011c7c1 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "eslint-plugin-jasmine": "^2.2.0", "eslint-plugin-jsdoc": "^2.3.1", "eslint-plugin-jsx-a11y": "^2.2.3", - "eslint-plugin-lodash": "^1.10.3", + "eslint-plugin-lodash": "^2.3.5", "eslint-plugin-meteor": "^4.0.1", "eslint-plugin-mocha": "^4.5.1", "eslint-plugin-mongodb": "^0.2.4", diff --git a/yarn.lock b/yarn.lock index 1a9376c25..7e15284d6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -631,11 +631,11 @@ eslint-plugin-jsx-a11y@^2.2.3: jsx-ast-utils "^1.0.0" object-assign "^4.0.1" -eslint-plugin-lodash@^1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-lodash/-/eslint-plugin-lodash-1.10.3.tgz#a341e3386b6eb4e4b7addcf43c3a7f944f38551d" +eslint-plugin-lodash@^2.3.5: + version "2.3.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-lodash/-/eslint-plugin-lodash-2.3.5.tgz#d4fae9e7ae19ff2566bbf4bfd31c34c71b85da9f" dependencies: - lodash "^4.9.0" + lodash "^4.0.0" eslint-plugin-meteor@^4.0.1: version "4.0.1" @@ -1104,7 +1104,7 @@ lodash.pickby@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" -lodash@^4.0.0, lodash@^4.15.0, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.5.1, lodash@^4.9.0: +lodash@^4.0.0, lodash@^4.15.0, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.5.1: version "4.17.2" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42" From 26f5a68731362c4671e783799edc9e878adadae1 Mon Sep 17 00:00:00 2001 From: Kunal Nagpal Date: Thu, 16 Feb 2017 05:41:51 +0530 Subject: [PATCH 2/2] Updated ESLint rules --- lib/check_category_mapping.json | 147 ++++++++++++++++++++++++++++++-- 1 file changed, 138 insertions(+), 9 deletions(-) diff --git a/lib/check_category_mapping.json b/lib/check_category_mapping.json index a684ed300..60d1b9bef 100644 --- a/lib/check_category_mapping.json +++ b/lib/check_category_mapping.json @@ -1,38 +1,91 @@ { "accessor-pairs": "Bug Risk", + "array-bracket-spacing": "Clarity", + "array-callback-return": "Clarity", + "arrow-body-style": "Clarity", + "arrow-parens": "Clarity", + "arrow-spacing": "Clarity", "block-scoped-var": "Bug Risk", + "block-spacing": "Clarity", + "brace-style": "Clarity", "callback-return": "Bug Risk", + "camelcase": "Clarity", + "capitalized-comments": "Clarity", + "class-methods-use-this": "Bug Risk", "comma-dangle": "Bug Risk", + "comma-spacing": "Clarity", + "comma-style": "Clarity", "complexity": "Complexity", + "computed-property-spacing": "Clarity", + "consistent-this": "Bug Risk", "consistent-return": "Bug Risk", + "constructor-super": "Bug Risk", "curly": "Clarity", "default-case": "Bug Risk", "dot-location": "Clarity", "dot-notation": "Clarity", + "eol-last": "Clarity", "eqeqeq": "Bug Risk", + "func-call-spacing": "Clarity", + "func-name-matching": "Clarity", + "func-names": "Clarity", + "func-style": "Clarity", + "generator-star-spacing": "Clarity", "global-require": "Clarity", "guard-for-in": "Bug Risk", "handle-callback-err": "Bug Risk", + "id-blacklist": "Clarity", + "id-length": "Clarity", + "id-match": "Clarity", + "indent": "Clarity", "init-declarations": "Clarity", + "jsx-quotes": "Clarity", + "key-spacing": "Clarity", + "keyword-spacing": "Clarity", + "line-comment-style": "Clarity", + "linebreak-style": "Clarity", + "lines-around-comment": "Clarity", + "lines-around-directive": "Clarity", + "max-depth": "Complexity", + "max-len": "Complexity", + "max-lines": "Complexity", + "max-nested-callbacks": "Complexity", + "max-params": "Complexity", "max-statements": "Complexity", + "max-statements-per-line": "Complexity", + "multiline-ternary": "Clarity", + "new-cap": "Clarity", + "new-parens": "Clarity", + "newline-after-var": "Clarity", + "newline-before-return": "Clarity", + "newline-per-chained-call": "Clarity", "no-alert": "Bug Risk", + "no-array-constructor": "Clarity", + "no-await-in-loop": "Bug Risk", + "no-bitwise": "Clarity", "no-caller": "Compatibility", "no-case-declarations": "Bug Risk", "no-catch-shadow": "Bug Risk", + "no-class-assign": "Bug Risk", "no-cond-assign": "Bug Risk", + "no-confusing-arrow": "Clarity", "no-console": "Bug Risk", "no-constant-condition": "Bug Risk", + "no-const-assign": "Bug Risk", + "no-continue": "Clarity", "no-control-regex": "Bug Risk", "no-debugger": "Bug Risk", "no-delete-var": "Bug Risk", "no-div-regex": "Bug Risk", "no-dupe-args": "Bug Risk", "no-dupe-keys": "Bug Risk", + "no-dupe-class-members": "Bug Risk", "no-duplicate-case": "Bug Risk", + "no-duplicate-imports": "Clarity", "no-else-return": "Clarity", "no-empty": "Bug Risk", "no-empty-character-class": "Bug Risk", - "no-empty-label": "Bug Risk", + "no-empty-function": "Bug Risk", "no-empty-pattern": "Bug Risk", "no-eq-null": "Bug Risk", "no-eval": "Security", @@ -40,13 +93,17 @@ "no-extend-native": "Bug Risk", "no-extra-bind": "Bug Risk", "no-extra-boolean-cast": "Bug Risk", + "no-extra-label": "Bug Risk", "no-extra-parens": "Bug Risk", "no-extra-semi": "Bug Risk", "no-fallthrough": "Bug Risk", "no-floating-decimal": "Clarity", "no-func-assign": "Bug Risk", + "no-global-assign": "Bug Risk", "no-implicit-coercion": "Bug Risk", + "no-implicit-globals": "Clarity", "no-implied-eval": "Security", + "no-inline-comments": "Clarity", "no-inner-declarations": "Compatibility", "no-invalid-regexp": "Bug Risk", "no-invalid-this": "Bug Risk", @@ -55,15 +112,21 @@ "no-label-var": "Bug Risk", "no-labels": "Bug Risk", "no-lone-blocks": "Bug Risk", + "no-lonely-if": "Bug Risk", "no-loop-func": "Bug Risk", "no-magic-numbers": "Clarity", + "no-mixed-operators": "Clarity", "no-mixed-requires": "Clarity", + "no-mixed-spaces-and-tabs": "Clarity", + "no-multi-assign": "Clarity", "no-multi-spaces": "Bug Risk", "no-multi-str": "Compatibility", - "no-native-reassign": "Bug Risk", - "no-negated-in-lhs": "Bug Risk", + "no-multiple-empty-lines": "Clarity", + "no-negated-condition": "Clarity", + "no-nested-ternary": "Bug Risk", "no-new": "Bug Risk", "no-new-func": "Clarity", + "no-new-object": "Clarity", "no-new-require": "Clarity", "no-new-wrappers": "Bug Risk", "no-obj-calls": "Bug Risk", @@ -71,42 +134,105 @@ "no-octal-escape": "Compatibility", "no-param-reassign": "Bug Risk", "no-path-concat": "Bug Risk", + "no-plusplus": "Bug Risk", "no-process-env": "Bug Risk", "no-process-exit": "Bug Risk", "no-proto": "Compatibility", + "no-prototype-builtins": "Compatibility", "no-redeclare": "Bug Risk", "no-regex-spaces": "Bug Risk", + "no-restricted-globals": "Clarity", + "no-restricted-imports": "Clarity", "no-restricted-modules": "Security", + "no-restricted-properties": "Bug Risk", + "no-restricted-syntax": "Bug Risk", "no-return-assign": "Bug Risk", + "no-return-await": "Bug Risk", "no-script-url": "Security", + "no-self-assign": "Bug Risk", "no-self-compare": "Bug Risk", "no-sequences": "Bug Risk", "no-shadow": "Bug Risk", "no-shadow-restricted-names": "Bug Risk", "no-sparse-arrays": "Bug Risk", "no-sync": "Bug Risk", + "no-tabs": "Clarity", + "no-template-curly-in-string": "Clarity", + "no-ternary": "Clarity", + "no-this-before-super": "Clarity", "no-throw-literal": "Clarity", + "no-trailing-spaces": "Clarity", "no-undef": "Bug Risk", "no-undef-init": "Bug Risk", "no-undefined": "Compatibility", + "no-underscore-dangle": "Clarity", "no-unexpected-multiline": "Bug Risk", + "no-unmodified-loop-condition": "Bug Risk", + "no-unneeded-ternary": "Clarity", "no-unreachable": "Bug Risk", + "no-unsafe-finally": "Bug Risk", + "no-unsafe-negation": "Bug Risk", "no-unused-expressions": "Bug Risk", "no-unused-vars": "Bug Risk", + "no-unused-labels": "Clarity", "no-use-before-define": "Compatibility", "no-useless-call": "Bug Risk", + "no-useless-computed-key": "Clarity", "no-useless-concat": "Bug Risk", + "no-useless-constructor": "Clarity", + "no-useless-escape": "Clarity", + "no-useless-rename": "Clarity", + "no-useless-return": "Clarity", + "no-var": "Clarity", "no-void": "Compatibility", "no-warning-comments": "Bug Risk", + "no-whitespace-before-property": "Clarity", "no-with": "Compatibility", - "np-dupe-keys": "Bug Risk", + "object-curly-newline": "Clarity", + "object-curly-spacing": "Clarity", + "object-property-newline": "Clarity", + "object-shorthand": "Clarity", + "one-var": "Clarity", + "one-var-declaration-per-line": "Clarity", + "operator-assignment": "Clarity", + "operator-linebreak": "Clarity", + "padded-blocks": "Clarity", + "prefer-arrow-callback": "Clarity", + "prefer-const": "Clarity", + "prefer-destructuring": "Clarity", + "prefer-numeric-literals": "Clarity", + "prefer-promise-reject-errors": "Clarity", + "prefer-rest-params": "Clarity", + "prefer-spread": "Clarity", + "prefer-template": "Clarity", + "quote-props": "Clarity", + "quotes": "Clarity", "radix": "Bug Risk", + "require-await": "Clarity", + "require-jsdoc": "Clarity", + "require-yield": "Clarity", + "rest-spread-spacing": "Clarity", + "semi": "Clarity", + "semi-spacing": "Clarity", + "sort-imports": "Clarity", + "sort-vars": "Clarity", + "space-before-blocks": "Clarity", + "space-before-function-paren": "Clarity", + "space-in-parens": "Clarity", + "space-infix-ops": "Clarity", + "space-unary-ops": "Clarity", + "spaced-comment": "Clarity", + "strict": "Clarity", + "symbol-description": "Clarity", + "template-curly-spacing": "Clarity", + "template-tag-spacing": "Clarity", + "unicode-bom": "Clarity", "use-isnan": "Bug Risk", - "use-strict": "Bug Risk", "valid-jsdoc": "Clarity", "valid-typeof": "Bug Risk", "vars-on-top": "Clarity", "wrap-iife": "Clarity", + "wrap-regex": "Clarity", "yoda": "Clarity", "jsdoc/check-param-names": "Clarity", @@ -123,18 +249,18 @@ "lodash/callback-binding": "Compatibility", "lodash/chain-style": "Clarity", + "lodash/chaining": "Clarity", "lodash/collection-method-value": "Bug Risk", "lodash/collection-return": "Bug Risk", "lodash/consistent-compose": "Clarity", "lodash/identity-shorthand": "Clarity", + "lodash/import-scope": "Clarity", "lodash/matches-prop-shorthand": "Clarity", - "lodash/matches-shorthand": "Clarity", "lodash/no-commit": "Bug Risk", "lodash/no-double-unwrap": "Bug Risk", "lodash/no-extra-args": "Clarity", - "lodash/no-single-chain": "Clarity", + "lodash/no-unbound-this": "Bug Risk", "lodash/path-style": "Clarity", - "lodash/prefer-chain": "Bug Risk", "lodash/prefer-compact": "Bug Risk", "lodash/prefer-constant": "Bug Risk", "lodash/prefer-filter": "Bug Risk", @@ -160,12 +286,14 @@ "lodash/unwrap": "Bug Risk", "mocha/handle-done-callback": "Clarity", + "mocha/max-top-level-suites": "Clarity", "mocha/no-exclusive-tests": "Bug Risk", "mocha/no-global-tests": "Clarity", "mocha/no-hooks": "Clarity", "mocha/no-hooks-for-single-case": "Clarity", "mocha/no-identical-title": "Clarity", "mocha/no-mocha-arrows": "Bug Risk", + "mocha/no-nested-suites": "Clarity", "mocha/no-pending-tests": "Bug Risk", "mocha/no-return-and-callback": "Clarity", "mocha/no-sibling-hooks": "Clarity", @@ -197,12 +325,13 @@ "security/detect-child-process": "Security", "security/detect-disable-mustache-escape": "Security", "security/detect-eval-with-expression": "Security", + "security/detect-new-buffer": "Security", "security/detect-no-csrf-before-method-override": "Security", "security/detect-non-literal-fs-filename": "Security", "security/detect-non-literal-regexp": "Security", "security/detect-non-literal-require": "Security", "security/detect-object-injection": "Security", "security/detect-possible-timing-attacks": "Security", - "security/detect-psuedoRandomBytes": "Security", + "security/detect-pseudoRandomBytes": "Security", "security/detect-unsafe-regex": "Security" }