diff --git a/modules/20-arithmetics/80-linting/en/EXERCISE.md b/modules/20-arithmetics/80-linting/en/EXERCISE.md index 845d48ff..abfdb6cf 100644 --- a/modules/20-arithmetics/80-linting/en/EXERCISE.md +++ b/modules/20-arithmetics/80-linting/en/EXERCISE.md @@ -1,7 +1,9 @@ You received some code from a colleague — it works correctly, but it violates the formatting standard. Fix the spaces around the operators without changing the logic: -```javascript -console.log(5 ** 2 - 3 * 7); + + +```text +console.log( (5 **2)-(3* 7)); ``` The result must stay `4`. diff --git a/modules/20-arithmetics/80-linting/en/README.md b/modules/20-arithmetics/80-linting/en/README.md index 6797b1d7..fa191d2a 100644 --- a/modules/20-arithmetics/80-linting/en/README.md +++ b/modules/20-arithmetics/80-linting/en/README.md @@ -42,8 +42,10 @@ Code Linter Result Placing spaces and indentation is a separate task, and the linter does not solve it. That is what a formatter is for, and in oxc it is [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html). This code: -```javascript -const result = 1 + 3; + + +```text +const result = 1+ 3; ``` The formatter turns into this one: diff --git a/modules/20-arithmetics/80-linting/es/EXERCISE.md b/modules/20-arithmetics/80-linting/es/EXERCISE.md index 191ad2fc..93027ff4 100644 --- a/modules/20-arithmetics/80-linting/es/EXERCISE.md +++ b/modules/20-arithmetics/80-linting/es/EXERCISE.md @@ -1,7 +1,9 @@ Recibiste código de un colega: funciona correctamente, pero viola el estándar de formato. Corrige los espacios alrededor de los operadores sin cambiar la lógica: -```javascript -console.log(5 ** 2 - 3 * 7); + + +```text +console.log( (5 **2)-(3* 7)); ``` El resultado debe seguir siendo `4`. diff --git a/modules/20-arithmetics/80-linting/es/README.md b/modules/20-arithmetics/80-linting/es/README.md index ae0345c2..0c26cdd0 100644 --- a/modules/20-arithmetics/80-linting/es/README.md +++ b/modules/20-arithmetics/80-linting/es/README.md @@ -42,8 +42,10 @@ Código Linter Resultado La colocación de espacios e indentación es una tarea aparte, y el linter no la resuelve. Para eso está el formateador, que en oxc es [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html). Este código: -```javascript -const result = 1 + 3; + + +```text +const result = 1+ 3; ``` El formateador lo convierte en este otro: diff --git a/modules/20-arithmetics/80-linting/ru/EXERCISE.md b/modules/20-arithmetics/80-linting/ru/EXERCISE.md index 92cd479e..80fd7dda 100644 --- a/modules/20-arithmetics/80-linting/ru/EXERCISE.md +++ b/modules/20-arithmetics/80-linting/ru/EXERCISE.md @@ -1,7 +1,9 @@ Вы получили код от коллеги — он работает правильно, но нарушает стандарт оформления. Исправьте пробелы вокруг операторов, не меняя логику: -```javascript -console.log(5 ** 2 - 3 * 7); + + +```text +console.log( (5 **2)-(3* 7)); ``` Результат должен остаться `4`. diff --git a/modules/20-arithmetics/80-linting/ru/README.md b/modules/20-arithmetics/80-linting/ru/README.md index fd4621bc..e2597f74 100644 --- a/modules/20-arithmetics/80-linting/ru/README.md +++ b/modules/20-arithmetics/80-linting/ru/README.md @@ -42,8 +42,10 @@ const result = 1 + 3; Расстановка пробелов и отступов это отдельная задача, и линтер её не решает. Для неё есть форматтер, у oxlint это [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html). Вот такой код: -```javascript -const result = 1 + 3; + + +```text +const result = 1+ 3; ``` Форматтер сам превратит в такой: