diff --git a/.changeset/spotty-coats-carry.md b/.changeset/spotty-coats-carry.md new file mode 100644 index 0000000..ddf7507 --- /dev/null +++ b/.changeset/spotty-coats-carry.md @@ -0,0 +1,5 @@ +--- +"@mheob/eslint-config": patch +--- + +Add more typescript specific rules. diff --git a/packages/eslint-config/base.js b/packages/eslint-config/base.js index 9a5ec01..c97b0c4 100644 --- a/packages/eslint-config/base.js +++ b/packages/eslint-config/base.js @@ -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 }], }, }, ],