Skip to content

Commit

Permalink
#290 typescript-eslint: configure eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
zaki-yama committed Apr 1, 2019
1 parent e8895d2 commit 2c74072
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
'no-nested-ternary': 0,
'react/no-multi-comp': 0,
'react/jsx-no-bind': 0,
'react/jsx-filename-extension': [1, { 'extensions': ['.js', '.jsx'] }],
'react/jsx-filename-extension': [1, { 'extensions': ['.js', '.jsx', '.ts', '.tsx'] }],
'jsx-a11y/no-static-element-interactions': 0,
'class-methods-use-this': 0,
'react/no-unused-prop-types': 1,
Expand All @@ -44,6 +44,7 @@ module.exports = {
}
],
'no-return-assign': [2, 'except-parens'],
'import/no-cycle': 0,

// TODO: Fix or disable
'react/require-default-props': 1,
Expand All @@ -57,5 +58,15 @@ module.exports = {
'jsx-a11y/anchor-is-valid': 1,
'jsx-a11y/interactive-supports-focus': 2,
'jsx-a11y/label-has-associated-control': [2, { assert: 'either' }],

// For TypeScript
'camelcase': 0,
'@typescript-eslint/camelcase': 2,
'no-array-constructor': 0,
'@typescript-eslint/no-array-constructor': 2,
'no-unused-vars': 0,
'@typescript-eslint/no-unused-vars': 1,

'@typescript-eslint/no-unnecessary-type-assertion': 2,
}
};

0 comments on commit 2c74072

Please sign in to comment.