Skip to content

Commit 355945b

Browse files
committed
feat: make eslint config composable
1 parent c20339e commit 355945b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
],
6363
"scripts": {
6464
"deps": "pnpm up --interactive --latest",
65-
"lint": "pnpm lint:es",
65+
"lint": "pnpm lint:es & pnpm lint:prettier",
6666
"lint:es": "eslint \"./**/*.{js,jsx,ts,tsx}\"",
6767
"lint:prettier": "prettier --write \"!./examples/**\" \"**/*.{md,json,html}\"",
6868
"prepublishOnly": "pnpm build",

src/eslint/typescript.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,25 @@ module.exports = {
55
{
66
files: TYPESCRIPT_FILES,
77
parser: '@typescript-eslint/parser',
8-
extends: ['plugin:@typescript-eslint/recommended', 'plugin:import/typescript'],
8+
extends: [
9+
'plugin:@typescript-eslint/recommended',
10+
'plugin:import/typescript',
11+
'plugin:@typescript-eslint/strict',
12+
],
913
rules: {
1014
'@typescript-eslint/no-explicit-any': 0,
1115
'@typescript-eslint/no-var-requires': 0,
1216
'@typescript-eslint/no-non-null-assertion': 0,
1317
'@typescript-eslint/no-use-before-define': 1,
1418
'@typescript-eslint/explicit-module-boundary-types': 0,
1519
'@typescript-eslint/consistent-type-imports': [1, { fixStyle: 'inline-type-imports' }],
20+
21+
// need to
22+
'@typescript-eslint/dot-notation': 0,
23+
'@typescript-eslint/restrict-template-expressions': 2,
24+
},
25+
parserOptions: {
26+
project: ['./tsconfig.json'],
1627
},
1728
},
1829
],

0 commit comments

Comments
 (0)