-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Add eslint #195
Add eslint #195
Conversation
// @license MIT | ||
// @version 6.9.3 | ||
// @description Enhances the Steam Inventory and Steam Market. | ||
// @match https://steamcommunity.com/id/*/inventory* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed @include
to @match
as the userscripts lint suggested that for manifest v3.
|
||
/* disable some eslint rules until the code is cleaned up */ | ||
/* global unsafeWindow, luxon, jQuery, async, localforage */ | ||
/* eslint no-undef: off, no-unused-vars: off */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These rules are disabled since the code needs some cleanup to fix them.
@@ -2209,8 +2212,8 @@ | |||
var arr = []; | |||
|
|||
for (var child in getActiveInventory().m_rgChildInventories) { | |||
for (var key in getActiveInventory().m_rgChildInventories[child].m_rgAssets) { | |||
var value = getActiveInventory().m_rgChildInventories[child].m_rgAssets[key]; | |||
for (const key in getActiveInventory().m_rgChildInventories[child].m_rgAssets) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vars changed to const/let to reduce scope because they were redefining these.
Thanks for the PRs @xPaw. This now has a conflict, I think because of the match changes. |
@Nuklon i've fixed that and opened a few more prs 😄 |
Only basic config for now, more rules can be enabled in the future. I also added a CI job to run this.