Skip to content

Commit ff00f31

Browse files
PR: LIBRARY: Eslint Plugin from Github (#10379)
* work for the surveyjs/service#3361
1 parent 13162c3 commit ff00f31

30 files changed

+51
-325
lines changed

.eslintrc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
"plugins": [
99
"@typescript-eslint",
1010
"surveyjs",
11-
"i18n"
11+
"surveyjs/eslint-plugin-i18n",
1212
],
1313
"extends": [
1414
"eslint:recommended",
@@ -101,7 +101,7 @@ module.exports = {
101101
// "@typescript-eslint/no-inferrable-types": "off",
102102
// "@typescript-eslint/no-empty-interface": "off",
103103
// "@typescript-eslint/no-empty-function": "off",
104-
"i18n/only-english-or-code": [
104+
"surveyjs/eslint-plugin-i18n/only-english-or-code": [
105105
"error",
106106
{
107107
"includeIdentifier": true,
@@ -122,7 +122,7 @@ module.exports = {
122122
{
123123
"files": ["packages/survey-core/src/localization/*.ts"],
124124
"rules": {
125-
"i18n/only-english-or-code": "off"
125+
"surveyjs/eslint-plugin-i18n/only-english-or-code": "off"
126126
}
127127
}
128128
]

e2e/survey/localization.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ frameworks.forEach(framework => {
8888
await page.evaluate(() => {
8989
window["survey"].locale = "ru";
9090
});
91-
await page.hover('input[value="Далее"]'); // eslint-disable-line i18n/only-english-or-code
91+
await page.hover('input[value="Далее"]'); // eslint-disable-line surveyjs/eslint-plugin-i18n/only-english-or-code
9292

9393
await page.evaluate(() => {
9494
window["survey"].locale = "en";

e2e/survey/options.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ frameworks.forEach(framework => {
8686
await expect(requiredElement).toHaveText("*");
8787

8888
await page.evaluate(() => {
89-
window["survey"].requiredText = "😱"; // eslint-disable-line i18n/only-english-or-code
89+
window["survey"].requiredText = "😱"; // eslint-disable-line surveyjs/eslint-plugin-i18n/only-english-or-code
9090
window["survey"].render();
9191
});
9292

93-
await expect(requiredElement).toHaveText("😱"); // eslint-disable-line i18n/only-english-or-code
93+
await expect(requiredElement).toHaveText("😱"); // eslint-disable-line surveyjs/eslint-plugin-i18n/only-english-or-code
9494
});
9595

9696
test("set question numbers on page", async ({ page }) => {

e2e/survey/preprocessTitlesAndHtml.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ frameworks.forEach((framework) => {
4848
await initSurvey(page, framework, json);
4949
const titleLocator = page.locator("div[id$=ariaTitle][id^=sq]");
5050
// Check first title
51-
let text = "A. Please type your name (*)"; // eslint-disable-line i18n/only-english-or-code
51+
let text = "A. Please type your name (*)"; // eslint-disable-line surveyjs/eslint-plugin-i18n/only-english-or-code
5252
await expect(titleLocator.first()).toBeVisible();
5353
await expect(await titleLocator.first().textContent()).toBe(text);
5454

5555
// Check second title
56-
text = "B. Please type your e-mail (*)";// eslint-disable-line i18n/only-english-or-code
56+
text = "B. Please type your e-mail (*)";// eslint-disable-line surveyjs/eslint-plugin-i18n/only-english-or-code
5757
await expect(titleLocator.nth(1)).toBeVisible();
5858
await expect(await titleLocator.nth(1).textContent()).toBe(text);
5959

@@ -63,7 +63,7 @@ frameworks.forEach((framework) => {
6363
await page.locator("input[value='Next']").click();
6464

6565
// Check third title
66-
text = "C. wombat, please tell us what is on your mind";// eslint-disable-line i18n/only-english-or-code
66+
text = "C. wombat, please tell us what is on your mind";// eslint-disable-line surveyjs/eslint-plugin-i18n/only-english-or-code
6767
await expect(titleLocator.first()).toBeVisible();
6868
await expect(await titleLocator.first().textContent()).toBe(text);
6969

eslint-surveyjs/eslint-plugin-i18n/index.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

eslint-surveyjs/eslint-plugin-i18n/lib/rules/only-english-or-code.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

eslint-surveyjs/eslint-plugin-i18n/lib/utils/define.js

Lines changed: 0 additions & 143 deletions
This file was deleted.

eslint-surveyjs/eslint-plugin-i18n/package.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

eslint-surveyjs/index.js

Lines changed: 0 additions & 38 deletions
This file was deleted.

eslint-surveyjs/package.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)