Skip to content

Commit 43596ed

Browse files
committed
chore: add eslint rules for ts
1 parent ee11376 commit 43596ed

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

.eslintrc.json

+19-8
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,29 @@
4646
"perfectionist/sort-imports": [
4747
"error",
4848
{
49-
"groups": [
50-
["builtin", "external"],
51-
"shared",
52-
"src",
53-
"unknown"
54-
],
55-
"customGroups": {
49+
"groups": [["builtin", "external"], "shared", "src", "type", "unknown"],
50+
"customGroups": {
5651
"value": {
5752
"shared": ["^@/"],
5853
"src": ["#/*"]
5954
}
60-
}
55+
}
56+
}
57+
]
58+
}
59+
},
60+
{
61+
"files": ["src/**/*.ts", "src/**/*.tsx"],
62+
"parser": "@typescript-eslint/parser",
63+
"plugins": ["@typescript-eslint"],
64+
"extends": ["plugin:@typescript-eslint/recommended"],
65+
"rules": {
66+
"@typescript-eslint/consistent-type-imports": [
67+
"error",
68+
{
69+
"disallowTypeAnnotations": false,
70+
"fixStyle": "separate-type-imports",
71+
"prefer": "type-imports"
6172
}
6273
]
6374
}

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@
122122
"@types/react": "18.2.0",
123123
"@types/react-dom": "18.2.0",
124124
"@types/sha256": "^0.2.0",
125+
"@typescript-eslint/eslint-plugin": "8.26.0",
126+
"@typescript-eslint/parser": "8.26.0",
125127
"astro": "4.16.7",
126128
"autoprefixer": "^10.4.12",
127129
"cross-env": "7.0.3",

src/app/manifest.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17-
import type { MetadataRoute } from 'next';
18-
1917
import { siteConfig } from '#/lib/site';
2018

19+
import type { MetadataRoute } from 'next';
20+
2121
export default function manifest(): MetadataRoute.Manifest {
2222
return {
2323
name: siteConfig.name,

0 commit comments

Comments
 (0)