Skip to content

Commit

Permalink
Chore: enable no-unneeded-ternary on ESLint codebase (#7987)
Browse files Browse the repository at this point in the history
  • Loading branch information
not-an-aardvark committed Jan 27, 2017
1 parent fbd7c13 commit 5cdfa99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/func-name-matching.js
Expand Up @@ -155,7 +155,7 @@ module.exports = {
return;
}

const isProp = node.left.type === "MemberExpression" ? true : false;
const isProp = node.left.type === "MemberExpression";
const name = isProp ? astUtils.getStaticPropertyName(node.left) : node.left.name;

if (node.right.id && isIdentifier(name) && shouldWarn(name, node.right.id.name)) {
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config-eslint/default.yml
Expand Up @@ -84,6 +84,7 @@ rules:
no-undefined: "error"
no-underscore-dangle: ["error", {allowAfterThis: true}]
no-unmodified-loop-condition: "error"
no-unneeded-ternary: "error"
no-unused-expressions: "error"
no-unused-vars: ["error", {vars: "all", args: "after-used"}]
no-use-before-define: "error"
Expand Down

0 comments on commit 5cdfa99

Please sign in to comment.