Skip to content

Commit

Permalink
feat(typescript): enable rule
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandernanberg committed Feb 25, 2022
1 parent f66b73d commit 402a2d9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,26 @@ module.exports = {
},
extends: [
'plugin:import/typescript',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
//https://github.com/typescript-eslint/typescript-eslint/issues/2483
'no-shadow': 'off',
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-shadow.md
'@typescript-eslint/no-shadow': 'error',
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-type-imports.md
'@typescript-eslint/consistent-type-imports': [
'error',
{ prefer: 'type-imports' },
],
},
},
{
files: ['*.test.ts', '*.test.tsx'],
rules: {
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-function-return-type.md
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/explicit-function-return-type.md
'@typescript-eslint/explicit-function-return-type': 0,
},
},
Expand Down

0 comments on commit 402a2d9

Please sign in to comment.