Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
fix: arrow-parens rule breaking TS syntax for HOC in fix mode
Browse files Browse the repository at this point in the history
BREAKING CHANGE: parentheses are no longer required for block body
  • Loading branch information
iamturns committed May 8, 2019
1 parent 5413180 commit bca94c4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ module.exports = {
"import/extensions": [".js", ".ts", ".mjs"],
},
rules: {
"arrow-parens": [
"error",
"as-needed",
{
// `requireForBlockBody` should be `true` (as Airbnb sets this to `true`), however it causes problems with HOC syntax in TS
// https://github.com/iamturns/eslint-config-airbnb-typescript/issues/8
requireForBlockBody: false,
},
],

// Replace Airbnb 'camelcase' rule with '@typescript-eslint' version
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/camelcase.md
camelcase: "off",
Expand Down

0 comments on commit bca94c4

Please sign in to comment.