-
-
Notifications
You must be signed in to change notification settings - Fork 143
v4 #230
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
Draft
DoctorMcKay
wants to merge
75
commits into
master
Choose a base branch
from
v4
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
v4 #230
Changes from all commits
Commits
Show all changes
75 commits
Select commit
Hold shift + click to select a range
80dbf9d
Start v4
DoctorMcKay 729f078
Removed deprecated confirmation checker
DoctorMcKay 5a85531
Removed inventoryhistory.js
DoctorMcKay f99d86a
Removed async dependency
DoctorMcKay 103e941
Updated dependencies
DoctorMcKay 0cb0d22
Cleaned up imports
DoctorMcKay 8a7d6f5
Merge branch 'master' into v4
DoctorMcKay 6b0f958
Merge branch 'master' into v4
DoctorMcKay 8e9e372
Code cleanup for chat.js
DoctorMcKay ac8e4a6
Code cleanup for confirmations.js
DoctorMcKay d7cfc39
Code cleanup for groups.js
DoctorMcKay 30ebf33
Code cleanup for helpers.js
DoctorMcKay fa25392
Code cleanup for http.js
DoctorMcKay dfd0ccb
Merge branch 'master' into v4
DoctorMcKay 247d804
Cleaned up market.js
DoctorMcKay c550b38
Cleaned up profile.js
DoctorMcKay 9a4be45
Cleaned up twofactor.js
DoctorMcKay c69a545
Cleaned up webapi.js
DoctorMcKay d093466
Removed getWebApiOauthToken
DoctorMcKay 8ffa0b5
Cleaned up help.js
DoctorMcKay 2b678be
Some more cleanup
DoctorMcKay 63b0b82
Cleaned up users.js
DoctorMcKay 5b40683
Merge branch 'master' into v4
DoctorMcKay 2adc23f
Added eslint config
DoctorMcKay 4c59309
Refactor index.js
DoctorMcKay 600a411
Refactor all files
DoctorMcKay 9ec3295
Added eslint action
DoctorMcKay 8c0994c
Fixed eslint action
DoctorMcKay ca887c4
Use npx for eslint
DoctorMcKay 59df4de
eslint requires node 10
DoctorMcKay a4de664
Disable eslint on generated files
DoctorMcKay e252efc
Change all eslint rules to errors so they'll hit on CI
DoctorMcKay 40ee35a
Fixed last eslint error
DoctorMcKay 9d47d28
Some more refactoring
DoctorMcKay 89d058f
Update EResult.js
DoctorMcKay 605fb62
Skip eslint workflow for internal pull requests
DoctorMcKay 3def387
Updated @doctormckay/stdlib
DoctorMcKay 485529e
Use npm run lint in workflow
DoctorMcKay dfda22c
Rename ConfirmationType to EConfirmationType for consistency
DoctorMcKay e9d3221
Start replacing request with got
DoctorMcKay ac19e08
Start adding callback promises
DoctorMcKay 7c6e531
Added rationale for not using eqeqeq
DoctorMcKay 565132d
Enforce dot-notation
DoctorMcKay e49c5c1
Fix dot-notation violation
DoctorMcKay e2ef03c
Disallow spaces before anonymous/named function parens
DoctorMcKay fd5ed31
Ignore unused vars starting with underscore
DoctorMcKay c7a8c67
Simplify isSteamID
DoctorMcKay d09f18f
Compare against PrivacyState rather than using a magic number
DoctorMcKay ad09560
Clean up comment parsing code a little
DoctorMcKay 48f0637
Use steamid@2.0.0
DoctorMcKay 43c0504
Require node 12 or later
DoctorMcKay 7ebbd58
Merge branch 'master' into v4
DoctorMcKay b98997a
Merge branch 'master' into v4
DoctorMcKay d28c2cd
Require node 14
DoctorMcKay 9218ec6
Use stdlib 2.1.0
DoctorMcKay 711ab8a
Update stdlib version
DoctorMcKay 86e87e8
Merge branch 'master' into v4
DoctorMcKay f776d9f
Removed getWebApiOauthToken
DoctorMcKay 2bfaecd
Removed oAuthLogin method
DoctorMcKay b48e8fa
Promote steam-session to a full dependency
DoctorMcKay 2094f05
Update xml2js dependency
DoctorMcKay 078e395
Remove got dependency
DoctorMcKay ccf16b6
Updated httpRequest to use StdLib HttpClient
DoctorMcKay 0ba889e
Fixed merge conflict remnant
DoctorMcKay 028ee43
Updated index.js methods to use new http interface
DoctorMcKay c1901d5
Updated confirmations.js methods to use new http interface
DoctorMcKay e9bc778
Removed request dependency
DoctorMcKay 96e3e7e
Updated help.js methods to use new http interface
DoctorMcKay 3a65768
Updated sharedfiles.js methods to use new http interface
DoctorMcKay e65d50b
Updated twofactor.js methods to use new http interface
DoctorMcKay 38d3fb3
Updated webapi.js methods to use new http interface
DoctorMcKay 8e1f214
Log into steam using steam-session
DoctorMcKay c006526
Pass httpProxy down to steam-session
DoctorMcKay 25dfa2c
Rename uri to url everywhere
DoctorMcKay 4ec372b
Added packageName and packageVersion properties
DoctorMcKay 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 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,50 @@ | ||
| module.exports = { | ||
| env: { | ||
| commonjs: true, | ||
| es2021: true, | ||
| node: true | ||
| }, | ||
| extends: 'eslint:recommended', | ||
| parserOptions: { | ||
| ecmaVersion: 12 | ||
| }, | ||
| rules: { | ||
| // Use tabs for indentation and require 'case' in switch to be indented 1 level (default 0) | ||
| indent: ['error', 'tab', {SwitchCase: 1}], | ||
| // Single quotes for strings | ||
| quotes: ['error', 'single'], | ||
| // Always require semicolons | ||
| semi: ['error', 'always'], | ||
| // Don't use 'var' | ||
| 'no-var': 'error', | ||
| // Only use quotes in object literal keys as needed | ||
| 'quote-props': ['error', 'as-needed'], | ||
| // Don't allow trailing spaces after a line | ||
| 'no-trailing-spaces': 'error', | ||
| // Require spaces before and after keywords (like "if") | ||
| 'keyword-spacing': 'error', | ||
| // Don't allow unused variables, but allow unused function args (e.g. in callbacks) and global vars | ||
| 'no-unused-vars': ['error', {vars: 'local', args: 'none', varsIgnorePattern: '^_'}], | ||
| // Require using dot notation (obj.prop instead of obj['prop']) where possible | ||
| 'dot-notation': 'error', | ||
| // Don't use spaces before parens in anonymous or named functions | ||
| 'space-before-function-paren': ['error', {anonymous: 'never', named: 'never', asyncArrow: 'always'}] | ||
|
|
||
| // We will NOT be using eqeqeq for a few reasons: | ||
| // 1. I would have to go through and check every single `==` to make sure that it's not depending on loose equality checks. | ||
| // 2. I'm only using ESLint to enforce style, not actual differences in functionality. ==/=== is not merely a style choice. | ||
| // Yes, I know that 'no-var' is actually enforcing a difference in functionality, but in practice nobody uses | ||
| // (or even knows about) var's hoisting functionality, so at this point it's effectively a style choice. | ||
| // 3. A lot of the time, you actually *want* loose equality checks, especially when interacting with a web server | ||
| // (as HTTP as no concept of anything but strings). Yes, most of our interaction is JSON, but not all. And even then, | ||
| // not all JSON actually serializes numbers as numbers. | ||
| // 4. `==` is really nowhere near as dangerous as memes would lead you to believe, if you know what you're doing. | ||
| // 5. If the idea behind enforcing `===` is to prevent inexperienced developers from unwittingly introducing bugs | ||
| // via loose quality checks, in my opinion it could be just as harmful to instruct a code quality tool to | ||
| // naively demand that all `==` become `===`. If a developer were to build code that works, but upon opening | ||
| // a pull request they see that ESLint demands they use `===` instead, they might just click "fix" and resubmit, | ||
| // expecting the code quality tool to know what it's doing. But it *doesn't* know what it's doing, since it's | ||
| // just blindly alerting when it sees `==`. The change in functionality from `==` to `===` could very well | ||
| // introduce a bug by itself. | ||
| } | ||
| }; | ||
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,31 @@ | ||
| name: ESLint | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| # Run for external PRs, but not on our own internal PRs as they'll be run by the push to the branch. | ||
| if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'DoctorMcKay/node-steamcommunity' | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [10.x] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: npm install | ||
| working-directory: . | ||
| run: npm install --ignore-scripts | ||
|
|
||
| - name: Run ESLint | ||
| run: npm run lint |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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.
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.