Skip to content

Commit

Permalink
Disable default-case lint rule for TypeScript (#6937)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianschmitz authored May 3, 2019
1 parent b36d1ea commit 4397d06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/eslint-config-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ module.exports = {
// If adding a typescript-eslint version of an existing ESLint rule,
// make sure to disable the ESLint rule here.
rules: {
// TypeScript's `noFallthroughCasesInSwitch` option is more robust (#6906)
'default-case': 'off',

// Add TypeScript specific rules (and turn off ESLint equivalents)
'@typescript-eslint/no-angle-bracket-type-assertion': 'warn',
'no-array-constructor': 'off',
'@typescript-eslint/no-array-constructor': 'warn',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ function verifyTypeScriptSetup() {
allowSyntheticDefaultImports: { suggested: true },
strict: { suggested: true },
forceConsistentCasingInFileNames: { suggested: true },
// TODO: Enable for v4.0 (#6936)
// noFallthroughCasesInSwitch: { suggested: true },

// These values are required and cannot be changed by the user
// Keep this in sync with the webpack config
Expand Down Expand Up @@ -181,7 +183,7 @@ function verifyTypeScriptSetup() {
)
);
}

console.log(e && e.message ? `${e.message}` : '');
process.exit(1);
}
Expand Down

0 comments on commit 4397d06

Please sign in to comment.