-
Notifications
You must be signed in to change notification settings - Fork 2
Bump node version to 20 #237
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
Changes from all commits
Commits
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
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 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,126 @@ | ||
| const promise = require('eslint-plugin-promise'); | ||
|
|
||
| module.exports = [ | ||
| { | ||
| languageOptions: { | ||
| ecmaVersion: 2022, | ||
| sourceType: 'commonjs', | ||
| globals: { | ||
| // Node.js globals | ||
| global: 'readonly', | ||
| process: 'readonly', | ||
| Buffer: 'readonly', | ||
| __dirname: 'readonly', | ||
| __filename: 'readonly', | ||
| exports: 'writable', | ||
| module: 'writable', | ||
| require: 'readonly', | ||
| console: 'readonly', | ||
| } | ||
| }, | ||
| plugins: { | ||
| promise | ||
| }, | ||
| rules: { | ||
| // Removed rule "disallow the use of console" from recommended eslint rules | ||
| "no-console": "off", | ||
|
|
||
| // Removed rule "disallow multiple spaces in regular expressions" from recommended eslint rules | ||
| "no-regex-spaces": "off", | ||
|
|
||
| // Removed rule "disallow the use of debugger" from recommended eslint rules | ||
| "no-debugger": "off", | ||
|
|
||
| // Removed rule "disallow unused variables" from recommended eslint rules | ||
| "no-unused-vars": "off", | ||
|
|
||
| // Removed rule "disallow mixed spaces and tabs for indentation" from recommended eslint rules | ||
| "no-mixed-spaces-and-tabs": "off", | ||
|
|
||
| // Removed rule "disallow the use of undeclared variables unless mentioned in /*global */ comments" from recommended eslint rules | ||
| "no-undef": "off", | ||
|
|
||
| // Warn against template literal placeholder syntax in regular strings | ||
| "no-template-curly-in-string": "warn", | ||
|
|
||
| // Warn if return statements do not either always or never specify values | ||
| "consistent-return": "warn", | ||
|
|
||
| // Warn if no return statements in callbacks of array methods | ||
| "array-callback-return": "warn", | ||
|
|
||
| // Require the use of === and !== (disabled for compatibility) | ||
| "eqeqeq": "off", | ||
|
|
||
| // Disallow the use of alert, confirm, and prompt | ||
| "no-alert": "error", | ||
|
|
||
| // Disallow the use of arguments.caller or arguments.callee | ||
| "no-caller": "error", | ||
|
|
||
| // Disallow null comparisons without type-checking operators | ||
| "no-eq-null": "error", | ||
|
|
||
| // Disallow the use of eval() | ||
| "no-eval": "error", | ||
|
|
||
| // Warn against extending native types | ||
| "no-extend-native": "warn", | ||
|
|
||
| // Warn against unnecessary calls to .bind() | ||
| "no-extra-bind": "warn", | ||
|
|
||
| // Warn against unnecessary labels | ||
| "no-extra-label": "warn", | ||
|
|
||
| // Disallow leading or trailing decimal points in numeric literals | ||
| "no-floating-decimal": "error", | ||
|
|
||
| // Warn against shorthand type conversions | ||
| "no-implicit-coercion": "warn", | ||
|
|
||
| // Warn against function declarations and expressions inside loop statements | ||
| "no-loop-func": "warn", | ||
|
|
||
| // Disallow new operators with the Function object | ||
| "no-new-func": "error", | ||
|
|
||
| // Warn against new operators with the String, Number, and Boolean objects | ||
| "no-new-wrappers": "warn", | ||
|
|
||
| // Disallow throwing literals as exceptions | ||
| "no-throw-literal": "error", | ||
|
|
||
| // Require using Error objects as Promise rejection reasons | ||
| "prefer-promise-reject-errors": "error", | ||
|
|
||
| // Enforce "for" loop update clause moving the counter in the right direction | ||
| "for-direction": "error", | ||
|
|
||
| // Enforce return statements in getters | ||
| "getter-return": "error", | ||
|
|
||
| // Disallow await inside of loops | ||
| "no-await-in-loop": "error", | ||
|
|
||
| // Disallow comparing against -0 | ||
| "no-compare-neg-zero": "error", | ||
|
|
||
| // Disallow identifiers from shadowing restricted names | ||
| "no-shadow-restricted-names": "error", | ||
|
|
||
| // Prefer using arrow functions for callbacks | ||
| "prefer-arrow-callback": "warn", | ||
|
|
||
| // Return inside each then() to create readable and reusable Promise chains. | ||
| // Forces developers to return console logs and http calls in promises. | ||
| "promise/always-return": "error", | ||
|
|
||
| //Enforces the use of catch() on un-returned promises | ||
| "promise/catch-or-return": "error", | ||
|
|
||
| // Warn against nested then() or catch() statements | ||
| "promise/no-nesting": "warn" | ||
| } | ||
| } | ||
| ]; |
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.
Switched from .eslintrc.json to eslint.config.js because ESLint 9+ requires the new "flat config" format and no longer supports the legacy .eslintrc.* configuration files by default.