Skip to content

Commit fb69a2f

Browse files
committed
build(eslint): Try new precommit eslintrc file for type imports
1 parent e578ea0 commit fb69a2f

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.precommit.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
extends: ['./.eslintrc.js'],
3+
overrides: [
4+
{
5+
files: ['**/*.ts', '**/*.tsx'],
6+
rules: {
7+
'@typescript-eslint/consistent-type-imports': ['error'],
8+
},
9+
},
10+
],
11+
};

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@
9191
"typescript": "^4.6.3"
9292
},
9393
"lint-staged": {
94-
"**/*.{ts,tsx,scss,js,jsx,md,yml,json}": [
94+
"**/*.{ts,tsx}": [
95+
"eslint -c .precommit.eslintrc.js --fix",
96+
"prettier --write"
97+
],
98+
"**/*.{scss,js,jsx,md,yml,json}": [
9599
"prettier --write"
96100
]
97101
},

0 commit comments

Comments
 (0)