Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable default-case lint rule for TypeScript #6937

Merged
merged 1 commit into from May 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/eslint-config-react-app/index.js
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
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