Skip to content

Commit

Permalink
feat(eslint): add more typescript specific rules (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
mheob authored Aug 31, 2022
1 parent c6a6a52 commit a211713
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/spotty-coats-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@mheob/eslint-config": patch
---

Add more typescript specific rules.
8 changes: 7 additions & 1 deletion packages/eslint-config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,19 @@ module.exports = {
rules: { 'unicorn/filename-case': ['error', { case: 'camelCase' }] },
},
{
files: ['*.ts'],
files: ['*.ts', '*.tsx'],
extends: ['plugin:@typescript-eslint/recommended'],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/explicit-function-return-type': [
'warn',
{ allowExpressions: true, allowTypedFunctionExpressions: true },
],
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'@typescript-eslint/quotes': ['warn', 'single', { avoidEscape: true }],
},
},
],
Expand Down

0 comments on commit a211713

Please sign in to comment.