diff --git a/src/engine/rule-engine.ts b/src/engine/rule-engine.ts index 0ba1643..90761d6 100644 --- a/src/engine/rule-engine.ts +++ b/src/engine/rule-engine.ts @@ -1,11 +1,11 @@ import chalk from "chalk"; -import type { Config, Rule, TranslationFiles } from "../types"; +import type { Config, Rule, TranslationFiles } from "../types.ts"; import * as rules from "../rules/index.js"; import { ProblemStore } from "../classes/problem-store.class.js"; -import { getRuleIgnoreKeys, getRuleSeverity } from "../utils/rules-helpers"; -import { RULE_TYPE, SEVERITY_LEVEL } from "../constants"; -import { loadLanguageFiles } from "../utils/file-helpers"; -import { Logger } from "../classes/logger.class"; +import { getRuleIgnoreKeys, getRuleSeverity } from "../utils/rules-helpers.ts"; +import { RULE_TYPE, SEVERITY_LEVEL } from "../constants.ts"; +import { loadLanguageFiles } from "../utils/file-helpers.ts"; +import { Logger } from "../classes/logger.class.ts"; function runRules(config: Config) { const problemStore = new ProblemStore(); diff --git a/src/rules/no-extra-whitespace/index.ts b/src/rules/no-extra-whitespace/index.ts index 71d72b7..ada33cf 100644 --- a/src/rules/no-extra-whitespace/index.ts +++ b/src/rules/no-extra-whitespace/index.ts @@ -1 +1 @@ -export { noExtraWhitespace } from "./no-extra-whitespace"; +export { noExtraWhitespace } from "./no-extra-whitespace.ts"; diff --git a/src/rules/no-extra-whitespace/problems.ts b/src/rules/no-extra-whitespace/problems.ts index 25fd600..6858ef7 100644 --- a/src/rules/no-extra-whitespace/problems.ts +++ b/src/rules/no-extra-whitespace/problems.ts @@ -1,5 +1,5 @@ -import { Problem } from "../../classes/problem.class"; -import { RuleMeta, RuleSeverity } from "../../types"; +import { Problem } from "../../classes/problem.class.ts"; +import { RuleMeta, RuleSeverity } from "../../types.ts"; type ProblemContext = { key: string; diff --git a/src/rules/no-html-messages/index.ts b/src/rules/no-html-messages/index.ts index 23dadb6..45b8190 100644 --- a/src/rules/no-html-messages/index.ts +++ b/src/rules/no-html-messages/index.ts @@ -1 +1 @@ -export { noHtmlMessages } from "./no-html-messages"; +export { noHtmlMessages } from "./no-html-messages.ts"; diff --git a/src/rules/no-html-messages/problems.ts b/src/rules/no-html-messages/problems.ts index 4f4f73a..1277e16 100644 --- a/src/rules/no-html-messages/problems.ts +++ b/src/rules/no-html-messages/problems.ts @@ -1,5 +1,5 @@ -import { Problem } from "../../classes/problem.class"; -import { RuleMeta, RuleSeverity } from "../../types"; +import { Problem } from "../../classes/problem.class.ts"; +import { RuleMeta, RuleSeverity } from "../../types.ts"; type ProblemContext = { key: string; diff --git a/src/rules/no-invalid-configuration/no-invalid-configuration.spec.ts b/src/rules/no-invalid-configuration/no-invalid-configuration.spec.ts index 6adae29..65f9e4a 100644 --- a/src/rules/no-invalid-configuration/no-invalid-configuration.spec.ts +++ b/src/rules/no-invalid-configuration/no-invalid-configuration.spec.ts @@ -1,11 +1,11 @@ -import { createMockProblemReporter } from "../../utils/test-helpers"; +import { createMockProblemReporter } from "../../utils/test-helpers.ts"; import { Config, RuleContext, RuleSeverity, TranslationFiles, } from "../../types.ts"; -import { noInvalidConfiguration } from "./no-invalid-configuration"; +import { noInvalidConfiguration } from "./no-invalid-configuration.ts"; import { getInvalidPathToTranslatedFilesProblem, getInvalidTranslationFilesProblem, diff --git a/src/rules/no-invalid-configuration/no-invalid-configuration.ts b/src/rules/no-invalid-configuration/no-invalid-configuration.ts index 44d8ae6..37049c5 100644 --- a/src/rules/no-invalid-configuration/no-invalid-configuration.ts +++ b/src/rules/no-invalid-configuration/no-invalid-configuration.ts @@ -9,7 +9,7 @@ import { isEmptyString } from "../../utils/string-helpers.ts"; import { configurableRuleNames, unConfigurableRuleNames, -} from "../../constants"; +} from "../../constants.ts"; import { getInvalidTranslationFilesProblem, getMissingSourceFileProblem, diff --git a/src/rules/no-invalid-variables/index.ts b/src/rules/no-invalid-variables/index.ts index 1feb8bf..e89e603 100644 --- a/src/rules/no-invalid-variables/index.ts +++ b/src/rules/no-invalid-variables/index.ts @@ -1 +1 @@ -export { noInvalidVariables } from "./no-invalid-variables"; +export { noInvalidVariables } from "./no-invalid-variables.ts"; diff --git a/src/rules/no-invalid-variables/no-invalid-variables.spec.ts b/src/rules/no-invalid-variables/no-invalid-variables.spec.ts index 638f474..526ea6a 100644 --- a/src/rules/no-invalid-variables/no-invalid-variables.spec.ts +++ b/src/rules/no-invalid-variables/no-invalid-variables.spec.ts @@ -5,7 +5,7 @@ import { RuleSeverity, TranslationFiles, } from "../../types.js"; -import { noInvalidVariables } from "./no-invalid-variables"; +import { noInvalidVariables } from "./no-invalid-variables.ts"; import { getMismatchedVariableFromSourceProblem, getMissingVariableFromSourceProblem, diff --git a/src/rules/no-invalid-variables/problems.ts b/src/rules/no-invalid-variables/problems.ts index 2f5ae69..f4b2843 100644 --- a/src/rules/no-invalid-variables/problems.ts +++ b/src/rules/no-invalid-variables/problems.ts @@ -1,5 +1,5 @@ -import { Problem } from "../../classes/problem.class"; -import { RuleMeta, RuleSeverity } from "../../types"; +import { Problem } from "../../classes/problem.class.ts"; +import { RuleMeta, RuleSeverity } from "../../types.ts"; type ProblemContext = { key: string; diff --git a/src/rules/no-malformed-keys/custom-key-name-validation.js b/src/rules/no-malformed-keys/custom-key-name-validation.js index ed61ccb..ac63418 100644 --- a/src/rules/no-malformed-keys/custom-key-name-validation.js +++ b/src/rules/no-malformed-keys/custom-key-name-validation.js @@ -2,4 +2,4 @@ // validation function to the no-malformed-keys.validationFunctionPath option module.exports = (key) => { return false; -} \ No newline at end of file +}; diff --git a/src/rules/no-malformed-keys/index.ts b/src/rules/no-malformed-keys/index.ts index 36f25fd..304fe16 100644 --- a/src/rules/no-malformed-keys/index.ts +++ b/src/rules/no-malformed-keys/index.ts @@ -1 +1 @@ -export { noMalformedKeys } from "./no-malformed-keys"; +export { noMalformedKeys } from "./no-malformed-keys.ts"; diff --git a/src/rules/no-malformed-keys/no-malformed-keys.ts b/src/rules/no-malformed-keys/no-malformed-keys.ts index 6eba53d..9db701e 100644 --- a/src/rules/no-malformed-keys/no-malformed-keys.ts +++ b/src/rules/no-malformed-keys/no-malformed-keys.ts @@ -58,7 +58,7 @@ const noMalformedKeys: Rule = { // Check if the user provided their own validation function. If supplied. // this user-supplied validation function will be the only validation function that we run. // At this point, Keeli is already running, so we can assume the provided function - // is valid, otherwise the problem would have ben caught when the configuration rules run. + // is valid, otherwise the problem would have been caught when the configuration rules run. if (validationFunctionPath) { // Load the function at the provided validationFunctionPath validationFunction = require(validationFunctionPath); diff --git a/src/rules/no-malformed-keys/problems.ts b/src/rules/no-malformed-keys/problems.ts index 534ee5b..9106442 100644 --- a/src/rules/no-malformed-keys/problems.ts +++ b/src/rules/no-malformed-keys/problems.ts @@ -1,5 +1,5 @@ -import { Problem } from "../../classes/problem.class"; -import { RuleMeta, RuleSeverity } from "../../types"; +import { Problem } from "../../classes/problem.class.ts"; +import { RuleMeta, RuleSeverity } from "../../types.ts"; type ProblemContext = { key: string; diff --git a/src/rules/no-missing-keys/index.ts b/src/rules/no-missing-keys/index.ts index de0a71b..e0860e4 100644 --- a/src/rules/no-missing-keys/index.ts +++ b/src/rules/no-missing-keys/index.ts @@ -1 +1 @@ -export { noMissingKeys } from "./no-missing-keys"; +export { noMissingKeys } from "./no-missing-keys.ts"; diff --git a/src/rules/no-missing-keys/problems.ts b/src/rules/no-missing-keys/problems.ts index 4f9da46..4829d1c 100644 --- a/src/rules/no-missing-keys/problems.ts +++ b/src/rules/no-missing-keys/problems.ts @@ -1,5 +1,5 @@ -import { Problem } from "../../classes/problem.class"; -import { RuleMeta, RuleSeverity } from "../../types"; +import { Problem } from "../../classes/problem.class.ts"; +import { RuleMeta, RuleSeverity } from "../../types.ts"; type ProblemContext = { key: string; diff --git a/src/rules/no-untranslated-messages/problems.ts b/src/rules/no-untranslated-messages/problems.ts index cbe3779..ff5c3c2 100644 --- a/src/rules/no-untranslated-messages/problems.ts +++ b/src/rules/no-untranslated-messages/problems.ts @@ -1,5 +1,5 @@ -import { Problem } from "../../classes/problem.class"; -import { RuleMeta, RuleSeverity } from "../../types"; +import { Problem } from "../../classes/problem.class.ts"; +import { RuleMeta, RuleSeverity } from "../../types.ts"; type ProblemContext = { key: string; diff --git a/src/utils/config-helpers.spec.ts b/src/utils/config-helpers.spec.ts index d50bad1..3f133c4 100644 --- a/src/utils/config-helpers.spec.ts +++ b/src/utils/config-helpers.spec.ts @@ -1,6 +1,6 @@ -import type { Config } from "../types"; +import type { Config } from "../types.ts"; -import { getAllSupportedLocales } from "./config-helpers"; +import { getAllSupportedLocales } from "./config-helpers.ts"; describe("getAllSupportedLocales", () => { it("should get all supported locales", () => { diff --git a/src/utils/config-helpers.ts b/src/utils/config-helpers.ts index 6ce0c9d..7581e3b 100644 --- a/src/utils/config-helpers.ts +++ b/src/utils/config-helpers.ts @@ -1,4 +1,4 @@ -import type { Config } from "../types"; +import type { Config } from "../types.ts"; export function getAllSupportedLocales(config: Config): string[] { const allSupportedLocales = new Set([ diff --git a/src/utils/file-helpers.spec.ts b/src/utils/file-helpers.spec.ts index 7ad3609..3da2b70 100644 --- a/src/utils/file-helpers.spec.ts +++ b/src/utils/file-helpers.spec.ts @@ -1,5 +1,5 @@ -import type { TranslationFiles } from "../types"; -import { flatten } from "./file-helpers"; +import type { TranslationFiles } from "../types.ts"; +import { flatten } from "./file-helpers.ts"; describe("flatten", () => { it("should flatten nested JavaScript objects", () => { diff --git a/src/utils/file-helpers.ts b/src/utils/file-helpers.ts index c6cedaa..a5f284a 100644 --- a/src/utils/file-helpers.ts +++ b/src/utils/file-helpers.ts @@ -1,7 +1,7 @@ import path from "node:path"; import fs from "node:fs"; import { flattie } from "flattie"; -import type { Config, TranslationFiles } from "../types"; +import type { Config, TranslationFiles } from "../types.ts"; export function flatten(obj: TranslationFiles): Record { return flattie(obj, "."); diff --git a/src/utils/message-helpers.spec.ts b/src/utils/message-helpers.spec.ts index 810544d..fa356a6 100644 --- a/src/utils/message-helpers.spec.ts +++ b/src/utils/message-helpers.spec.ts @@ -1,4 +1,4 @@ -import { getMessageHasHtml } from "./message-helpers"; +import { getMessageHasHtml } from "./message-helpers.ts"; describe("getMessageHasHtml", () => { it("should return true for simple HTML tags", () => { diff --git a/src/utils/rules-helpers.spec.ts b/src/utils/rules-helpers.spec.ts index 802c66a..df3f4b3 100644 --- a/src/utils/rules-helpers.spec.ts +++ b/src/utils/rules-helpers.spec.ts @@ -1,5 +1,5 @@ -import type { Config, Rule, RuleSeverity, RuleMeta } from "../types"; -import { getRuleSeverity, getRuleIgnoreKeys } from "./rules-helpers"; +import type { Config, Rule, RuleMeta } from "../types.ts"; +import { getRuleSeverity, getRuleIgnoreKeys } from "./rules-helpers.ts"; describe("getRuleSeverity", () => { it("should get ruleMeta.defaultSeverity if none is supplied", () => { diff --git a/src/utils/rules-helpers.ts b/src/utils/rules-helpers.ts index 28115db..63004a9 100644 --- a/src/utils/rules-helpers.ts +++ b/src/utils/rules-helpers.ts @@ -1,5 +1,5 @@ -import { validSeverities } from "../constants"; -import type { Config, Rule, RuleSeverity } from "../types"; +import { validSeverities } from "../constants.ts"; +import type { Config, Rule, RuleSeverity } from "../types.ts"; /** * Get the user-supplied (or default) configured severity of a specific rule. diff --git a/src/utils/string-helpers.spec.ts b/src/utils/string-helpers.spec.ts index 8a1043a..2f082fa 100644 --- a/src/utils/string-helpers.spec.ts +++ b/src/utils/string-helpers.spec.ts @@ -6,7 +6,7 @@ import { isKebabCase, stringHasWhitespacePadding, stringHasExtraneousWhitespace, -} from "./string-helpers"; +} from "./string-helpers.ts"; describe("isEmptyString", () => { it("should return true for empty strings", () => { diff --git a/src/utils/test-helpers.ts b/src/utils/test-helpers.ts index 259f6ed..14b9993 100644 --- a/src/utils/test-helpers.ts +++ b/src/utils/test-helpers.ts @@ -1,4 +1,4 @@ -import { ProblemStore } from "../classes/problem-store.class"; +import { ProblemStore } from "../classes/problem-store.class.ts"; export const createMockProblemReporter = () => { return { diff --git a/src/utils/variable-helpers.spec.ts b/src/utils/variable-helpers.spec.ts index 8808092..2ebd805 100644 --- a/src/utils/variable-helpers.spec.ts +++ b/src/utils/variable-helpers.spec.ts @@ -1,4 +1,4 @@ -import { hasUnbalancedBrackets } from "./variable-helpers"; +import { hasUnbalancedBrackets } from "./variable-helpers.ts"; describe("hasUnbalancedBrackets", () => { it("should return true for strings with unbalanced brackets", () => {