Skip to content

Commit

Permalink
Merge pull request #37 from twilio-labs/linting-updates
Browse files Browse the repository at this point in the history
saner rules
  • Loading branch information
ktalebian authored Oct 28, 2019
2 parents 96bf9c8 + 3491ac9 commit fb4dcf2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
8 changes: 2 additions & 6 deletions packages/eslint-config-twilio-react/rules/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ module.exports = {
html: true,
},
],
'react/jsx-props-no-spreading': 'off',
'react/sort-comp': 'error',
'react/sort-prop-types': 'off',
'react/state-in-constructor': 'off',
Expand Down Expand Up @@ -140,12 +141,7 @@ module.exports = {
'react/jsx-no-literals': 'off',
'react/jsx-no-target-blank': 'error',
'react/jsx-no-undef': 'error',
'react/jsx-one-expression-per-line': [
'error',
{
allow: 'literal',
},
],
'react/jsx-one-expression-per-line': 'off',
'react/jsx-curly-brace-presence': [
'error',
{
Expand Down
19 changes: 9 additions & 10 deletions packages/eslint-config-twilio-ts/rules/typescript.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
module.exports = {
rules: {
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowExpressions: true,
allowTypedFunctionExpressions: true,
allowHigherOrderFunctions: true,
},
],
// We use Interface instead of PropTypes in TS
'react/prop-types': 'off',
// Methods are sorted based on their modifiers, not React method ordering
'react/sort-comp': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/member-ordering': 'error',
'@typescript-eslint/no-empty-interface': [
'error',
{
'allowSingleExtends': false,
allowSingleExtends: false,
},
],

Expand All @@ -25,7 +22,9 @@ module.exports = {
'@typescript-eslint/no-parameter-properties': [
'error',
{
allows: ['readonly'],
allows: [
'readonly',
],
},
],
'@typescript-eslint/no-require-imports': 'error',
Expand Down

0 comments on commit fb4dcf2

Please sign in to comment.