@@ -49,7 +49,7 @@ export default tseslint.config(
49
49
packageJson ,
50
50
perfectionist . configs [ "recommended-natural" ] ,
51
51
regexp . configs [ "flat/recommended" ] ,
52
- ... tseslint . config ( {
52
+ {
53
53
extends : [
54
54
...tseslint . configs . strictTypeChecked ,
55
55
...tseslint . configs . stylisticTypeChecked ,
@@ -59,23 +59,13 @@ export default tseslint.config(
59
59
parserOptions : {
60
60
projectService : {
61
61
allowDefaultProject : [ "*.config.*s" , "bin/*.js" , "script/*.ts" ] ,
62
- defaultProject : "./tsconfig.json" ,
63
62
} ,
64
63
tsconfigRootDir : import . meta. dirname ,
65
64
} ,
66
65
} ,
67
66
rules : {
68
- // These off-by-default rules work well for this repo and we like them on.
69
- "logical-assignment-operators" : [
70
- "error" ,
71
- "always" ,
72
- { enforceForIfStatements : true } ,
73
- ] ,
74
- "operator-assignment" : "error" ,
75
-
76
67
// These on-by-default rules don't work well for this repo and we like them off.
77
68
"jsdoc/lines-before-block" : "off" ,
78
- "no-constant-condition" : "off" ,
79
69
80
70
// These on-by-default rules work well for this repo if configured
81
71
"@typescript-eslint/no-unnecessary-condition" : [
@@ -84,7 +74,6 @@ export default tseslint.config(
84
74
allowConstantLoopConditions : true ,
85
75
} ,
86
76
] ,
87
- "@typescript-eslint/no-unused-vars" : [ "error" , { caughtErrors : "all" } ] ,
88
77
"@typescript-eslint/prefer-nullish-coalescing" : [
89
78
"error" ,
90
79
{ ignorePrimitives : true } ,
@@ -97,47 +86,32 @@ export default tseslint.config(
97
86
"error" ,
98
87
{ allowExperimental : true } ,
99
88
] ,
100
- "perfectionist/sort-objects" : [
101
- "error" ,
102
- {
103
- order : "asc" ,
104
- partitionByComment : true ,
105
- type : "natural" ,
106
- } ,
107
- ] ,
108
89
109
90
// Stylistic concerns that don't interfere with Prettier
91
+ "logical-assignment-operators" : [
92
+ "error" ,
93
+ "always" ,
94
+ { enforceForIfStatements : true } ,
95
+ ] ,
110
96
"no-useless-rename" : "error" ,
111
97
"object-shorthand" : "error" ,
98
+ "operator-assignment" : "error" ,
112
99
} ,
113
- } ) ,
114
- {
115
- files : [ "*.jsonc" ] ,
116
- rules : {
117
- "jsonc/comma-dangle" : "off" ,
118
- "jsonc/no-comments" : "off" ,
119
- "jsonc/sort-keys" : "error" ,
100
+ settings : {
101
+ perfectionist : {
102
+ partitionByComment : true ,
103
+ type : "natural" ,
104
+ } ,
120
105
} ,
121
106
} ,
122
107
{
123
108
extends : [ tseslint . configs . disableTypeChecked ] ,
124
109
files : [ "**/*.md/*.ts" ] ,
125
- rules : {
126
- "n/no-missing-import" : [
127
- "error" ,
128
- { allowModules : [ "create-typescript-app" ] } ,
129
- ] ,
130
- } ,
131
110
} ,
132
111
{
112
+ extends : [ vitest . configs . recommended ] ,
133
113
files : [ "**/*.test.*" ] ,
134
- languageOptions : {
135
- globals : vitest . environments . env . globals ,
136
- } ,
137
- plugins : { vitest } ,
138
114
rules : {
139
- ...vitest . configs . recommended . rules ,
140
-
141
115
// These on-by-default rules aren't useful in test files.
142
116
"@typescript-eslint/no-unsafe-assignment" : "off" ,
143
117
"@typescript-eslint/no-unsafe-call" : "off" ,
0 commit comments