Skip to content

Commit

Permalink
feat(prefer-immutable-types): change the options in recommeneded and …
Browse files Browse the repository at this point in the history
…lite configs (#810)
  • Loading branch information
RebeccaStevens committed Aug 5, 2024
1 parent 86fa76a commit defd713
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 8 deletions.
17 changes: 13 additions & 4 deletions src/configs/lite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand Down
33 changes: 29 additions & 4 deletions src/configs/recommended.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]: [
Expand Down

0 comments on commit defd713

Please sign in to comment.