# Show GN: 드 모건의 법칙을 통해 부정 부울 표현식을 변환하는 ESLint 플러그인

> Clean Markdown view of GeekNews topic #19161. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=19161](https://news.hada.io/topic?id=19161)
- GeekNews Markdown: [https://news.hada.io/topic/19161.md](https://news.hada.io/topic/19161.md)
- Type: show
- Author: [azatio](https://news.hada.io/@azatio)
- Published: 2025-02-11T03:45:56+09:00
- Updated: 2025-02-11T03:45:56+09:00
- Original source: [github.com/azat-io](https://github.com/azat-io/eslint-plugin-de-morgan)
- Points: 3
- Comments: 2

## Topic Body

ESLint 플러그인 드 모건 출시.  
  
자바스크립트 코드의 논리 표현식을 더 간단하고 이해하기 쉽게 변환하는 플러그인입니다.  
  
이것에서:  
  
!(a && !b && c <= d)  
  
이렇게  
  
!a || b || c > d

## Comments



### Comment 34409

- Author: kayws426
- Created: 2025-02-11T13:23:00+09:00
- Points: 1

조건식은 읽고 이해하기 쉽게 쓰는게 맞지 않나 생각합니다.

### Comment 34391

- Author: haenah
- Created: 2025-02-11T09:46:53+09:00
- Points: 1

좋네요! 두 AST 간에 어떤 게 좋은지는 어떻게 비교하고 있나요?  
예를 들어 서로 동치인 `(!a || !b || !c)` 와 `!(a && b && c)` 를 AST depth로 비교했을 때는 전자가 더 유리한데, leaf의 개수로는 후자가 더 유리합니다. 저라면 연산이 더 적어지는 후자의 방향으로 변환하고 싶을 것 같아요.  
optimization preference가 depth인지, leaf의 개수인지에 따라 다르게 변환하는 옵션이 있다면 좋을 것 같습니다.
