Skip to content

Commit

Permalink
build(eslint): Try new precommit eslintrc file for type imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaursen committed Apr 1, 2022
1 parent e578ea0 commit fb69a2f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .precommit.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
extends: ['./.eslintrc.js'],
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
'@typescript-eslint/consistent-type-imports': ['error'],
},
},
],
};
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@
"typescript": "^4.6.3"
},
"lint-staged": {
"**/*.{ts,tsx,scss,js,jsx,md,yml,json}": [
"**/*.{ts,tsx}": [
"eslint -c .precommit.eslintrc.js --fix",
"prettier --write"
],
"**/*.{scss,js,jsx,md,yml,json}": [
"prettier --write"
]
},
Expand Down

0 comments on commit fb69a2f

Please sign in to comment.