Skip to content

Commit a8d705f

Browse files
committed
feat: add deprecated/removed rxjs rules
1 parent 2d0cf99 commit a8d705f

27 files changed

+226
-14
lines changed

src/converters/lintConfigs/rules/ruleConverters.ts

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,18 @@ import { convertJsxNoLambda } from "./ruleConverters/eslint-plugin-react/jsx-no-
7474
import { convertJsxSelfClose } from "./ruleConverters/eslint-plugin-react/jsx-self-close";
7575
import { convertJsxSpaceBeforeTrailingSlash } from "./ruleConverters/eslint-plugin-react/jsx-space-before-trailing-slash";
7676
import { convertJsxWrapMultiline } from "./ruleConverters/eslint-plugin-react/jsx-wrap-multiline";
77+
import { convertAdd } from "./ruleConverters/eslint-plugin-rxjs/add";
7778
import { convertBanObservables } from "./ruleConverters/eslint-plugin-rxjs/ban-observables";
7879
import { convertBanOperators } from "./ruleConverters/eslint-plugin-rxjs/ban-operators";
80+
import { convertDeepOperators } from "./ruleConverters/eslint-plugin-rxjs/deep-operators";
7981
import { convertFinnish } from "./ruleConverters/eslint-plugin-rxjs/finnish";
8082
import { convertJust } from "./ruleConverters/eslint-plugin-rxjs/just";
83+
import { convertNoAdd } from "./ruleConverters/eslint-plugin-rxjs/no-add";
8184
import { convertNoAsyncSubscribe } from "./ruleConverters/eslint-plugin-rxjs/no-async-subscribe";
8285
import { convertNoCompat } from "./ruleConverters/eslint-plugin-rxjs/no-compat";
8386
import { convertNoConnectable } from "./ruleConverters/eslint-plugin-rxjs/no-connectable";
8487
import { convertNoCreate } from "./ruleConverters/eslint-plugin-rxjs/no-create";
88+
import { convertNoDeepOperators } from "./ruleConverters/eslint-plugin-rxjs/no-deep-operators";
8589
import { convertNoExplicitGenerics } from "./ruleConverters/eslint-plugin-rxjs/no-explicit-generics";
8690
import { convertNoExposedSubjects } from "./ruleConverters/eslint-plugin-rxjs/no-exposed-subjects";
8791
import { convertNoFinnish } from "./ruleConverters/eslint-plugin-rxjs/no-finnish";
@@ -91,11 +95,13 @@ import { convertNoIgnoredObservable } from "./ruleConverters/eslint-plugin-rxjs/
9195
import { convertNoIgnoredReplayBuffer } from "./ruleConverters/eslint-plugin-rxjs/no-ignored-replay-buffer";
9296
import { convertNoIgnoredSubscribe } from "./ruleConverters/eslint-plugin-rxjs/no-ignored-subscribe";
9397
import { convertNoIgnoredSubscription } from "./ruleConverters/eslint-plugin-rxjs/no-ignored-subscription";
94-
import { convertNoIgnoredTakeWhileValue } from "./ruleConverters/eslint-plugin-rxjs/no-ignored-takewhile-value";
98+
import { convertNoIgnoredTakewhileValue } from "./ruleConverters/eslint-plugin-rxjs/no-ignored-takewhile-value";
9599
import { convertNoImplicitAnyCatch } from "./ruleConverters/eslint-plugin-rxjs/no-implicit-any-catch";
96100
import { convertNoIndex } from "./ruleConverters/eslint-plugin-rxjs/no-index";
97101
import { convertNoInternal } from "./ruleConverters/eslint-plugin-rxjs/no-internal";
98102
import { convertNoNestedSubscribe } from "./ruleConverters/eslint-plugin-rxjs/no-nested-subscribe";
103+
import { convertNoOperator } from "./ruleConverters/eslint-plugin-rxjs/no-operator";
104+
import { convertNoPatched } from "./ruleConverters/eslint-plugin-rxjs/no-patched";
99105
import { convertNoRedundantNotify } from "./ruleConverters/eslint-plugin-rxjs/no-redundant-notify";
100106
import { convertNoShareReplay } from "./ruleConverters/eslint-plugin-rxjs/no-sharereplay";
101107
import { convertNoSubclass } from "./ruleConverters/eslint-plugin-rxjs/no-subclass";
@@ -106,9 +112,14 @@ import { convertNoToPromise } from "./ruleConverters/eslint-plugin-rxjs/no-topro
106112
import { convertNoUnboundMethods } from "./ruleConverters/eslint-plugin-rxjs/no-unbound-methods";
107113
import { convertNoUnsafeCatch } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-catch";
108114
import { convertNoUnsafeFirst } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-first";
115+
import { convertNoUnsafeScope } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-scope";
109116
import { convertNoUnsafeSubjectNext } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-subject-next";
110117
import { convertNoUnsafeSwitchmap } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-switchmap";
111-
import { convertNoUnsafeTakeUntil } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-takeuntil";
118+
import { convertNoUnsafeTakeuntil } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-takeuntil";
119+
import { convertNoUnsafeTakewhile } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-takewhile";
120+
import { convertNoUnusedAdd } from "./ruleConverters/eslint-plugin-rxjs/no-unused-add";
121+
import { convertNoWholesale } from "./ruleConverters/eslint-plugin-rxjs/no-wholesale";
122+
import { convertPreferAdd } from "./ruleConverters/eslint-plugin-rxjs/prefer-add";
112123
import { convertPreferAngularAsyncPipe } from "./ruleConverters/eslint-plugin-rxjs/prefer-angular-async-pipe";
113124
import { convertPreferAngularComposition } from "./ruleConverters/eslint-plugin-rxjs/prefer-angular-composition";
114125
import { convertPreferAngularTakeuntil } from "./ruleConverters/eslint-plugin-rxjs/prefer-angular-takeuntil";
@@ -548,14 +559,18 @@ export const ruleConverters = new Map([
548559
["react-unused-props-and-state", convertReactUnusedPropsAndState],
549560
["relative-url-prefix", convertRelativeUrlPrefix],
550561
["restrict-plus-operands", convertRestrictPlusOperands],
562+
["rxjs-add", convertAdd],
551563
["rxjs-ban-observables", convertBanObservables],
552564
["rxjs-ban-operators", convertBanOperators],
565+
["rxjs-deep-operators", convertDeepOperators],
553566
["rxjs-finnish", convertFinnish],
554567
["rxjs-just", convertJust],
568+
["rxjs-no-add", convertNoAdd],
555569
["rxjs-no-async-subscribe", convertNoAsyncSubscribe],
556570
["rxjs-no-compat", convertNoCompat],
557571
["rxjs-no-connectable", convertNoConnectable],
558572
["rxjs-no-create", convertNoCreate],
573+
["rxjs-no-deep-operators", convertNoDeepOperators],
559574
["rxjs-no-do", convertNoTap],
560575
["rxjs-no-explicit-generics", convertNoExplicitGenerics],
561576
["rxjs-no-exposed-subjects", convertNoExposedSubjects],
@@ -566,11 +581,13 @@ export const ruleConverters = new Map([
566581
["rxjs-no-ignored-replay-buffer", convertNoIgnoredReplayBuffer],
567582
["rxjs-no-ignored-subscribe", convertNoIgnoredSubscribe],
568583
["rxjs-no-ignored-subscription", convertNoIgnoredSubscription],
569-
["rxjs-no-ignored-takewhile-value", convertNoIgnoredTakeWhileValue],
584+
["rxjs-no-ignored-takewhile-value", convertNoIgnoredTakewhileValue],
570585
["rxjs-no-implicit-any-catch", convertNoImplicitAnyCatch],
571586
["rxjs-no-index", convertNoIndex],
572587
["rxjs-no-internal", convertNoInternal],
573588
["rxjs-no-nested-subscribe", convertNoNestedSubscribe],
589+
["rxjs-no-operator", convertNoOperator],
590+
["rxjs-no-patched", convertNoPatched],
574591
["rxjs-no-redundant-notify", convertNoRedundantNotify],
575592
["rxjs-no-sharereplay", convertNoShareReplay],
576593
["rxjs-no-subclass", convertNoSubclass],
@@ -581,9 +598,14 @@ export const ruleConverters = new Map([
581598
["rxjs-no-unbound-methods", convertNoUnboundMethods],
582599
["rxjs-no-unsafe-catch", convertNoUnsafeCatch],
583600
["rxjs-no-unsafe-first", convertNoUnsafeFirst],
601+
["rxjs-no-unsafe-scope", convertNoUnsafeScope],
584602
["rxjs-no-unsafe-subject-next", convertNoUnsafeSubjectNext],
585603
["rxjs-no-unsafe-switchmap", convertNoUnsafeSwitchmap],
586-
["rxjs-no-unsafe-takeuntil", convertNoUnsafeTakeUntil],
604+
["rxjs-no-unsafe-takeuntil", convertNoUnsafeTakeuntil],
605+
["rxjs-no-unsafe-takewhile", convertNoUnsafeTakewhile],
606+
["rxjs-no-unused-add", convertNoUnusedAdd],
607+
["rxjs-no-wholesale", convertNoWholesale],
608+
["rxjs-prefer-add", convertPreferAdd],
587609
["rxjs-prefer-angular-async-pipe", convertPreferAngularAsyncPipe],
588610
["rxjs-prefer-angular-composition", convertPreferAngularComposition],
589611
["rxjs-prefer-angular-takeuntil", convertPreferAngularTakeuntil],
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { RuleConverter } from "../../ruleConverter";
2+
3+
export const convertAdd: RuleConverter = () => {
4+
return {};
5+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { RuleConverter } from "../../ruleConverter";
2+
3+
export const convertDeepOperators: RuleConverter = () => {
4+
return {};
5+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { RuleConverter } from "../../ruleConverter";
2+
3+
export const convertNoAdd: RuleConverter = () => {
4+
return {};
5+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { RuleConverter } from "../../ruleConverter";
2+
3+
export const convertNoDeepOperators: RuleConverter = () => {
4+
return {};
5+
};

src/converters/lintConfigs/rules/ruleConverters/eslint-plugin-rxjs/no-ignored-takewhile-value.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { RuleConverter } from "../../ruleConverter";
22

3-
export const convertNoIgnoredTakeWhileValue: RuleConverter = () => {
3+
export const convertNoIgnoredTakewhileValue: RuleConverter = () => {
44
return {
55
rules: [
66
{
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { RuleConverter } from "../../ruleConverter";
2+
3+
export const convertNoOperator: RuleConverter = () => {
4+
return {};
5+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { RuleConverter } from "../../ruleConverter";
2+
3+
export const convertNoPatched: RuleConverter = () => {
4+
return {};
5+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { RuleConverter } from "../../ruleConverter";
2+
3+
export const convertNoUnsafeScope: RuleConverter = () => {
4+
return {};
5+
};

src/converters/lintConfigs/rules/ruleConverters/eslint-plugin-rxjs/no-unsafe-takeuntil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { RuleConverter } from "../../ruleConverter";
22

3-
export const convertNoUnsafeTakeUntil: RuleConverter = (tslintRule) => {
3+
export const convertNoUnsafeTakeuntil: RuleConverter = (tslintRule) => {
44
return {
55
rules: [
66
{
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { RuleConverter } from "../../ruleConverter";
2+
3+
export const convertNoUnsafeTakewhile: RuleConverter = () => {
4+
return {
5+
rules: [
6+
{
7+
ruleName: "rxjs/no-ignored-takewhile-value",
8+
},
9+
],
10+
plugins: ["eslint-plugin-rxjs"],
11+
};
12+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { RuleConverter } from "../../ruleConverter";
2+
3+
export const convertNoUnusedAdd: RuleConverter = () => {
4+
return {};
5+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { RuleConverter } from "../../ruleConverter";
2+
3+
export const convertNoWholesale: RuleConverter = () => {
4+
return {};
5+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { RuleConverter } from "../../ruleConverter";
2+
3+
export const convertPreferAdd: RuleConverter = () => {
4+
return {};
5+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { convertAdd } from "../add";
2+
3+
describe(convertAdd, () => {
4+
test("conversion without arguments", () => {
5+
const result = convertAdd({
6+
ruleArguments: [],
7+
});
8+
9+
expect(result).toEqual({});
10+
});
11+
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { convertDeepOperators } from "../deep-operators";
2+
3+
describe(convertDeepOperators, () => {
4+
test("conversion without arguments", () => {
5+
const result = convertDeepOperators({
6+
ruleArguments: [],
7+
});
8+
9+
expect(result).toEqual({});
10+
});
11+
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { convertNoAdd } from "../no-add";
2+
3+
describe(convertNoAdd, () => {
4+
test("conversion without arguments", () => {
5+
const result = convertNoAdd({
6+
ruleArguments: [],
7+
});
8+
9+
expect(result).toEqual({});
10+
});
11+
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { convertNoDeepOperators } from "../no-deep-operators";
2+
3+
describe(convertNoDeepOperators, () => {
4+
test("conversion without arguments", () => {
5+
const result = convertNoDeepOperators({
6+
ruleArguments: [],
7+
});
8+
9+
expect(result).toEqual({});
10+
});
11+
});

src/converters/lintConfigs/rules/ruleConverters/eslint-plugin-rxjs/tests/no-ignored-takewhile-value.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { convertNoIgnoredTakeWhileValue } from "../no-ignored-takewhile-value";
1+
import { convertNoIgnoredTakewhileValue } from "../no-ignored-takewhile-value";
22

3-
describe(convertNoIgnoredTakeWhileValue, () => {
3+
describe(convertNoIgnoredTakewhileValue, () => {
44
test("conversion without arguments", () => {
5-
const result = convertNoIgnoredTakeWhileValue({
5+
const result = convertNoIgnoredTakewhileValue({
66
ruleArguments: [],
77
});
88

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { convertNoOperator } from "../no-operator";
2+
3+
describe(convertNoOperator, () => {
4+
test("conversion without arguments", () => {
5+
const result = convertNoOperator({
6+
ruleArguments: [],
7+
});
8+
9+
expect(result).toEqual({});
10+
});
11+
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { convertNoPatched } from "../no-patched";
2+
3+
describe(convertNoPatched, () => {
4+
test("conversion without arguments", () => {
5+
const result = convertNoPatched({
6+
ruleArguments: [],
7+
});
8+
9+
expect(result).toEqual({});
10+
});
11+
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { convertNoUnsafeScope } from "../no-unsafe-scope";
2+
3+
describe(convertNoUnsafeScope, () => {
4+
test("conversion without arguments", () => {
5+
const result = convertNoUnsafeScope({
6+
ruleArguments: [],
7+
});
8+
9+
expect(result).toEqual({});
10+
});
11+
});

src/converters/lintConfigs/rules/ruleConverters/eslint-plugin-rxjs/tests/no-unsafe-takeuntil.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { convertNoUnsafeTakeUntil } from "../no-unsafe-takeuntil";
1+
import { convertNoUnsafeTakeuntil } from "../no-unsafe-takeuntil";
22

3-
describe(convertNoUnsafeTakeUntil, () => {
3+
describe(convertNoUnsafeTakeuntil, () => {
44
test("conversion without arguments", () => {
5-
const result = convertNoUnsafeTakeUntil({
5+
const result = convertNoUnsafeTakeuntil({
66
ruleArguments: [],
77
});
88

@@ -17,7 +17,7 @@ describe(convertNoUnsafeTakeUntil, () => {
1717
});
1818

1919
test("conversion with alias argument", () => {
20-
const result = convertNoUnsafeTakeUntil({
20+
const result = convertNoUnsafeTakeuntil({
2121
ruleArguments: [{ alias: ["untilDestroyed"] }],
2222
});
2323

@@ -33,7 +33,7 @@ describe(convertNoUnsafeTakeUntil, () => {
3333
});
3434

3535
test("conversion with allow argument", () => {
36-
const result = convertNoUnsafeTakeUntil({
36+
const result = convertNoUnsafeTakeuntil({
3737
ruleArguments: [{ allow: ["shareReplay", "share"] }],
3838
});
3939

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { convertNoUnsafeTakewhile } from "../no-unsafe-takewhile";
2+
3+
describe(convertNoUnsafeTakewhile, () => {
4+
test("conversion without arguments", () => {
5+
const result = convertNoUnsafeTakewhile({
6+
ruleArguments: [],
7+
});
8+
9+
expect(result).toEqual({
10+
rules: [
11+
{
12+
ruleName: "rxjs/no-ignored-takewhile-value",
13+
},
14+
],
15+
plugins: ["eslint-plugin-rxjs"],
16+
});
17+
});
18+
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { convertNoUnusedAdd } from "../no-unused-add";
2+
3+
describe(convertNoUnusedAdd, () => {
4+
test("conversion without arguments", () => {
5+
const result = convertNoUnusedAdd({
6+
ruleArguments: [],
7+
});
8+
9+
expect(result).toEqual({});
10+
});
11+
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { convertNoWholesale } from "../no-wholesale";
2+
3+
describe(convertNoWholesale, () => {
4+
test("conversion without arguments", () => {
5+
const result = convertNoWholesale({
6+
ruleArguments: [],
7+
});
8+
9+
expect(result).toEqual({});
10+
});
11+
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { convertPreferAdd } from "../prefer-add";
2+
3+
describe(convertPreferAdd, () => {
4+
test("conversion without arguments", () => {
5+
const result = convertPreferAdd({
6+
ruleArguments: [],
7+
});
8+
9+
expect(result).toEqual({});
10+
});
11+
});

0 commit comments

Comments
 (0)