Skip to content
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
6 changes: 4 additions & 2 deletions modules/20-arithmetics/80-linting/en/EXERCISE.md
Original file line number Diff line number Diff line change
@@ -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);
<!-- lint-code-blocks: skip — неаккуратный код это предмет урока, форматтер привёл бы его к стилю -->

```text
console.log( (5 **2)-(3* 7));
```

The result must stay `4`.
6 changes: 4 additions & 2 deletions modules/20-arithmetics/80-linting/en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
<!-- lint-code-blocks: skip — неаккуратный код это предмет урока, форматтер привёл бы его к стилю -->

```text
const result = 1+ 3;
```

The formatter turns into this one:
Expand Down
6 changes: 4 additions & 2 deletions modules/20-arithmetics/80-linting/es/EXERCISE.md
Original file line number Diff line number Diff line change
@@ -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);
<!-- lint-code-blocks: skip — неаккуратный код это предмет урока, форматтер привёл бы его к стилю -->

```text
console.log( (5 **2)-(3* 7));
```

El resultado debe seguir siendo `4`.
6 changes: 4 additions & 2 deletions modules/20-arithmetics/80-linting/es/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
<!-- lint-code-blocks: skip — неаккуратный код это предмет урока, форматтер привёл бы его к стилю -->

```text
const result = 1+ 3;
```

El formateador lo convierte en este otro:
Expand Down
6 changes: 4 additions & 2 deletions modules/20-arithmetics/80-linting/ru/EXERCISE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Вы получили код от коллеги — он работает правильно, но нарушает стандарт оформления. Исправьте пробелы вокруг операторов, не меняя логику:

```javascript
console.log(5 ** 2 - 3 * 7);
<!-- lint-code-blocks: skip — неаккуратный код это предмет урока, форматтер привёл бы его к стилю -->

```text
console.log( (5 **2)-(3* 7));
```

Результат должен остаться `4`.
6 changes: 4 additions & 2 deletions modules/20-arithmetics/80-linting/ru/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ const result = 1 + 3;

Расстановка пробелов и отступов это отдельная задача, и линтер её не решает. Для неё есть форматтер, у oxlint это [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html). Вот такой код:

```javascript
const result = 1 + 3;
<!-- lint-code-blocks: skip — неаккуратный код это предмет урока, форматтер привёл бы его к стилю -->

```text
const result = 1+ 3;
```

Форматтер сам превратит в такой:
Expand Down
Loading