Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename validate symbols script #28146

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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",
Expand Down
Loading