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

chore(eslint): migrate .eslintrc to eslint.config.js #2872

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

sukvvon
Copy link
Contributor

@sukvvon sukvvon commented Dec 18, 2024

Summary

  • mirgate legacy .eslintrc style to eslint.config.js

ref: pmndrs/zustand#2912

Check List

  • pnpm run prettier for formatting code and docs

Copy link

vercel bot commented Dec 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
jotai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 20, 2024 0:50am

Copy link

codesandbox-ci bot commented Dec 18, 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

pkg-pr-new bot commented Dec 18, 2024

Open in Stackblitz

More templates

npm i https://pkg.pr.new/jotai@2872

commit: fc57432

Copy link

github-actions bot commented Dec 18, 2024

LiveCodes Preview in LiveCodes

Latest commit: fc57432
Last updated: Dec 20, 2024 12:49am (UTC)

Playground Link
React demo https://livecodes.io?x=id/AQD2M2XLK

See documentations for usage instructions.

@sukvvon
Copy link
Contributor Author

sukvvon commented Dec 18, 2024

before

image

after

image

@dai-shi to prevent warning i add @typescript-eslint/no-unused-vars: 'off'

@dai-shi
Copy link
Member

dai-shi commented Dec 18, 2024

to prevent warning i add @typescript-eslint/no-unused-vars: 'off'

Please keep the rule and add _ prefix.

@sukvvon
Copy link
Contributor Author

sukvvon commented Dec 18, 2024

to prevent warning i add @typescript-eslint/no-unused-vars: 'off'

Please keep the rule and add _ prefix.

@dai-shi could you explain about _ prefix?

@dai-shi
Copy link
Member

dai-shi commented Dec 18, 2024

For unused vars, we have a rule to exclude ^_ pattern, both for eslint and tsc.

"files": ["tests/**/*.ts", "tests/**/*.tsx"],
"rules": {
"import/extensions": ["error", "never"],
"@typescript-eslint/no-unused-vars": "off",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see. We already have it here. Never mind then.

@dai-shi
Copy link
Member

dai-shi commented Dec 18, 2024

to prevent warning i add @typescript-eslint/no-unused-vars: 'off'

So, it's not you who added it. It was there and you just migrated it.

@sukvvon
Copy link
Contributor Author

sukvvon commented Dec 18, 2024

to prevent warning i add @typescript-eslint/no-unused-vars: 'off'

So, it's not you who added it. It was there and you just migrated it.

@dai-shi i think i forgot, it's my bad 😂

@sukvvon
Copy link
Contributor Author

sukvvon commented Dec 18, 2024

For unused vars, we have a rule to exclude ^_ pattern, both for eslint and tsc.

@dai-shi right, i already migrated it too

@sukvvon
Copy link
Contributor Author

sukvvon commented Dec 18, 2024

@dai-shi Is there anything I might have missed? 🤔

@dai-shi
Copy link
Member

dai-shi commented Dec 18, 2024

Just busy. Would you like to join my discord server? https://discord.gg/MrQdmzd

@sukvvon
Copy link
Contributor Author

sukvvon commented Dec 18, 2024

Just busy. Would you like to join my discord server? https://discord.gg/MrQdmzd

Sure, I joined!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants