diff --git a/src/converters/lintConfigs/rules/ruleConverters.ts b/src/converters/lintConfigs/rules/ruleConverters.ts index 0037c3594..d7d279d6d 100644 --- a/src/converters/lintConfigs/rules/ruleConverters.ts +++ b/src/converters/lintConfigs/rules/ruleConverters.ts @@ -10,6 +10,7 @@ import { convertBanTypes } from "./ruleConverters/ban-types"; import { convertBinaryExpressionOperandOrder } from "./ruleConverters/binary-expression-operand-order"; import { convertCallableTypes } from "./ruleConverters/callable-types"; import { convertClassName } from "./ruleConverters/class-name"; +import { convertAngularWhitespace } from "./ruleConverters/codelyzer/angular-whitespace"; import { convertComponentClassSuffix } from "./ruleConverters/codelyzer/component-class-suffix"; import { convertComponentMaxInlineDeclarations } from "./ruleConverters/codelyzer/component-max-inline-declarations"; import { convertComponentSelector } from "./ruleConverters/codelyzer/component-selector"; @@ -17,6 +18,7 @@ import { convertContextualDecorator } from "./ruleConverters/codelyzer/contextua import { convertContextualLifecycle } from "./ruleConverters/codelyzer/contextual-lifecycle"; import { convertDirectiveClassSuffix } from "./ruleConverters/codelyzer/directive-class-suffix"; import { convertDirectiveSelector } from "./ruleConverters/codelyzer/directive-selector"; +import { convertImportDestructuringSpacing } from "./ruleConverters/codelyzer/import-destructuring-spacing"; import { convertNoAttributeDecorator } from "./ruleConverters/codelyzer/no-attribute-decorator"; import { convertNoConflictingLifecycle } from "./ruleConverters/codelyzer/no-conflicting-lifecycle"; import { convertNoForwardRef } from "./ruleConverters/codelyzer/no-forward-ref"; @@ -32,6 +34,7 @@ import { convertNoOutputsMetadataProperty } from "./ruleConverters/codelyzer/no- import { convertNoPipeImpure } from "./ruleConverters/codelyzer/no-pipe-impure"; import { convertNoQueriesMetadataProperty } from "./ruleConverters/codelyzer/no-queries-metadata-property"; import { convertPipePrefix } from "./ruleConverters/codelyzer/pipe-prefix"; +import { convertPreferInlineDecorator } from "./ruleConverters/codelyzer/prefer-inline-decorator"; import { convertPreferOnPushComponentChangeDetection } from "./ruleConverters/codelyzer/prefer-on-push-component-change-detection"; import { convertPreferOutputReadonly } from "./ruleConverters/codelyzer/prefer-output-readonly"; import { convertRelativeUrlPrefix } from "./ruleConverters/codelyzer/relative-url-prefix"; @@ -156,7 +159,6 @@ import { convertFileNameCasing } from "./ruleConverters/file-name-casing"; import { convertForin } from "./ruleConverters/forin"; import { convertFunctionConstructor } from "./ruleConverters/function-constructor"; import { convertImportBlacklist } from "./ruleConverters/import-blacklist"; -import { convertImportDestructuringSpacing } from "./ruleConverters/import-destructuring-spacing"; import { convertIncrementDecrement } from "./ruleConverters/increment-decrement"; import { convertIndent } from "./ruleConverters/indent"; import { convertInterfaceName } from "./ruleConverters/interface-name"; @@ -281,7 +283,6 @@ import { convertPreferConditionalExpression } from "./ruleConverters/prefer-cond import { convertPreferConst } from "./ruleConverters/prefer-const"; import { convertPreferForOf } from "./ruleConverters/prefer-for-of"; import { convertPreferFunctionOverMethod } from "./ruleConverters/prefer-function-over-method"; -import { convertPreferInlineDecorator } from "./ruleConverters/prefer-inline-decorator"; import { convertPreferObjectSpread } from "./ruleConverters/prefer-object-spread"; import { convertPreferReadonly } from "./ruleConverters/prefer-readonly"; import { convertPreferSwitch } from "./ruleConverters/prefer-switch"; @@ -331,6 +332,7 @@ import { convertVariableName } from "./ruleConverters/variable-name"; export const ruleConverters = new Map([ ["adjacent-overload-signatures", convertAdjacentOverloadSignatures], ["align", convertAlign], + ["angular-whitespace", convertAngularWhitespace], ["array-type", convertArrayType], ["arrow-parens", convertArrowParens], ["arrow-return-shorthand", convertArrowReturnShorthand], diff --git a/src/converters/lintConfigs/rules/ruleConverters/codelyzer/angular-whitespace.ts b/src/converters/lintConfigs/rules/ruleConverters/codelyzer/angular-whitespace.ts new file mode 100644 index 000000000..3dcd10957 --- /dev/null +++ b/src/converters/lintConfigs/rules/ruleConverters/codelyzer/angular-whitespace.ts @@ -0,0 +1,5 @@ +import { RuleConverter } from "../../ruleConverter"; + +export const convertAngularWhitespace: RuleConverter = () => { + return {}; +}; diff --git a/src/converters/lintConfigs/rules/ruleConverters/import-destructuring-spacing.ts b/src/converters/lintConfigs/rules/ruleConverters/codelyzer/import-destructuring-spacing.ts similarity index 63% rename from src/converters/lintConfigs/rules/ruleConverters/import-destructuring-spacing.ts rename to src/converters/lintConfigs/rules/ruleConverters/codelyzer/import-destructuring-spacing.ts index 1d0a27a35..b4c55f9ea 100644 --- a/src/converters/lintConfigs/rules/ruleConverters/import-destructuring-spacing.ts +++ b/src/converters/lintConfigs/rules/ruleConverters/codelyzer/import-destructuring-spacing.ts @@ -1,4 +1,4 @@ -import { RuleConverter } from "../ruleConverter"; +import { RuleConverter } from "../../ruleConverter"; export const convertImportDestructuringSpacing: RuleConverter = () => { return {}; diff --git a/src/converters/lintConfigs/rules/ruleConverters/prefer-inline-decorator.ts b/src/converters/lintConfigs/rules/ruleConverters/codelyzer/prefer-inline-decorator.ts similarity index 61% rename from src/converters/lintConfigs/rules/ruleConverters/prefer-inline-decorator.ts rename to src/converters/lintConfigs/rules/ruleConverters/codelyzer/prefer-inline-decorator.ts index 8d674d55e..57417a327 100644 --- a/src/converters/lintConfigs/rules/ruleConverters/prefer-inline-decorator.ts +++ b/src/converters/lintConfigs/rules/ruleConverters/codelyzer/prefer-inline-decorator.ts @@ -1,4 +1,4 @@ -import { RuleConverter } from "../ruleConverter"; +import { RuleConverter } from "../../ruleConverter"; export const convertPreferInlineDecorator: RuleConverter = () => { return {}; diff --git a/src/converters/lintConfigs/rules/ruleConverters/codelyzer/tests/angular-whitespace.test.ts b/src/converters/lintConfigs/rules/ruleConverters/codelyzer/tests/angular-whitespace.test.ts new file mode 100644 index 000000000..ff1bc4eda --- /dev/null +++ b/src/converters/lintConfigs/rules/ruleConverters/codelyzer/tests/angular-whitespace.test.ts @@ -0,0 +1,11 @@ +import { convertAngularWhitespace } from "../angular-whitespace"; + +describe(convertAngularWhitespace, () => { + test("conversion without arguments", () => { + const result = convertAngularWhitespace({ + ruleArguments: [], + }); + + expect(result).toEqual({}); + }); +}); diff --git a/src/converters/lintConfigs/rules/ruleConverters/tests/import-destructuring-spacing.test.ts b/src/converters/lintConfigs/rules/ruleConverters/codelyzer/tests/import-destructuring-spacing.test.ts similarity index 100% rename from src/converters/lintConfigs/rules/ruleConverters/tests/import-destructuring-spacing.test.ts rename to src/converters/lintConfigs/rules/ruleConverters/codelyzer/tests/import-destructuring-spacing.test.ts diff --git a/src/converters/lintConfigs/rules/ruleConverters/tests/prefer-inline-decorator.test.ts b/src/converters/lintConfigs/rules/ruleConverters/codelyzer/tests/prefer-inline-decorator.test.ts similarity index 100% rename from src/converters/lintConfigs/rules/ruleConverters/tests/prefer-inline-decorator.test.ts rename to src/converters/lintConfigs/rules/ruleConverters/codelyzer/tests/prefer-inline-decorator.test.ts diff --git a/src/converters/lintConfigs/rules/ruleConverters/codelyzer/tests/use-pipe-decorator.test.ts b/src/converters/lintConfigs/rules/ruleConverters/codelyzer/tests/use-pipe-decorator.test.ts index 5d59b30e3..001d8ab78 100644 --- a/src/converters/lintConfigs/rules/ruleConverters/codelyzer/tests/use-pipe-decorator.test.ts +++ b/src/converters/lintConfigs/rules/ruleConverters/codelyzer/tests/use-pipe-decorator.test.ts @@ -6,6 +6,6 @@ describe(convertUsePipeDecorator, () => { ruleArguments: [], }); - expect(result).toEqual({ rules: [] }); + expect(result).toEqual({}); }); }); diff --git a/src/converters/lintConfigs/rules/ruleConverters/codelyzer/use-pipe-decorator.ts b/src/converters/lintConfigs/rules/ruleConverters/codelyzer/use-pipe-decorator.ts index 2506632d4..90ca37a63 100644 --- a/src/converters/lintConfigs/rules/ruleConverters/codelyzer/use-pipe-decorator.ts +++ b/src/converters/lintConfigs/rules/ruleConverters/codelyzer/use-pipe-decorator.ts @@ -1,7 +1,5 @@ import { RuleConverter } from "../../ruleConverter"; export const convertUsePipeDecorator: RuleConverter = () => { - return { - rules: [], - }; + return {}; }; diff --git a/src/converters/lintConfigs/rules/ruleConverters/ngrx-tslint-rules/no-duplicate-action-types.ts b/src/converters/lintConfigs/rules/ruleConverters/ngrx-tslint-rules/no-duplicate-action-types.ts index a8ce6e832..7de53aa0a 100644 --- a/src/converters/lintConfigs/rules/ruleConverters/ngrx-tslint-rules/no-duplicate-action-types.ts +++ b/src/converters/lintConfigs/rules/ruleConverters/ngrx-tslint-rules/no-duplicate-action-types.ts @@ -1,7 +1,5 @@ import { RuleConverter } from "../../ruleConverter"; export const convertNoDuplicateActionTypes: RuleConverter = () => { - return { - rules: [], - }; + return {}; }; diff --git a/src/converters/lintConfigs/rules/ruleConverters/ngrx-tslint-rules/tests/no-duplicate-action-types.test.ts b/src/converters/lintConfigs/rules/ruleConverters/ngrx-tslint-rules/tests/no-duplicate-action-types.test.ts index 4cbeee165..3dd7f7bb7 100644 --- a/src/converters/lintConfigs/rules/ruleConverters/ngrx-tslint-rules/tests/no-duplicate-action-types.test.ts +++ b/src/converters/lintConfigs/rules/ruleConverters/ngrx-tslint-rules/tests/no-duplicate-action-types.test.ts @@ -6,8 +6,6 @@ describe(convertNoDuplicateActionTypes, () => { ruleArguments: [], }); - expect(result).toEqual({ - rules: [], - }); + expect(result).toEqual({}); }); });