Enable more eslint recommended rules (#11168)
* chore: enable no-constant-condition * chore: enable no-empty rule * chore: enable no-unreachable * chore: enable no-cond-assign * chore: enable no-inner-declarations * chore: remove disabled rules that are not in eslint:recommended * fix: oops
This commit is contained in:
@@ -62,6 +62,7 @@ export default class Renamer {
|
||||
|
||||
// retain the `name` of a class/function declaration
|
||||
|
||||
// eslint-disable-next-line no-unreachable
|
||||
if (!path.isFunctionDeclaration() && !path.isClassDeclaration()) return;
|
||||
if (this.binding.kind !== "hoisted") return;
|
||||
|
||||
@@ -83,6 +84,7 @@ export default class Renamer {
|
||||
|
||||
// retain the `name` of a class/function expression
|
||||
|
||||
// eslint-disable-next-line no-unreachable
|
||||
if (!path.isFunctionExpression() && !path.isClassExpression()) return;
|
||||
if (this.binding.kind !== "local") return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user