From 317cadaa6b9de62f3925eaed54441d781c7e824b Mon Sep 17 00:00:00 2001 From: Mikhail Preyskurantov <5574159+mpreyskurantov@users.noreply.github.com> Date: Mon, 7 Oct 2024 12:33:23 +0300 Subject: [PATCH 1/2] rename validate symbols script --- ...lidate-cyrillic-symbols.js => validate-non-latin-symbols.js} | 0 packages/devextreme/package.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename packages/devextreme/build/linters/{validate-cyrillic-symbols.js => validate-non-latin-symbols.js} (100%) diff --git a/packages/devextreme/build/linters/validate-cyrillic-symbols.js b/packages/devextreme/build/linters/validate-non-latin-symbols.js similarity index 100% rename from packages/devextreme/build/linters/validate-cyrillic-symbols.js rename to packages/devextreme/build/linters/validate-non-latin-symbols.js diff --git a/packages/devextreme/package.json b/packages/devextreme/package.json index 7f3df5ddc2db..015859b698e8 100644 --- a/packages/devextreme/package.json +++ b/packages/devextreme/package.json @@ -191,7 +191,7 @@ "lint-renovation": "eslint --quiet --ext .tsx,.ts ./js/renovation", "lint-dts": "eslint js --ext .d.ts --ignore-pattern /js/renovation/", "lint-staged": "lint-staged", - "lint-texts": "node build/linters/validate-cyrillic-symbols.js", + "lint-texts": "node build/linters/validate-non-latin-symbols.js", "build": "cross-env BUILD_ESM_PACKAGE=true gulp default", "build:dev": "cross-env DEVEXTREME_TEST_CI=TRUE BUILD_ESM_PACKAGE=true gulp default", "build:testcafe": "cross-env DEVEXTREME_TEST_CI=TRUE BUILD_ESM_PACKAGE=true BUILD_TESTCAFE=TRUE gulp default", From 2b887ac5477645dec00c9e7ac32cb2be9fc678e5 Mon Sep 17 00:00:00 2001 From: Mikhail Preyskurantov <5574159+mpreyskurantov@users.noreply.github.com> Date: Thu, 17 Oct 2024 14:20:14 +0300 Subject: [PATCH 2/2] rename occ, chars range to codes range --- .../devextreme/build/linters/validate-non-latin-symbols.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/devextreme/build/linters/validate-non-latin-symbols.js b/packages/devextreme/build/linters/validate-non-latin-symbols.js index a643a047ea7c..d804d44d6a18 100644 --- a/packages/devextreme/build/linters/validate-non-latin-symbols.js +++ b/packages/devextreme/build/linters/validate-non-latin-symbols.js @@ -11,7 +11,7 @@ const RESULT = { ok: 0, fail: 1, }; -const CYRILLIC_RE = /[а-яА-Я]/; +const NON_LATIN_RE = /[\u0410-\u044f]/; const check = async(filePaths) => { const nonCodeFiles = filePaths @@ -26,9 +26,9 @@ const check = async(filePaths) => { let lineNum = 1; rl.on('line', (line) => { - if(CYRILLIC_RE.test(line)) { + if(NON_LATIN_RE.test(line)) { const filename = path.join(process.cwd(), filePath); - console.log(`${filename}:${lineNum} cyrillic symbols found!`); + console.log(`${filename}:${lineNum} non-latin symbols found!`); result = RESULT.fail; } lineNum++;