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

feat: add eslint-plugin-react-compiler #6920

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SevereCloud
Copy link
Contributor

See errors

@SevereCloud SevereCloud added the no-stale Добавляет PR в исключения для автоматического закрытия label May 16, 2024
Copy link
Contributor

github-actions bot commented May 16, 2024

size-limit report 📦

Path Size
JS 372.66 KB (0%)
JS (gzip) 114.08 KB (0%)
JS (brotli) 93.9 KB (0%)
JS import Div (tree shaking) 1.42 KB (0%)
CSS 300 KB (0%)
CSS (gzip) 38.26 KB (0%)
CSS (brotli) 30.79 KB (0%)

Copy link

codesandbox-ci bot commented May 16, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Contributor

github-actions bot commented May 16, 2024

👀 Docs deployed

Commit 34ca9d8

Copy link

codecov bot commented May 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.98%. Comparing base (e728d24) to head (34ca9d8).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6920   +/-   ##
=======================================
  Coverage   83.98%   83.98%           
=======================================
  Files         358      358           
  Lines       10882    10882           
  Branches     3589     3589           
=======================================
  Hits         9139     9139           
  Misses       1743     1743           
Flag Coverage Δ
unittests 83.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SevereCloud SevereCloud force-pushed the feat/add-eslint-plugin-react-compiler branch from 3f23ea6 to 2483190 Compare June 25, 2024 11:00
Copy link
Contributor

github-actions bot commented Jun 25, 2024

e2e tests

Playwright Report

SevereCloud added a commit that referenced this pull request Jun 25, 2024
- see #6920

---

## Описание

React компилятор не разрешает писать в переменные за пределами хука

> Writing to a variable defined outside a component or hook is not allowed.

## Изменения

Используем контекст, вместо переменной
SevereCloud added a commit that referenced this pull request Jun 25, 2024
- see #6920

---

## Описание

React компилятор ругается на мутацию аргумента хука

> Mutating component props or hook arguments is not allowed. Consider using a local variable instead `react-compiler/react-compiler`

## Изменения

Переписал, чтобы линтер не ругался
SevereCloud added a commit that referenced this pull request Jun 25, 2024
- see #6920

---

## Описание

React компилятор не разрешает писать в переменные за пределами хука

> Writing to a variable defined outside a component or hook is not allowed.

## Изменения

Используем WeakMap

---------

Co-authored-by: Inomdzhon Mirdzhamolov <i.mirdzhamolov@vk.team>
SevereCloud added a commit that referenced this pull request Jun 25, 2024
- see #6920

---

## Описание

React компилятор ругается на мутацию аргумента хука

> Mutating component props or hook arguments is not allowed. Consider using a local variable instead `react-compiler/react-compiler`

## Изменения

Переписал, чтобы линтер не ругался
SevereCloud added a commit that referenced this pull request Jun 25, 2024
- see #6920

---

Используем  `use no memo` для отключения компилятора в тестах
@SevereCloud SevereCloud mentioned this pull request Jun 25, 2024
SevereCloud added a commit that referenced this pull request Jun 25, 2024
- see #6920

---

Используем  `use no memo` для отключения компилятора в тестах
SevereCloud added a commit that referenced this pull request Jun 25, 2024
- see #6920

---

## Описание

Для компилятора требуется знать точные зависимости в useMemo

## Изменение

Избавился от useMemo, написал отдельный класс реализующий MutableRefObject
SevereCloud added a commit that referenced this pull request Jun 26, 2024
- see #6920

---

## Описание

Линтер компилятора ругается на внутренности хука useExternRef

## Изменение

Избавился от хуков, написал отдельный класс реализующий EventListenerHandle
SevereCloud added a commit that referenced this pull request Jun 26, 2024
- see #6920

---

## Описание

Линтер компилятора ругается на внутренности хука useEventListener

## Изменение

Избавился от хуков, написал отдельный класс реализующий EventListenerHandle
SevereCloud added a commit that referenced this pull request Jun 26, 2024
- see #6920

---

Линтер компилятора ругается на внутренности хука useEventListener

Избавился от хуков, написал отдельный класс реализующий EventListenerHandle
SevereCloud added a commit that referenced this pull request Jun 26, 2024
- see #6920

---

## Описание

Линтер компилятора ругается на мутации внутри Textarea, WriteBar

> Mutating a value returned from a function whose return value should not be mutated

## Изменение

Вынес общий хук useResizeTextarea
SevereCloud added a commit that referenced this pull request Jun 26, 2024
- see #6920

---

## Описание

Линтер компилятора ругается на мутации внутри Textarea, WriteBar

> Mutating a value returned from a function whose return value should not be mutated

## Изменение

Вынес общий хук useResizeTextarea
@SevereCloud SevereCloud force-pushed the feat/add-eslint-plugin-react-compiler branch from 2483190 to f9fce01 Compare June 28, 2024 11:18
SevereCloud added a commit that referenced this pull request Jul 9, 2024
- see #6920

---

Линтер компилятора ругается на внутренности хука useEventListener

Избавился от хуков, написал отдельный класс реализующий EventListenerHandle
SevereCloud added a commit that referenced this pull request Jul 9, 2024
- see #6920

---

## Описание

Для компилятора требуется знать точные зависимости в useMemo

## Изменение

Избавился от useMemo, написал отдельный класс реализующий MutableRefObject
@SevereCloud SevereCloud force-pushed the feat/add-eslint-plugin-react-compiler branch from f9fce01 to 70e67e6 Compare July 9, 2024 11:08
SevereCloud added a commit that referenced this pull request Jul 9, 2024
- see #6920

---

Выносим проверки в деве, чтобы не нарушать правило хуков
SevereCloud added a commit that referenced this pull request Jul 9, 2024
- see #6920

---

Выносим проверки в деве, чтобы не нарушать правило хуков
SevereCloud added a commit that referenced this pull request Jul 9, 2024
- see #6920

---

Выносим проверки в деве, чтобы не нарушать правило хуков
@SevereCloud SevereCloud force-pushed the feat/add-eslint-plugin-react-compiler branch from 70e67e6 to 34ca9d8 Compare July 9, 2024 14:12
SevereCloud added a commit that referenced this pull request Jul 9, 2024
- see #6920

---

> Mutating a value returned from a function whose return value should not be mutated

Скрываем мутацию от компилятора
SevereCloud added a commit that referenced this pull request Jul 9, 2024
- see #6920

---

> This mutates a variable that React considers immutable

Компилятор ругается на мутацию afterTransition
SevereCloud added a commit that referenced this pull request Jul 10, 2024
- see #6920

---

> Mutating a value returned from a function whose return value should not be mutated

Скрываем мутацию от компилятора
vkcom-publisher pushed a commit that referenced this pull request Jul 10, 2024
SevereCloud added a commit that referenced this pull request Jul 10, 2024
- see #6920

---

Выносим проверки в деве, чтобы не нарушать правило хуков
SevereCloud added a commit that referenced this pull request Jul 15, 2024
- see #6920

---

> This mutates a variable that React considers immutable

Компилятор ругается на мутацию afterTransition

* refactor: call to add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-stale Добавляет PR в исключения для автоматического закрытия
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant