File tree Expand file tree Collapse file tree 3 files changed +172
-112
lines changed Expand file tree Collapse file tree 3 files changed +172
-112
lines changed Original file line number Diff line number Diff line change 204
204
{
205
205
"files" : [" typings/*.ts" , " scripts/*.mjs" ],
206
206
"parser" : " @typescript-eslint/parser" ,
207
+ "parserOptions" : {
208
+ "project" : " ./tsconfig.json"
209
+ },
207
210
"plugins" : [" @typescript-eslint" ],
208
211
"rules" : {
209
212
"@typescript-eslint/naming-convention" : [
216
219
"match" : true
217
220
}
218
221
}
222
+ ],
223
+ "no-restricted-syntax" : [
224
+ 2 ,
225
+ {
226
+ "selector" : " MethodDefinition[key.name!=on][key.name!=once][key.name!=off] > TSEmptyBodyFunctionExpression > Identifier :not(TSTypeOperator[operator=readonly]) > TSArrayType" ,
227
+ "message" : " Array parameters on methods must be readonly"
228
+ },
229
+ {
230
+ "selector" : " MethodDefinition > TSEmptyBodyFunctionExpression > Identifier TSTypeReference > Identifier[name=Collection]" ,
231
+ "message" : " Parameters of type Collection on methods must use ReadonlyCollection"
232
+ },
233
+ {
234
+ "selector" : " TSDeclareFunction > Identifier :not(TSTypeOperator[operator=readonly]) > TSArrayType" ,
235
+ "message" : " Array parameters on functions must be readonly"
236
+ },
237
+ {
238
+ "selector" : " TSDeclareFunction Identifier TSTypeReference > Identifier[name=Collection]" ,
239
+ "message" : " Parameters of type Collection on functions must use ReadonlyCollection"
240
+ },
241
+ {
242
+ "selector" : " TSInterfaceDeclaration TSPropertySignature :not(TSTypeOperator[operator=readonly]) > TSArrayType" ,
243
+ "message" : " Array properties on interfaces must be readonly"
244
+ },
245
+ {
246
+ "selector" : " TSInterfaceDeclaration TSPropertySignature TSTypeReference > Identifier[name=Collection]" ,
247
+ "message" : " Interface properties of type Collection must use ReadonlyCollection"
248
+ }
219
249
]
220
250
}
221
251
}
You can’t perform that action at this time.
0 commit comments