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: migrate to ESLint flat config #2622

Merged
merged 12 commits into from
Dec 16, 2023
Merged

chore: migrate to ESLint flat config #2622

merged 12 commits into from
Dec 16, 2023

Conversation

MuhammadM1998
Copy link
Contributor

@MuhammadM1998 MuhammadM1998 commented Dec 15, 2023

πŸ”— Linked issue

#2607

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This migrates the repo to use the new ESLint Flat Config which is the default starting from v9.
My testing to see if this works is basically running the lint command and expecting the same output.

Remarks:

  • env is deprecated in Flat config, using globals is the (recommended way)[https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options]

  • Used the official FlatCompat utility to migrate ts-plugin (as recommended by this comment)[https://github.com/ESLint Flat Config SupportΒ typescript-eslint/typescript-eslint#7694#issuecomment-1854655034]. When it's officially migrated, it'll be a simple replace.

  • I've added comments on top of each section but this isn't necessary as you can mix anything in flat configs. I've used them to clarify the steps only. Feel free to remove them.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link
Collaborator

@kazupon kazupon left a comment

Choose a reason for hiding this comment

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

Welcome your first contribution at nuxt i18n!
Thank you so much!

Your contribution is perfrect! πŸ’―

@kazupon kazupon merged commit d93ea6f into nuxt-modules:main Dec 16, 2023
8 checks passed
@MuhammadM1998 MuhammadM1998 deleted the feat/eslint-flat-config branch December 16, 2023 16:02
@kazupon kazupon mentioned this pull request Dec 21, 2023
4 tasks
DarthGigi pushed a commit to DarthGigi/i18n that referenced this pull request Apr 16, 2024
* chore: migrate globals

-- `root: true` is not needed in flat config

* chore: migrate extends

* chore: migrate TS plugin

* chore: migrate TS parser

* chore: remove eslintrc

* chore: migrate eslint.ignore

* chore: migrate files extensions

* fix: move globals & parserOptions to languageOptions

* fix: use `FlatCompat` utility to extend  plugins correctly

* fix: move ignores to top

* fix: remove deprecated `--ext` flag from commands

* chore: format
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