Skip to content

Commit 658e008

Browse files
test: is-immutable-type now requires types to actually exist
1 parent 6be5862 commit 658e008

File tree

4 files changed

+37
-41
lines changed

4 files changed

+37
-41
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"@typescript-eslint/utils": "^6.0.0",
7575
"deepmerge-ts": "^5.1.0",
7676
"escape-string-regexp": "^4.0.0",
77-
"is-immutable-type": "^2.0.0",
77+
"is-immutable-type": "^2.0.1",
7878
"semver": "^7.5.4",
7979
"ts-api-utils": "^1.0.1"
8080
},
@@ -88,7 +88,7 @@
8888
"@google/semantic-release-replace-plugin": "1.2.0",
8989
"@istanbuljs/nyc-config-typescript": "1.0.2",
9090
"@rebeccastevens/eslint-config": "2.0.0",
91-
"@rollup/plugin-commonjs": "25.0.2",
91+
"@rollup/plugin-commonjs": "25.0.3",
9292
"@rollup/plugin-json": "6.0.0",
9393
"@rollup/plugin-typescript": "11.1.2",
9494
"@semantic-release/changelog": "6.0.3",
@@ -119,14 +119,14 @@
119119
"eslint-plugin-eslint-comments": "3.2.0",
120120
"eslint-plugin-eslint-plugin": "5.1.0",
121121
"eslint-plugin-import": "2.27.5",
122-
"eslint-plugin-jsdoc": "46.4.3",
122+
"eslint-plugin-jsdoc": "46.4.4",
123123
"eslint-plugin-markdown": "3.0.0",
124124
"eslint-plugin-n": "16.0.1",
125125
"eslint-plugin-optimize-regex": "1.2.1",
126126
"eslint-plugin-prettier": "5.0.0",
127127
"eslint-plugin-promise": "6.1.1",
128128
"eslint-plugin-sonarjs": "0.19.0",
129-
"eslint-plugin-unicorn": "47.0.0",
129+
"eslint-plugin-unicorn": "48.0.0",
130130
"espree": "9.6.1",
131131
"husky": "8.0.3",
132132
"knip": "2.15.5",

pnpm-lock.yaml

Lines changed: 30 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/rules/prefer-immutable-types/ts/parameters/invalid.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ const tests: Array<
446446
function foo(arg: ReadonlyMap<{foo: string}, {foo: string}>) {}
447447
function foo(arg: {foo: string}[]) {}
448448
function foo(arg: readonly {foo: string}[]) {}
449+
type ReadonlyDeep<T> = T;
449450
`,
450451
optionsSet: [
451452
[
@@ -471,6 +472,7 @@ const tests: Array<
471472
function foo(arg: ReadonlyDeep<ReadonlyMap<{foo: string}, {foo: string}>>) {}
472473
function foo(arg: ReadonlyDeep<{foo: string}[]>) {}
473474
function foo(arg: ReadonlyDeep<readonly {foo: string}[]>) {}
475+
type ReadonlyDeep<T> = T;
474476
`,
475477
errors: [
476478
{

tests/rules/type-declaration-immutability/ts/valid.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ const tests: Array<ValidTestCaseSet<OptionsOf<typeof rule>>> = [
168168
{
169169
code: dedent`
170170
type ReadonlyDeepFoo = ReadonlyDeep<{ foo: { bar: string; }; }>;
171+
type ReadonlyDeep<T> = T;
171172
`,
172173
optionsSet: [[recommended]],
173174
settingsSet: [

0 commit comments

Comments
 (0)