-
Notifications
You must be signed in to change notification settings - Fork 23
Dependency and toolchain refresh #1453
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 all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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 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
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 |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| 22.22.2 | ||
| 22.23.1 | ||
|
|
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
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,100 @@ | ||
| import js from '@eslint/js' | ||
| import globals from 'globals' | ||
| import tseslint from 'typescript-eslint' | ||
| import security from 'eslint-plugin-security' | ||
| import promise from 'eslint-plugin-promise' | ||
| // this pulls in eslint-config-prettier, which is why that package is a declared | ||
| // devDependency despite never being imported by name (it is an *optional* peer of | ||
| // eslint-plugin-prettier, so npm will not reliably install it on its own) | ||
| import prettierRecommended from 'eslint-plugin-prettier/recommended' | ||
|
|
||
| // Replaces the .eslintrc that extended eslint-config-oceanprotocol. That config is | ||
| // pinned to eslint ^8 and cannot follow eslint to flat config, so the preset is | ||
| // composed here instead. | ||
| // | ||
| // The rule set is held at the severity the old gate actually resolved to | ||
| // (0 errors, 40 warnings), taken from `eslint --print-config` on the previous | ||
| // setup. Rules that eslint 9/10 and the newer plugins add on top are switched off | ||
| // rather than fixed here, so this dependency bump does not double as a lint-debt PR. | ||
| export default tseslint.config( | ||
| { | ||
| // only TypeScript is linted - the .js in the tree is build output, k6 | ||
| // performance scripts or plain node helpers | ||
| ignores: [ | ||
| '**/*.js', | ||
| '**/*.mjs', | ||
| '**/*.cjs', | ||
| 'dist/', | ||
| 'coverage/', | ||
| '.nyc_output/', | ||
| 'databases/', | ||
| 'c2d_storage/', | ||
| 'logs/' | ||
| ] | ||
| }, | ||
| { | ||
| files: ['**/*.ts'], | ||
| // a stale eslint-disable is a lie about the code, so these are errors rather | ||
| // than warnings: it keeps the directives honest as rules move around | ||
| linterOptions: { reportUnusedDisableDirectives: 'error' }, | ||
| extends: [ | ||
| js.configs.recommended, | ||
| // parser + plugin wiring only. The old config never pulled in | ||
| // @typescript-eslint's `recommended`, and adopting it here would add | ||
| // ~1350 no-explicit-any errors unrelated to the dependency bump. | ||
| tseslint.configs.base, | ||
| security.configs.recommended, | ||
| prettierRecommended | ||
| ], | ||
| // eslint-plugin-promise is registered but not extended: the old config | ||
| // enabled promise/param-names only, not the plugin's recommended set | ||
| plugins: { promise }, | ||
| languageOptions: { | ||
| sourceType: 'module', | ||
| globals: { | ||
| ...globals.node, | ||
| ...globals.browser, | ||
| ...globals.mocha, | ||
| NodeJS: true, | ||
| RequestInit: true | ||
| } | ||
| }, | ||
| rules: { | ||
| // from .eslintrc | ||
| 'no-empty': ['error', { allowEmptyCatch: true }], | ||
| 'prefer-destructuring': ['warn', { object: true, array: false }], | ||
| 'no-dupe-class-members': ['warn'], | ||
| 'no-useless-constructor': ['warn'], | ||
| 'constructor-super': ['warn'], | ||
| 'require-await': 'error', | ||
|
|
||
| // from eslint-config-standard, via eslint-config-oceanprotocol | ||
| 'no-unused-vars': [ | ||
| 'error', | ||
| { args: 'none', caughtErrors: 'none', ignoreRestSiblings: true, vars: 'all' } | ||
| ], | ||
| 'no-unused-expressions': [ | ||
| 'error', | ||
| { allowShortCircuit: true, allowTernary: true, allowTaggedTemplates: true } | ||
| ], | ||
| 'no-constant-condition': ['error', { checkLoops: false }], | ||
| 'promise/param-names': 'error', | ||
| // these three cost nothing on the current tree and keep the existing | ||
| // eslint-disable comments for them meaningful. Three more that standard | ||
| // supplied are deliberately absent: no-await-in-loop (264 violations), | ||
| // camelcase (111) and no-use-before-define (54) - the old gate did not | ||
| // enforce them either, so turning them on is its own piece of work. | ||
| 'no-new': 'error', | ||
| 'no-self-compare': 'error', | ||
| 'no-unmodified-loop-condition': 'error', | ||
|
|
||
| // added to eslint's recommended set after v8 - not part of the old gate | ||
| 'no-useless-assignment': 'off', | ||
| 'preserve-caught-error': 'off', | ||
|
|
||
| // eslint-config-oceanprotocol explicitly disabled this; it fires on every | ||
| // bracket access and would add ~128 warnings | ||
| 'security/detect-object-injection': 'off' | ||
| } | ||
| } | ||
| ) |
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.
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.
Should we migrate to node 24?
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 will open another PR