Skip to content

Commit

Permalink
Rename validate symbols script (#28146)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpreyskurantov authored Oct 22, 2024
1 parent 38319c8 commit 74937d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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++;
Expand Down
2 changes: 1 addition & 1 deletion packages/devextreme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,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",
Expand Down

0 comments on commit 74937d8

Please sign in to comment.