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: upgrade eslint configuration #897

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open

Conversation

achou11
Copy link
Member

@achou11 achou11 commented Dec 18, 2024

  • Upgrades eslint to v9 and install other necessary eslint modules for writing the configuration
  • Upgrades other eslint plugins to latest compatible versions
  • Removes rules related to React Native (via @react-native/eslint-config) due to compat issues with the typescript eslint plugin it uses internally.
  • applies very trivial fixes that could be automated by the eslint check (i.e. with its --fix) flag.
  • updates the relevant npm script
  • introduces more granular application of rules based on kind of file or directory (e.g. separate rules for backend vs frontend, rules specific for tooling files)

Remaining items (can be done as follow-ups):

  • decide whether or not not having rules specific to React Native for now is a blocker. Can spend some time attempting to get it working but would be okay with doing as a follow-up.

  • adjust the react configuration to omit non-applicable rules (e.g. no need for dom)

@awana-lockfile-bot
Copy link

awana-lockfile-bot bot commented Jan 21, 2025

package-lock.json changes

Summary

Status Count
ADDED 45
UPDATED 57
REMOVED 32
Click to toggle table visibility
Name Status Previous Current
@babel/eslint-parser REMOVED 7.22.11 -
@eslint-community/regexpp UPDATED 4.7.0 4.12.1
@eslint-react/ast ADDED - 1.24.1
@eslint-react/core ADDED - 1.24.1
@eslint-react/eff ADDED - 1.24.1
@eslint-react/eslint-plugin ADDED - 1.24.1
@eslint-react/jsx ADDED - 1.24.1
@eslint-react/shared ADDED - 1.24.1
@eslint-react/var ADDED - 1.24.1
@eslint/compat ADDED - 1.2.5
@eslint/config-array ADDED - 0.19.1
@eslint/core ADDED - 0.10.0
@eslint/eslintrc UPDATED 2.1.2 3.2.0
@eslint/js UPDATED 8.47.0 9.18.0
@eslint/object-schema ADDED - 2.1.5
@eslint/plugin-kit ADDED - 0.2.5
@humanfs/core ADDED - 0.19.1
@humanfs/node ADDED - 0.16.6
@humanwhocodes/config-array REMOVED 0.11.10 -
@humanwhocodes/object-schema REMOVED 1.2.1 -
@humanwhocodes/retry ADDED - 0.4.1
@nicolo-ribaudo/eslint-scope-5-internals REMOVED 5.1.1-v1 -
@react-native/eslint-config REMOVED 0.73.2 -
@react-native/eslint-plugin REMOVED 0.73.1 -
@tanstack/eslint-plugin-query UPDATED 5.51.15 5.62.1
@types/estree ADDED - 1.0.6
@types/json-schema UPDATED 7.0.11 7.0.15
@typescript-eslint/eslint-plugin UPDATED 5.62.0 8.21.0
@typescript-eslint/parser UPDATED 5.62.0 8.21.0
@typescript-eslint/scope-manager UPDATED 5.62.0 8.21.0
@typescript-eslint/type-utils UPDATED 5.62.0 8.21.0
@typescript-eslint/types UPDATED 5.62.0 8.21.0
@typescript-eslint/typescript-estree UPDATED 5.62.0 8.21.0
@typescript-eslint/utils UPDATED 5.62.0 8.21.0
@typescript-eslint/visitor-keys UPDATED 5.62.0 8.21.0
acorn UPDATED 8.12.1 8.14.0
array-includes REMOVED 3.1.5 -
array.prototype.flatmap REMOVED 1.3.0 -
arraybuffer.prototype.slice UPDATED 1.0.3 1.0.4
birecord ADDED - 0.1.1
call-bind-apply-helpers ADDED - 1.0.1
call-bind UPDATED 1.0.7 1.0.8
call-bound ADDED - 1.0.3
compare-versions ADDED - 6.1.1
cross-spawn UPDATED 7.0.3 7.0.6
doctrine REMOVED 3.0.0 -
dunder-proto ADDED - 1.0.1
es-abstract UPDATED 1.23.3 1.23.6
es-define-property UPDATED 1.0.0 1.0.1
es-shim-unscopables REMOVED 1.0.0 -
es-to-primitive UPDATED 1.2.1 1.3.0
eslint-config-prettier REMOVED 9.1.0 -
eslint-plugin-eslint-comments REMOVED 3.2.0 -
eslint-plugin-ft-flow REMOVED 2.0.3 -
eslint-plugin-jest REMOVED 26.9.0 -
eslint-plugin-prettier REMOVED 4.2.1 -
eslint-plugin-react-debug ADDED - 1.24.1
eslint-plugin-react-dom ADDED - 1.24.1
eslint-plugin-react-hooks-extra ADDED - 1.24.1
eslint-plugin-react-hooks REMOVED 4.6.2 -
eslint-plugin-react-naming-convention ADDED - 1.24.1
eslint-plugin-react-native-globals REMOVED 0.1.2 -
eslint-plugin-react-native REMOVED 4.0.0 -
eslint-plugin-react-web-api ADDED - 1.24.1
eslint-plugin-react-x ADDED - 1.24.1
eslint-plugin-react REMOVED 7.31.10 -
eslint-scope REMOVED 5.1.1 -
eslint-visitor-keys UPDATED 2.1.0 4.2.0
eslint UPDATED 8.47.0 9.18.0
espree UPDATED 9.6.1 10.3.0
fast-diff REMOVED 1.3.0 -
file-entry-cache UPDATED 6.0.1 8.0.0
flat-cache UPDATED 3.0.4 4.0.1
flatted UPDATED 3.2.7 3.3.2
function.prototype.name UPDATED 1.1.6 1.1.7
get-intrinsic UPDATED 1.2.4 1.2.6
globals UPDATED 11.12.0 15.14.0
globalthis UPDATED 1.0.3 1.0.4
gopd UPDATED 1.0.1 1.2.0
has-proto UPDATED 1.0.3 1.2.0
has-symbols UPDATED 1.0.3 1.1.0
has REMOVED 1.0.3 -
internal-slot UPDATED 1.0.7 1.1.0
is-array-buffer UPDATED 3.0.4 3.0.5
is-async-function ADDED - 2.0.0
is-bigint UPDATED 1.0.4 1.1.0
is-boolean-object UPDATED 1.1.2 1.2.1
is-data-view UPDATED 1.0.1 1.0.2
is-date-object UPDATED 1.0.5 1.1.0
is-finalizationregistry ADDED - 1.1.1
is-immutable-type ADDED - 5.0.1
is-map ADDED - 2.0.3
is-number-object UPDATED 1.0.7 1.1.1
is-regex UPDATED 1.1.4 1.2.1
is-set ADDED - 2.0.3
is-shared-array-buffer UPDATED 1.0.3 1.0.4
is-string UPDATED 1.0.7 1.1.1
is-symbol UPDATED 1.0.4 1.1.1
is-weakmap ADDED - 2.0.2
is-weakref UPDATED 1.0.2 1.1.0
is-weakset ADDED - 2.0.4
jsx-ast-utils REMOVED 3.3.3 -
math-intrinsics ADDED - 1.0.0
natural-compare-lite REMOVED 1.4.0 -
object-inspect UPDATED 1.13.1 1.13.3
object.entries REMOVED 1.1.5 -
object.fromentries REMOVED 2.0.5 -
object.hasown REMOVED 1.1.1 -
object.values REMOVED 1.1.5 -
prettier-linter-helpers REMOVED 1.0.0 -
reflect.getprototypeof ADDED - 1.0.9
regexp.prototype.flags UPDATED 1.5.2 1.5.3
safe-array-concat UPDATED 1.1.2 1.1.3
safe-regex-test UPDATED 1.0.3 1.1.0
side-channel-list ADDED - 1.0.0
side-channel-map ADDED - 1.0.1
side-channel-weakmap ADDED - 1.0.2
side-channel UPDATED 1.0.4 1.1.0
string-natural-compare REMOVED 3.0.1 -
string-ts ADDED - 2.2.0
string.prototype.matchall REMOVED 4.0.7 -
string.prototype.trim UPDATED 1.2.9 1.2.10
string.prototype.trimend UPDATED 1.0.8 1.0.9
ts-api-utils UPDATED 1.3.0 2.0.0
ts-declaration-location ADDED - 1.0.5
ts-pattern ADDED - 5.6.2
tsutils REMOVED 3.21.0 -
typed-array-byte-offset UPDATED 1.0.2 1.0.3
typed-array-length UPDATED 1.0.6 1.0.7
typescript-eslint ADDED - 8.21.0
which-boxed-primitive UPDATED 1.0.2 1.1.1
which-builtin-type ADDED - 1.2.1
which-collection ADDED - 1.0.2
which-typed-array UPDATED 1.1.15 1.1.18

@achou11 achou11 changed the title WIP: chore: upgrade eslint configuration chore: upgrade eslint configuration Jan 21, 2025
@achou11 achou11 marked this pull request as ready for review January 21, 2025 22:41
eslint.config.mjs Outdated Show resolved Hide resolved
@@ -164,7 +167,8 @@
"rimraf": "5.0.5",
"semver": "7.6.0",
"type-fest": "4.26.0",
"typescript": "5.3.3"
"typescript": "5.3.3",
Copy link
Member Author

Choose a reason for hiding this comment

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

ideally we'd try to update TypeScript here but not strictly necessary to. Open to doing though.

Copy link
Member Author

Choose a reason for hiding this comment

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

ESLint autofix

Copy link
Member Author

Choose a reason for hiding this comment

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

ESLint autofix

Copy link
Member Author

Choose a reason for hiding this comment

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

ESLint autofix

Copy link
Member Author

Choose a reason for hiding this comment

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

ESLint autofix

@achou11 achou11 requested a review from ErikSin January 21, 2025 23:08
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.

1 participant