diff --git a/src/configs/lite.ts b/src/configs/lite.ts index 110153d77..295daee87 100644 --- a/src/configs/lite.ts +++ b/src/configs/lite.ts @@ -22,10 +22,19 @@ const overrides = { "error", { enforcement: "None", - ignoreInferredTypes: true, - parameters: { - enforcement: "ReadonlyShallow", - }, + overrides: [ + { + specifiers: { + from: "file", + }, + options: { + ignoreInferredTypes: true, + parameters: { + enforcement: "ReadonlyShallow", + }, + }, + }, + ], }, ], } satisfies FlatConfig.Config["rules"]; diff --git a/src/configs/recommended.ts b/src/configs/recommended.ts index c50948ab2..2cfa1a942 100644 --- a/src/configs/recommended.ts +++ b/src/configs/recommended.ts @@ -74,10 +74,35 @@ const overrides = { "error", { enforcement: "None", - ignoreInferredTypes: true, - parameters: { - enforcement: "ReadonlyDeep", - }, + overrides: [ + { + specifiers: [ + { + from: "lib", + }, + { + from: "package", + }, + ], + options: { + ignoreInferredTypes: true, + parameters: { + enforcement: "ReadonlyShallow", + }, + }, + }, + { + specifiers: { + from: "file", + }, + options: { + ignoreInferredTypes: true, + parameters: { + enforcement: "ReadonlyDeep", + }, + }, + }, + ], }, ], [typeDeclarationImmutability.fullName]: [