-
Notifications
You must be signed in to change notification settings - Fork 1
Migrate eslintrc to flat config #123
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
418ac64
chore: upgrade eslint to 9
froggy1014 fe60880
chore: update vscode settings
froggy1014 7d7dc7b
chore: change eslint config extension, update sorting rule
froggy1014 70c7a22
chore(eslint): update linting script
froggy1014 bf197db
chore: update feedback
froggy1014 ae924fb
chore: resolve error and update feedback
froggy1014 4e1b75c
Merge branch 'develop' into chore/update-eslint-9
froggy1014 f560e51
chore: rename yarn environment variable
froggy1014 06eaa76
chore: set environment to yarn config directly
froggy1014 6540728
ci: replace token to PAT
froggy1014 24c567b
chore: editor setup for yarn
froggy1014 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| yarn lint-staged |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+72.6 KB
.yarn/cache/@eslint-community-regexpp-npm-4.12.1-ef4ab5217e-c08f1dd7dd.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+77.6 KB
.yarn/cache/@eslint-config-array-npm-0.19.2-9310e910a9-a680972090.zip
Binary file not shown.
Binary file added
BIN
+18.4 KB
.yarn/cache/@eslint-config-helpers-npm-0.2.0-80a02b1fb1-be54f7dfb3.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+17.9 KB
.yarn/cache/@eslint-object-schema-npm-2.1.6-a777ee59e8-266085c8d3.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-16.4 KB
.yarn/cache/@humanwhocodes-config-array-npm-0.11.14-94a02fcc87-3ffb24ecdf.zip
Binary file not shown.
Binary file removed
BIN
-8.53 KB
.yarn/cache/@humanwhocodes-object-schema-npm-2.0.3-4f0e508cd9-05bb99ed06.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-30.9 KB
.yarn/cache/@next-eslint-plugin-next-npm-14.2.11-e583614aa6-839c5ba690.zip
Binary file not shown.
Binary file added
BIN
+31.8 KB
.yarn/cache/@next-eslint-plugin-next-npm-15.2.4-7764a6d402-366590ea51.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+815 KB
.yarn/cache/@typescript-eslint-eslint-plugin-npm-8.28.0-16bd93a9cb-cd83f6c522.zip
Binary file not shown.
Binary file added
BIN
+7.39 KB
.yarn/cache/@typescript-eslint-parser-npm-8.28.0-3e5cf59c3a-34d6144748.zip
Binary file not shown.
Binary file added
BIN
+260 KB
.yarn/cache/@typescript-eslint-scope-manager-npm-8.28.0-64219db177-5100ea7e29.zip
Binary file not shown.
Binary file added
BIN
+47.5 KB
.yarn/cache/@typescript-eslint-type-utils-npm-8.28.0-880209d847-a915f76753.zip
Binary file not shown.
Binary file added
BIN
+32 KB
.yarn/cache/@typescript-eslint-types-npm-8.28.0-648d0ea17f-83938402e4.zip
Binary file not shown.
Binary file added
BIN
+138 KB
.yarn/cache/@typescript-eslint-typescript-estree-npm-8.28.0-d19a78207c-277639fe80.zip
Binary file not shown.
Binary file added
BIN
+100 KB
.yarn/cache/@typescript-eslint-utils-npm-8.28.0-d61217bfde-a5b318b184.zip
Binary file not shown.
Binary file added
BIN
+7.84 KB
.yarn/cache/@typescript-eslint-visitor-keys-npm-8.28.0-54d3bc097e-df159834ab.zip
Binary file not shown.
Binary file removed
BIN
-13.9 KB
.yarn/cache/@ungap-structured-clone-npm-1.2.0-648f0b82e0-c6fe89a505.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+7.39 KB
.yarn/cache/array-buffer-byte-length-npm-1.0.2-c2be1e97e0-0ae3786195.zip
Binary file not shown.
Binary file removed
BIN
-11.3 KB
.yarn/cache/array.prototype.flatmap-npm-1.3.2-5c6a4af226-33f2000668.zip
Binary file not shown.
Binary file added
BIN
+11.8 KB
.yarn/cache/array.prototype.flatmap-npm-1.3.3-db3afdbfda-473534573a.zip
Binary file not shown.
Binary file added
BIN
+11.5 KB
.yarn/cache/arraybuffer.prototype.slice-npm-1.0.4-01f62a9713-4821ebdfe7.zip
Binary file not shown.
Binary file added
BIN
+10.7 KB
.yarn/cache/call-bind-apply-helpers-npm-1.0.2-3eedbea3bb-00482c1f6a.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+7.36 KB
.yarn/cache/data-view-byte-length-npm-1.0.2-96d312fb9c-2a47055fcf.zip
Binary file not shown.
Binary file added
BIN
+7.27 KB
.yarn/cache/data-view-byte-offset-npm-1.0.1-315a12a556-fa3bdfa096.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-76.6 KB
.yarn/cache/es-iterator-helpers-npm-1.0.19-5a0b930ca7-980a8081cf.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-32.6 KB
.yarn/cache/eslint-plugin-react-hooks-npm-4.6.2-05bc129286-5a0680941f.zip
Binary file not shown.
Binary file added
BIN
+56.6 KB
.yarn/cache/eslint-plugin-react-hooks-npm-5.2.0-1c4af50caf-ebb79e9cf6.zip
Binary file not shown.
Binary file removed
BIN
-241 KB
.yarn/cache/eslint-plugin-react-npm-7.35.0-ce51a7759c-fa0a54f9ea.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+14.2 KB
.yarn/cache/function.prototype.name-npm-1.1.8-2cf198aac8-25b9e5bea9.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+9.43 KB
.yarn/cache/get-symbol-description-npm-1.1.0-7a9e0b1c24-a353e3a959.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-7.2 KB
.yarn/cache/is-finalizationregistry-npm-1.0.2-15bf1bd7ce-1b8e9e1bf2.zip
Binary file not shown.
Binary file added
BIN
+8.73 KB
.yarn/cache/is-finalizationregistry-npm-1.1.1-f9cad6c9aa-0bfb145e9a.zip
Binary file not shown.
Binary file added
BIN
+3.5 KB
.yarn/cache/is-fullwidth-code-point-npm-4.0.0-848488b60d-8ae89bf505.zip
Binary file not shown.
Binary file added
BIN
+2.85 KB
.yarn/cache/is-fullwidth-code-point-npm-5.0.0-5eb90c2a6e-8dfb2d2831.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+8.71 KB
.yarn/cache/is-shared-array-buffer-npm-1.0.4-70c977585b-0380d7c60c.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+11.1 KB
.yarn/cache/reflect.getprototypeof-npm-1.0.10-8c3ce862a2-80a4e2be71.zip
Binary file not shown.
Binary file removed
BIN
-10.6 KB
.yarn/cache/reflect.getprototypeof-npm-1.0.6-b33819c756-518f6457e4.zip
Binary file not shown.
Binary file added
BIN
+17.8 KB
.yarn/cache/regexp.prototype.flags-npm-1.5.4-39008ab64c-8ab897ca44.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-16 KB
.yarn/cache/string.prototype.matchall-npm-4.0.11-a18d0665a1-a902ff4500.zip
Binary file not shown.
Binary file added
BIN
+16.4 KB
.yarn/cache/string.prototype.matchall-npm-4.0.12-0bc859367d-e4ab34b9e7.zip
Binary file not shown.
Binary file added
BIN
+14.9 KB
.yarn/cache/string.prototype.trim-npm-1.2.10-40a44bc719-47bb63cd24.zip
Binary file not shown.
Binary file added
BIN
+11.9 KB
.yarn/cache/string.prototype.trimend-npm-1.0.9-e8729528fb-140c73899b.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+8.88 KB
.yarn/cache/typed-array-byte-length-npm-1.0.3-0769937080-269dad101d.zip
Binary file not shown.
Binary file added
BIN
+9.2 KB
.yarn/cache/typed-array-byte-offset-npm-1.0.4-12f60e4553-c2869aa584.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+9.29 KB
.yarn/cache/which-boxed-primitive-npm-1.1.1-80ca20c912-a877c0667b.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| import eslint from '@eslint/js'; | ||
| import nextPlugin from '@next/eslint-plugin-next'; | ||
| import reactPlugin from 'eslint-plugin-react'; | ||
| import hooksPlugin from 'eslint-plugin-react-hooks'; | ||
| import simpleImportSort from 'eslint-plugin-simple-import-sort'; | ||
| import unusedImports from 'eslint-plugin-unused-imports'; | ||
| import globals from 'globals'; | ||
| import tseslint from 'typescript-eslint'; | ||
| import prettier from 'eslint-plugin-prettier/recommended'; | ||
|
|
||
| export default tseslint.config( | ||
| // * Base ESLint recommended configuration | ||
| // * TypeScript ESLint recommended configuration | ||
| eslint.configs.recommended, | ||
| tseslint.configs.recommended, | ||
| { | ||
| rules: { | ||
| '@typescript-eslint/no-unused-vars': 'off', | ||
| }, | ||
| }, | ||
|
|
||
| // * Prettier configuration | ||
| prettier, | ||
|
|
||
| // * Unused imports configuration | ||
| // * Simple import sort configuration | ||
| { | ||
| plugins: { | ||
| 'unused-imports': unusedImports, | ||
| 'simple-import-sort': simpleImportSort, | ||
| }, | ||
| rules: { | ||
| 'unused-imports/no-unused-imports': 'error', | ||
| 'unused-imports/no-unused-vars': [ | ||
| 'warn', | ||
| { | ||
| vars: 'all', | ||
| varsIgnorePattern: '^_', | ||
| args: 'after-used', | ||
| argsIgnorePattern: '^_', | ||
| }, | ||
| ], | ||
| 'simple-import-sort/imports': [ | ||
| 'error', | ||
| { | ||
| groups: [ | ||
| ['^\\u0000'], | ||
| [ | ||
| '^(assert|buffer|child_process|cluster|console|constants|crypto|dgram|dns|domain|events|fs|http|https|module|net|os|path|punycode|querystring|readline|repl|stream|string_decoder|sys|timers|tls|tty|url|util|vm|zlib|freelist|v8|process|async_hooks|http2|perf_hooks)(/.*|$)', | ||
| ], | ||
| ['^react'], | ||
| ['^next'], | ||
| ['^@?\\w'], | ||
| ['^(@|libs|components|utils|hooks|db)(/.*|$)'], | ||
| ['^\\.\\.(?!/?$)', '^\\.\\./?$'], | ||
| ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'], | ||
| ['^.+\\.svg$'], | ||
| ['^.+\\.module.s?css$'], | ||
| ], | ||
| }, | ||
| ], | ||
| 'simple-import-sort/exports': 'error', | ||
| }, | ||
| }, | ||
|
|
||
| // * Next.js configuration | ||
| { | ||
| plugins: { | ||
| '@next/next': nextPlugin, | ||
| }, | ||
| rules: { | ||
| ...nextPlugin.configs.recommended.rules, | ||
| ...nextPlugin.configs['core-web-vitals'].rules, | ||
| '@next/next/no-img-element': 'error', | ||
| }, | ||
| }, | ||
|
|
||
| // * React configuration | ||
| // * React Hooks configuration | ||
| { | ||
| files: ['**/*.{ts,tsx}'], | ||
| plugins: { | ||
| react: reactPlugin, | ||
| 'react-hooks': hooksPlugin, | ||
| }, | ||
| languageOptions: { | ||
| globals: { | ||
| ...globals.serviceworker, | ||
| ...globals.browser, | ||
| }, | ||
| }, | ||
froggy1014 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| rules: { | ||
| ...reactPlugin.configs.recommended.rules, | ||
| ...reactPlugin.configs['jsx-runtime'].rules, | ||
| ...hooksPlugin.configs['recommended-latest'].rules, | ||
| }, | ||
| settings: { | ||
| react: { | ||
| version: 'detect', | ||
| }, | ||
| }, | ||
| }, | ||
froggy1014 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| // Ignore files configuration | ||
| { | ||
| ignores: ['**/*/dist/', '**/node_modules/', '*.config.*', '.next', '.yarn'], | ||
| }, | ||
froggy1014 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.