Skip to content

Commit bf32a6e

Browse files
authored
feat: add deprecated/removed rxjs rules (#1200)
1 parent 6bd4c06 commit bf32a6e

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
@@ -77,14 +77,18 @@ import { convertJsxNoLambda } from "./ruleConverters/eslint-plugin-react/jsx-no-
7777
import { convertJsxSelfClose } from "./ruleConverters/eslint-plugin-react/jsx-self-close";
7878
import { convertJsxSpaceBeforeTrailingSlash } from "./ruleConverters/eslint-plugin-react/jsx-space-before-trailing-slash";
7979
import { convertJsxWrapMultiline } from "./ruleConverters/eslint-plugin-react/jsx-wrap-multiline";
80+
import { convertAdd } from "./ruleConverters/eslint-plugin-rxjs/add";
8081
import { convertBanObservables } from "./ruleConverters/eslint-plugin-rxjs/ban-observables";
8182
import { convertBanOperators } from "./ruleConverters/eslint-plugin-rxjs/ban-operators";
83+
import { convertDeepOperators } from "./ruleConverters/eslint-plugin-rxjs/deep-operators";
8284
import { convertFinnish } from "./ruleConverters/eslint-plugin-rxjs/finnish";
8385
import { convertJust } from "./ruleConverters/eslint-plugin-rxjs/just";
86+
import { convertNoAdd } from "./ruleConverters/eslint-plugin-rxjs/no-add";
8487
import { convertNoAsyncSubscribe } from "./ruleConverters/eslint-plugin-rxjs/no-async-subscribe";
8588
import { convertNoCompat } from "./ruleConverters/eslint-plugin-rxjs/no-compat";
8689
import { convertNoConnectable } from "./ruleConverters/eslint-plugin-rxjs/no-connectable";
8790
import { convertNoCreate } from "./ruleConverters/eslint-plugin-rxjs/no-create";
91+
import { convertNoDeepOperators } from "./ruleConverters/eslint-plugin-rxjs/no-deep-operators";
8892
import { convertNoExplicitGenerics } from "./ruleConverters/eslint-plugin-rxjs/no-explicit-generics";
8993
import { convertNoExposedSubjects } from "./ruleConverters/eslint-plugin-rxjs/no-exposed-subjects";
9094
import { convertNoFinnish } from "./ruleConverters/eslint-plugin-rxjs/no-finnish";
@@ -94,11 +98,13 @@ import { convertNoIgnoredObservable } from "./ruleConverters/eslint-plugin-rxjs/
9498
import { convertNoIgnoredReplayBuffer } from "./ruleConverters/eslint-plugin-rxjs/no-ignored-replay-buffer";
9599
import { convertNoIgnoredSubscribe } from "./ruleConverters/eslint-plugin-rxjs/no-ignored-subscribe";
96100
import { convertNoIgnoredSubscription } from "./ruleConverters/eslint-plugin-rxjs/no-ignored-subscription";
97-
import { convertNoIgnoredTakeWhileValue } from "./ruleConverters/eslint-plugin-rxjs/no-ignored-takewhile-value";
101+
import { convertNoIgnoredTakewhileValue } from "./ruleConverters/eslint-plugin-rxjs/no-ignored-takewhile-value";
98102
import { convertNoImplicitAnyCatch } from "./ruleConverters/eslint-plugin-rxjs/no-implicit-any-catch";
99103
import { convertNoIndex } from "./ruleConverters/eslint-plugin-rxjs/no-index";
100104
import { convertNoInternal } from "./ruleConverters/eslint-plugin-rxjs/no-internal";
101105
import { convertNoNestedSubscribe } from "./ruleConverters/eslint-plugin-rxjs/no-nested-subscribe";
106+
import { convertNoOperator } from "./ruleConverters/eslint-plugin-rxjs/no-operator";
107+
import { convertNoPatched } from "./ruleConverters/eslint-plugin-rxjs/no-patched";
102108
import { convertNoRedundantNotify } from "./ruleConverters/eslint-plugin-rxjs/no-redundant-notify";
103109
import { convertNoShareReplay } from "./ruleConverters/eslint-plugin-rxjs/no-sharereplay";
104110
import { convertNoSubclass } from "./ruleConverters/eslint-plugin-rxjs/no-subclass";
@@ -109,9 +115,14 @@ import { convertNoToPromise } from "./ruleConverters/eslint-plugin-rxjs/no-topro
109115
import { convertNoUnboundMethods } from "./ruleConverters/eslint-plugin-rxjs/no-unbound-methods";
110116
import { convertNoUnsafeCatch } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-catch";
111117
import { convertNoUnsafeFirst } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-first";
118+
import { convertNoUnsafeScope } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-scope";
112119
import { convertNoUnsafeSubjectNext } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-subject-next";
113120
import { convertNoUnsafeSwitchmap } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-switchmap";
114-
import { convertNoUnsafeTakeUntil } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-takeuntil";
121+
import { convertNoUnsafeTakeuntil } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-takeuntil";
122+
import { convertNoUnsafeTakewhile } from "./ruleConverters/eslint-plugin-rxjs/no-unsafe-takewhile";
123+
import { convertNoUnusedAdd } from "./ruleConverters/eslint-plugin-rxjs/no-unused-add";
124+
import { convertNoWholesale } from "./ruleConverters/eslint-plugin-rxjs/no-wholesale";
125+
import { convertPreferAdd } from "./ruleConverters/eslint-plugin-rxjs/prefer-add";
115126
import { convertPreferAngularAsyncPipe } from "./ruleConverters/eslint-plugin-rxjs/prefer-angular-async-pipe";
116127
import { convertPreferAngularComposition } from "./ruleConverters/eslint-plugin-rxjs/prefer-angular-composition";
117128
import { convertPreferAngularTakeuntil } from "./ruleConverters/eslint-plugin-rxjs/prefer-angular-takeuntil";
@@ -578,14 +589,18 @@ export const ruleConverters = new Map([
578589
["react-unused-props-and-state", convertReactUnusedPropsAndState],
579590
["relative-url-prefix", convertRelativeUrlPrefix],
580591
["restrict-plus-operands", convertRestrictPlusOperands],
592+
["rxjs-add", convertAdd],
581593
["rxjs-ban-observables", convertBanObservables],
582594
["rxjs-ban-operators", convertBanOperators],
595+
["rxjs-deep-operators", convertDeepOperators],
583596
["rxjs-finnish", convertFinnish],
584597
["rxjs-just", convertJust],
598+
["rxjs-no-add", convertNoAdd],
585599
["rxjs-no-async-subscribe", convertNoAsyncSubscribe],
586600
["rxjs-no-compat", convertNoCompat],
587601
["rxjs-no-connectable", convertNoConnectable],
588602
["rxjs-no-create", convertNoCreate],
603+
["rxjs-no-deep-operators", convertNoDeepOperators],
589604
["rxjs-no-do", convertNoTap],
590605
["rxjs-no-explicit-generics", convertNoExplicitGenerics],
591606
["rxjs-no-exposed-subjects", convertNoExposedSubjects],
@@ -596,11 +611,13 @@ export const ruleConverters = new Map([
596611
["rxjs-no-ignored-replay-buffer", convertNoIgnoredReplayBuffer],
597612
["rxjs-no-ignored-subscribe", convertNoIgnoredSubscribe],
598613
["rxjs-no-ignored-subscription", convertNoIgnoredSubscription],
599-
["rxjs-no-ignored-takewhile-value", convertNoIgnoredTakeWhileValue],
614+
["rxjs-no-ignored-takewhile-value", convertNoIgnoredTakewhileValue],
600615
["rxjs-no-implicit-any-catch", convertNoImplicitAnyCatch],
601616
["rxjs-no-index", convertNoIndex],
602617
["rxjs-no-internal", convertNoInternal],
603618
["rxjs-no-nested-subscribe", convertNoNestedSubscribe],
619+
["rxjs-no-operator", convertNoOperator],
620+
["rxjs-no-patched", convertNoPatched],
604621
["rxjs-no-redundant-notify", convertNoRedundantNotify],
605622
["rxjs-no-sharereplay", convertNoShareReplay],
606623
["rxjs-no-subclass", convertNoSubclass],
@@ -611,9 +628,14 @@ export const ruleConverters = new Map([
611628
["rxjs-no-unbound-methods", convertNoUnboundMethods],
612629
["rxjs-no-unsafe-catch", convertNoUnsafeCatch],
613630
["rxjs-no-unsafe-first", convertNoUnsafeFirst],
631+
["rxjs-no-unsafe-scope", convertNoUnsafeScope],
614632
["rxjs-no-unsafe-subject-next", convertNoUnsafeSubjectNext],
615633
["rxjs-no-unsafe-switchmap", convertNoUnsafeSwitchmap],
616-
["rxjs-no-unsafe-takeuntil", convertNoUnsafeTakeUntil],
634+
["rxjs-no-unsafe-takeuntil", convertNoUnsafeTakeuntil],
635+
["rxjs-no-unsafe-takewhile", convertNoUnsafeTakewhile],
636+
["rxjs-no-unused-add", convertNoUnusedAdd],
637+
["rxjs-no-wholesale", convertNoWholesale],
638+
["rxjs-prefer-add", convertPreferAdd],
617639
["rxjs-prefer-angular-async-pipe", convertPreferAngularAsyncPipe],
618640
["rxjs-prefer-angular-composition", convertPreferAngularComposition],
619641
["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)