Skip to content

Commit

Permalink
[#43] ๐Ÿ“ Update readme for eslint 9 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
yongholeeme committed Nov 25, 2024
1 parent 4e917c4 commit 5819259
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions packages/eslint-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,22 @@ npm install @naverpay/eslint-plugin -D

## ์‚ฌ์šฉ ๋ฐฉ๋ฒ•

์‚ฌ์šฉํ•˜๊ณ  ์‹ถ์€ plugin์ด ์žˆ๋‹ค๋ฉด eslint config ํŒŒ์ผ์—์„œ `@naverpay/eslint-plugin`์„ `plugins`์— ์ถ”๊ฐ€ํ•˜์„ธ์š”.

```jsonc
// .eslintrc
{
"plugins": ["@naverpay/eslint-plugin"]
}
```

์‚ฌ์šฉํ•˜๊ณ  ์‹ถ์€ plugin์€ rules์— ์ ์šฉํ•ด์ฃผ์„ธ์š”.

```jsonc
// .eslintrc
{
"rules": {
"@naverpay/prevent-default-import": ["error", {"packages": ["react"]}],
}
}
์‚ฌ์šฉํ•˜๊ณ  ์‹ถ์€ plugin์ด ์žˆ๋‹ค๋ฉด `eslint.config.js`์— `@naverpay/eslint-plugin`์„ ์ถ”๊ฐ€ํ•˜์„ธ์š”.

```js
// eslint.config.js
import naverpay from "@naverpay/eslint-plugin";

export default [
{
plugins: {
naverpay
},
rules: {
"naverpay/prevent-default-import": ["error", {"packages": ["react"]}]
}
}
];
```

## ๊ทœ์น™
Expand Down

0 comments on commit 5819259

Please sign in to comment.