Skip to content

Commit 14efafa

Browse files
committed
fix(eslint): remove @jenssimon/eslint-config-typescript
1 parent 23e49de commit 14efafa

File tree

5 files changed

+105
-310
lines changed

5 files changed

+105
-310
lines changed

eslint.config.mjs

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import path from 'node:path'
22
import { fileURLToPath } from 'node:url'
33

4+
import tseslint from 'typescript-eslint'
5+
46
import { FlatCompat } from '@eslint/eslintrc'
57
import { fixupConfigRules } from '@eslint/compat'
68

@@ -14,7 +16,7 @@ const compat = new FlatCompat({
1416
})
1517

1618

17-
export default [
19+
export default tseslint.config(
1820
{
1921
ignores: [
2022
'.yarn/',
@@ -23,36 +25,24 @@ export default [
2325
],
2426
},
2527

26-
...fixupConfigRules(compat.config({
28+
fixupConfigRules(compat.config({
2729
extends: [
2830
'@jenssimon/eslint-config-base',
2931
],
30-
overrides: [
31-
{
32-
parserOptions: {
33-
project: './tsconfig.json',
34-
},
35-
extends: [
36-
'@jenssimon/eslint-config-typescript',
37-
],
38-
files: ['*.ts'],
39-
rules: {
40-
'@typescript-eslint/naming-convention': 'off',
41-
},
42-
},
43-
],
44-
})).map((rule) => ({
45-
files: [
46-
'**/*.js',
47-
'**/*.mjs',
48-
'**/*.ts',
49-
],
50-
...rule,
5132
})),
33+
34+
tseslint.configs.recommendedTypeChecked,
35+
tseslint.configs.stylisticTypeChecked,
5236
{
5337
languageOptions: {
54-
ecmaVersion: 2022,
55-
sourceType: 'module',
38+
parserOptions: {
39+
projectService: {
40+
allowDefaultProject: [
41+
'*.mjs',
42+
],
43+
},
44+
tsconfigRootDir: import.meta.dirname,
45+
},
5646
},
5747
},
58-
]
48+
)

lint-staged.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export default {
2-
'**/*.{js,ts}': 'eslint',
2+
'**/*.{js,mjs,ts}': 'eslint',
33
}

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"@eslint/compat": "^1.2.4",
3232
"@eslint/eslintrc": "^3.2.0",
3333
"@jenssimon/eslint-config-base": "^8.0.0",
34-
"@jenssimon/eslint-config-typescript": "^5.2.2",
3534
"@types/eslint": "^9.0.0",
3635
"@types/node": "^22.0.0",
3736
"commitizen": "^4.3.0",
@@ -41,8 +40,8 @@
4140
"lint-staged": "^15.0.2",
4241
"pinst": "^3.0.0",
4342
"semantic-release": "^24.0.0",
44-
"ts-node": "^10.9.1",
45-
"typescript": "^5.2.2"
43+
"typescript": "^5.2.2",
44+
"typescript-eslint": "^8.24.1"
4645
},
4746
"peerDependencies": {
4847
"eslint": ">=1.0.0"

src/rules/always.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Rule } from 'eslint'
33
const always: Rule.RuleModule = {
44
create: (context) => ({
55
Program(node) {
6-
const [option] = context.options
6+
const [option] = context.options as [{ message?: string }]
77

88
context.report({
99
node,

0 commit comments

Comments
 (0)