Skip to content

Commit 461875a

Browse files
author
Josh Goldberg
authored
1 parent 39c2617 commit 461875a

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { RuleConverter } from "../../converter";
2+
3+
export const convertRelativeUrlPrefix: RuleConverter = () => {
4+
return {
5+
rules: [
6+
{
7+
ruleName: "@angular-eslint/relative-url-prefix",
8+
},
9+
],
10+
plugins: ["@angular-eslint/eslint-plugin"],
11+
};
12+
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { convertRelativeUrlPrefix } from "../relative-url-prefix";
2+
3+
describe(convertRelativeUrlPrefix, () => {
4+
test("conversion without arguments", () => {
5+
const result = convertRelativeUrlPrefix({
6+
ruleArguments: [],
7+
});
8+
9+
expect(result).toEqual({
10+
rules: [
11+
{
12+
ruleName: "@angular-eslint/relative-url-prefix",
13+
},
14+
],
15+
plugins: ["@angular-eslint/eslint-plugin"],
16+
});
17+
});
18+
});

src/rules/rulesConverters.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ import { convertNoOutputNative } from "./converters/codelyzer/no-output-native";
156156
import { convertNoOutputOnPrefix } from "./converters/codelyzer/no-output-on-prefix";
157157
import { convertNoOutputsMetadataProperty } from "./converters/codelyzer/no-outputs-metadata-property";
158158
import { convertPreferOutputReadonly } from "./converters/codelyzer/prefer-output-readonly";
159+
import { convertRelativeUrlPrefix } from "./converters/codelyzer/relative-url-prefix";
159160
import { convertUseInjectableProvidedIn } from "./converters/codelyzer/use-injectable-provided-in";
160161
import { convertUseLifecycleInterface } from "./converters/codelyzer/use-lifecycle-interface";
161162
import { convertUsePipeDecorator } from "./converters/codelyzer/use-pipe-decorator";
@@ -304,6 +305,7 @@ export const rulesConverters = new Map([
304305
["promise-function-async", convertPromiseFunctionAsync],
305306
["quotemark", convertQuotemark],
306307
["radix", convertRadix],
308+
["relative-url-prefix", convertRelativeUrlPrefix],
307309
["restrict-plus-operands", convertRestrictPlusOperands],
308310
["semicolon", convertSemicolon],
309311
["space-before-function-paren", convertSpaceBeforeFunctionParen],

0 commit comments

Comments
 (0)