Skip to content

Commit

Permalink
Enable more eslint recommended rules (#11168)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
JLHwung committed Feb 25, 2020
1 parent 2d1bac9 commit afb0f48
Show file tree
Hide file tree
Showing 6 changed files with 184 additions and 198 deletions.
17 changes: 1 addition & 16 deletions eslint/babel-eslint-config-internal/index.js
Expand Up @@ -19,29 +19,14 @@ module.exports = {
browser: true,
},
rules: {
camelcase: "off",
"consistent-return": "off",
curly: ["error", "multi-line"],
"linebreak-style": ["error", "unix"],
"new-cap": "off",
"no-case-declarations": "error",
"no-cond-assign": "off",
"no-confusing-arrow": "error",
"no-console": "off",
"no-constant-condition": "off",
"no-empty": "off",
"no-inner-declarations": "off",
"no-labels": "off",
"no-loop-func": "off",
"no-empty": ["error", { allowEmptyCatch: true }],
"no-process-exit": "error",
"no-return-assign": "off",
"no-shadow": "off",
"no-underscore-dangle": "off",
"no-unreachable": "off",
"no-use-before-define": "off",
"no-var": "error",
"prefer-const": "error",
strict: "off",
"flowtype/define-flow-type": "warn",
"flowtype/use-flow-type": "warn",
},
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-generator/src/generators/modules.js
Expand Up @@ -99,7 +99,7 @@ function ExportDeclaration(node: Object) {

// print "special" specifiers first
let hasSpecial = false;
while (true) {
for (;;) {
const first = specifiers[0];
if (
t.isExportDefaultSpecifier(first) ||
Expand Down Expand Up @@ -149,7 +149,7 @@ export function ImportDeclaration(node: Object) {
const specifiers = node.specifiers.slice(0);
if (specifiers && specifiers.length) {
// print "special" specifiers first
while (true) {
for (;;) {
const first = specifiers[0];
if (
t.isImportDefaultSpecifier(first) ||
Expand Down

0 comments on commit afb0f48

Please sign in to comment.