build(deps-dev): bump eslint from 8.57.0 to 9.8.0 (#3878)

* build(deps-dev): bump eslint from 8.57.0 to 9.8.0

Bumps [eslint](https://github.com/eslint/eslint) from 8.57.0 to 9.8.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.57.0...v9.8.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* migrate on latest eslint config

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
This commit is contained in:
dependabot[bot] 2024-08-12 20:19:17 +03:00 committed by GitHub
parent d0cc449e64
commit e559268be4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 896 additions and 515 deletions

View File

@ -1,234 +1,234 @@
{ // {
"env": { // "env": {
"node": true, // "node": true,
"browser": true, // "browser": true,
"es2021": true // "es2021": true
}, // },
"extends": [ // "extends": [
// "eslint:recommended", // // "eslint:recommended",
"prettier" // "prettier"
], // ],
"parserOptions": { // "parserOptions": {
"sourceType": "module", // "sourceType": "module",
"ecmaVersion": 2022 // "ecmaVersion": 2022
}, // },
"rules": { // "rules": {
// Possible Errors (overrides from recommended set) // // Possible Errors (overrides from recommended set)
// "no-extra-parens": "error", // // "no-extra-parens": "error",
"no-unexpected-multiline": "error", // "no-unexpected-multiline": "error",
// All JSDoc comments must be valid // // All JSDoc comments must be valid
"valid-jsdoc": [ "error", { // "valid-jsdoc": [ "error", {
"requireReturn": true, // "requireReturn": true,
"requireReturnDescription": true, // "requireReturnDescription": true,
"requireParamDescription": true, // "requireParamDescription": true,
"prefer": { // "prefer": {
"return": "returns" // "return": "returns"
} // }
}], // }],
// Best Practices // // Best Practices
// Allowed a getter without setter, but all setters require getters // // Allowed a getter without setter, but all setters require getters
"accessor-pairs": [ "error", { // "accessor-pairs": [ "error", {
"getWithoutSet": false, // "getWithoutSet": false,
"setWithoutGet": true // "setWithoutGet": true
}], // }],
"block-scoped-var": "warn", // "block-scoped-var": "warn",
"consistent-return": "error", // "consistent-return": "error",
"curly": "error", // "curly": "error",
// "default-case": "warn", // // "default-case": "warn",
// the dot goes with the property when doing multiline // // the dot goes with the property when doing multiline
// "dot-location": [ "warn", "property" ], // // "dot-location": [ "warn", "property" ],
// "dot-notation": "warn", // // "dot-notation": "warn",
// "eqeqeq": [ "error", "smart" ], // // "eqeqeq": [ "error", "smart" ],
// "guard-for-in": "warn", // // "guard-for-in": "warn",
"no-alert": "error", // "no-alert": "error",
"no-caller": "error", // "no-caller": "error",
// "no-case-declarations": "warn", // // "no-case-declarations": "warn",
// "no-div-regex": "warn", // // "no-div-regex": "warn",
// "no-else-return": "warn", // // "no-else-return": "warn",
// "no-empty-label": "warn", // // "no-empty-label": "warn",
// "no-empty-pattern": "warn", // // "no-empty-pattern": "warn",
// "no-eq-null": "warn", // // "no-eq-null": "warn",
// "no-eval": "error", // // "no-eval": "error",
// "no-extend-native": "error", // // "no-extend-native": "error",
// "no-extra-bind": "warn", // // "no-extra-bind": "warn",
// "no-floating-decimal": "warn", // // "no-floating-decimal": "warn",
// "no-implicit-coercion": [ "warn", { // // "no-implicit-coercion": [ "warn", {
// "boolean": true, // // "boolean": true,
// "number": true, // // "number": true,
// "string": true // // "string": true
// }], // // }],
// "no-implied-eval": "error", // // "no-implied-eval": "error",
// "no-invalid-this": "error", // // "no-invalid-this": "error",
// "no-iterator": "error", // // "no-iterator": "error",
// "no-labels": "warn", // // "no-labels": "warn",
// "no-lone-blocks": "warn", // // "no-lone-blocks": "warn",
// "no-loop-func": "error", // // "no-loop-func": "error",
// "no-magic-numbers": "warn", // // "no-magic-numbers": "warn",
// "no-multi-spaces": "error", // // "no-multi-spaces": "error",
// "no-multi-str": "warn", // // "no-multi-str": "warn",
// "no-native-reassign": "error", // // "no-native-reassign": "error",
// "no-new-func": "error", // // "no-new-func": "error",
// "no-new-wrappers": "error", // // "no-new-wrappers": "error",
// "no-new": "error", // // "no-new": "error",
// "no-octal-escape": "error", // // "no-octal-escape": "error",
// "no-param-reassign": "error", // // "no-param-reassign": "error",
// "no-process-env": "warn", // // "no-process-env": "warn",
// "no-proto": "error", // // "no-proto": "error",
// "no-redeclare": "error", // // "no-redeclare": "error",
// "no-return-assign": "error", // // "no-return-assign": "error",
// "no-script-url": "error", // // "no-script-url": "error",
// "no-self-compare": "error", // // "no-self-compare": "error",
// "no-throw-literal": "error", // // "no-throw-literal": "error",
// "no-unused-expressions": "error", // // "no-unused-expressions": "error",
// "no-useless-call": "error", // // "no-useless-call": "error",
// "no-useless-concat": "error", // // "no-useless-concat": "error",
// "no-void": "warn", // // "no-void": "warn",
// Produce warnings when something is commented as TODO or FIXME // // Produce warnings when something is commented as TODO or FIXME
"no-warning-comments": [ "warn", { // "no-warning-comments": [ "warn", {
"terms": [ "TODO", "FIXME" ], // "terms": [ "TODO", "FIXME" ],
"location": "start" // "location": "start"
}], // }],
"no-with": "warn", // "no-with": "warn",
"radix": "warn", // "radix": "warn",
// "vars-on-top": "error", // // "vars-on-top": "error",
// Enforces the style of wrapped functions // // Enforces the style of wrapped functions
// "wrap-iife": [ "error", "outside" ], // // "wrap-iife": [ "error", "outside" ],
// "yoda": "error", // // "yoda": "error",
// Strict Mode - for ES6, never use strict. // // Strict Mode - for ES6, never use strict.
// "strict": [ "error", "never" ], // // "strict": [ "error", "never" ],
// Variables // // Variables
// "init-declarations": [ "error", "always" ], // // "init-declarations": [ "error", "always" ],
// "no-catch-shadow": "warn", // // "no-catch-shadow": "warn",
"no-delete-var": "error", // "no-delete-var": "error",
// "no-label-var": "error", // // "no-label-var": "error",
// "no-shadow-restricted-names": "error", // // "no-shadow-restricted-names": "error",
// "no-shadow": "warn", // // "no-shadow": "warn",
// We require all vars to be initialized (see init-declarations) // // We require all vars to be initialized (see init-declarations)
// If we NEED a var to be initialized to undefined, it needs to be explicit // // If we NEED a var to be initialized to undefined, it needs to be explicit
"no-undef-init": "off", // "no-undef-init": "off",
"no-undef": "error", // "no-undef": "error",
"no-undefined": "off", // "no-undefined": "off",
"no-unused-vars": "warn", // "no-unused-vars": "warn",
// Disallow hoisting - let & const don't allow hoisting anyhow // // Disallow hoisting - let & const don't allow hoisting anyhow
"no-use-before-define": "error", // "no-use-before-define": "error",
// Node.js and CommonJS // // Node.js and CommonJS
// "callback-return": [ "warn", [ "callback", "next" ]], // // "callback-return": [ "warn", [ "callback", "next" ]],
// "global-require": "error", // // "global-require": "error",
// "handle-callback-err": "warn", // // "handle-callback-err": "warn",
// "no-mixed-requires": "warn", // // "no-mixed-requires": "warn",
// "no-new-require": "error", // // "no-new-require": "error",
// Use path.concat instead // // Use path.concat instead
// "no-path-concat": "error", // // "no-path-concat": "error",
// "no-process-exit": "error", // // "no-process-exit": "error",
// "no-restricted-modules": "off", // // "no-restricted-modules": "off",
// "no-sync": "warn", // // "no-sync": "warn",
// ECMAScript 6 support // // ECMAScript 6 support
// "arrow-body-style": [ "error", "always" ], // // "arrow-body-style": [ "error", "always" ],
// "arrow-parens": [ "error", "always" ], // // "arrow-parens": [ "error", "always" ],
// "arrow-spacing": [ "error", { "before": true, "after": true }], // // "arrow-spacing": [ "error", { "before": true, "after": true }],
"constructor-super": "error", // "constructor-super": "error",
// "generator-star-spacing": [ "error", "before" ], // // "generator-star-spacing": [ "error", "before" ],
// "no-arrow-condition": "error", // // "no-arrow-condition": "error",
"no-class-assign": "error", // "no-class-assign": "error",
"no-const-assign": "error", // "no-const-assign": "error",
"no-dupe-class-members": "error", // "no-dupe-class-members": "error",
"no-this-before-super": "error", // "no-this-before-super": "error",
// "no-var": "warn", // // "no-var": "warn",
"object-shorthand": [ "warn" ], // "object-shorthand": [ "warn" ],
// "prefer-arrow-callback": "warn", // // "prefer-arrow-callback": "warn",
// "prefer-spread": "warn", // // "prefer-spread": "warn",
// "prefer-template": "warn", // // "prefer-template": "warn",
// "require-yield": "error", // // "require-yield": "error",
// Stylistic - everything here is a warning because of style. // // Stylistic - everything here is a warning because of style.
// "array-bracket-spacing": [ "warn", "always" ], // // "array-bracket-spacing": [ "warn", "always" ],
// "block-spacing": [ "warn", "always" ], // // "block-spacing": [ "warn", "always" ],
// "brace-style": [ "warn", "1tbs", { "allowSingleLine": false } ], // // "brace-style": [ "warn", "1tbs", { "allowSingleLine": false } ],
// "camelcase": "warn", // // "camelcase": "warn",
// "comma-spacing": [ "warn", { "before": false, "after": true } ], // // "comma-spacing": [ "warn", { "before": false, "after": true } ],
// "comma-style": [ "warn", "last" ], // // "comma-style": [ "warn", "last" ],
// "computed-property-spacing": [ "warn", "never" ], // // "computed-property-spacing": [ "warn", "never" ],
// "consistent-this": [ "warn", "self" ], // // "consistent-this": [ "warn", "self" ],
// "eol-last": "warn", // // "eol-last": "warn",
// "func-names": "warn", // // "func-names": "warn",
// "func-style": [ "warn", "declaration" ], // // "func-style": [ "warn", "declaration" ],
// "id-length": [ "warn", { "min": 2, "max": 32 } ], // // "id-length": [ "warn", { "min": 2, "max": 32 } ],
// "indent": [ "warn", 4 ], // // "indent": [ "warn", 4 ],
// "jsx-quotes": [ "warn", "prefer-double" ], // // "jsx-quotes": [ "warn", "prefer-double" ],
// "linebreak-style": [ "warn", "unix" ], // // "linebreak-style": [ "warn", "unix" ],
// "lines-around-comment": [ "warn", { "beforeBlockComment": true } ], // // "lines-around-comment": [ "warn", { "beforeBlockComment": true } ],
// "max-depth": [ "warn", 8 ], // // "max-depth": [ "warn", 8 ],
// "max-len": [ "warn", 132 ], // // "max-len": [ "warn", 132 ],
// "max-nested-callbacks": [ "warn", 8 ], // // "max-nested-callbacks": [ "warn", 8 ],
// "max-params": [ "warn", 8 ], // // "max-params": [ "warn", 8 ],
// "new-cap": "warn", // // "new-cap": "warn",
// "new-parens": "warn", // // "new-parens": "warn",
// "no-array-constructor": "warn", // // "no-array-constructor": "warn",
// "no-bitwise": "off", // // "no-bitwise": "off",
// "no-continue": "off", // // "no-continue": "off",
// "no-inline-comments": "off", // // "no-inline-comments": "off",
// "no-lonely-if": "warn", // // "no-lonely-if": "warn",
"no-mixed-spaces-and-tabs": "warn", // "no-mixed-spaces-and-tabs": "warn",
"no-multiple-empty-lines": "warn", // "no-multiple-empty-lines": "warn",
"no-negated-condition": "warn", // "no-negated-condition": "warn",
// "no-nested-ternary": "warn", // // "no-nested-ternary": "warn",
// "no-new-object": "warn", // // "no-new-object": "warn",
// "no-plusplus": "off", // // "no-plusplus": "off",
// "no-spaced-func": "warn", // // "no-spaced-func": "warn",
// "no-ternary": "off", // // "no-ternary": "off",
// "no-trailing-spaces": "warn", // // "no-trailing-spaces": "warn",
// "no-underscore-dangle": "warn", // // "no-underscore-dangle": "warn",
"no-unneeded-ternary": "warn", // "no-unneeded-ternary": "warn",
// "object-curly-spacing": [ "warn", "always" ], // // "object-curly-spacing": [ "warn", "always" ],
// "one-var": "off", // // "one-var": "off",
// "operator-assignment": [ "warn", "never" ], // // "operator-assignment": [ "warn", "never" ],
// "operator-linebreak": [ "warn", "after" ], // // "operator-linebreak": [ "warn", "after" ],
// "padded-blocks": [ "warn", "never" ], // // "padded-blocks": [ "warn", "never" ],
// "quote-props": [ "warn", "consistent-as-needed" ], // // "quote-props": [ "warn", "consistent-as-needed" ],
// "quotes": [ "warn", "single" ], // // "quotes": [ "warn", "single" ],
"require-jsdoc": [ "warn", { // "require-jsdoc": [ "warn", {
"require": { // "require": {
"FunctionDeclaration": true, // "FunctionDeclaration": true,
"MethodDefinition": true, // "MethodDefinition": true,
"ClassDeclaration": false // "ClassDeclaration": false
} // }
}], // }],
// "semi-spacing": [ "warn", { "before": false, "after": true }], // // "semi-spacing": [ "warn", { "before": false, "after": true }],
// "semi": [ "error", "always" ], // // "semi": [ "error", "always" ],
// "sort-vars": "off", // // "sort-vars": "off",
"keyword-spacing": ["error", { "before": true, "after": true }] // "keyword-spacing": ["error", { "before": true, "after": true }]
// "space-before-blocks": [ "warn", "always" ], // // "space-before-blocks": [ "warn", "always" ],
// "space-before-function-paren": [ "warn", "never" ], // // "space-before-function-paren": [ "warn", "never" ],
// "space-in-parens": [ "warn", "never" ], // // "space-in-parens": [ "warn", "never" ],
// "space-infix-ops": [ "warn", { "int32Hint": true } ], // // "space-infix-ops": [ "warn", { "int32Hint": true } ],
// "space-return-throw-case": "error", // // "space-return-throw-case": "error",
// "space-unary-ops": "error", // // "space-unary-ops": "error",
// "spaced-comment": [ "warn", "always" ], // // "spaced-comment": [ "warn", "always" ],
// "wrap-regex": "warn" // // "wrap-regex": "warn"
} // }
} // }

View File

@ -91,6 +91,9 @@ export default async (req, res) => {
try { try {
await retryer(uptimeFetcher, {}); await retryer(uptimeFetcher, {});
} catch (err) { } catch (err) {
// Resolve eslint no-unused-vars
err;
PATsValid = false; PATsValid = false;
} }

83
eslint.config.mjs Normal file
View File

@ -0,0 +1,83 @@
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import jsdoc from "eslint-plugin-jsdoc";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});
export default [
...compat.extends("prettier"),
{
languageOptions: {
globals: {
...globals.node,
...globals.browser,
},
ecmaVersion: 2022,
sourceType: "module",
},
plugins: {
jsdoc,
},
rules: {
"no-unexpected-multiline": "error",
"accessor-pairs": [
"error",
{
getWithoutSet: false,
setWithoutGet: true,
},
],
"block-scoped-var": "warn",
"consistent-return": "error",
curly: "error",
"no-alert": "error",
"no-caller": "error",
"no-warning-comments": [
"warn",
{
terms: ["TODO", "FIXME"],
location: "start",
},
],
"no-with": "warn",
radix: "warn",
"no-delete-var": "error",
"no-undef-init": "off",
"no-undef": "error",
"no-undefined": "off",
"no-unused-vars": "warn",
"no-use-before-define": "error",
"constructor-super": "error",
"no-class-assign": "error",
"no-const-assign": "error",
"no-dupe-class-members": "error",
"no-this-before-super": "error",
"object-shorthand": ["warn"],
"no-mixed-spaces-and-tabs": "warn",
"no-multiple-empty-lines": "warn",
"no-negated-condition": "warn",
"no-unneeded-ternary": "warn",
"keyword-spacing": [
"error",
{
before: true,
after: true,
},
],
"jsdoc/require-returns": "warn",
"jsdoc/require-returns-description": "warn",
"jsdoc/require-param-description": "warn",
"jsdoc/require-jsdoc": "warn",
},
},
];

897
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -38,13 +38,17 @@
"devDependencies": { "devDependencies": {
"@actions/core": "^1.10.1", "@actions/core": "^1.10.1",
"@actions/github": "^6.0.0", "@actions/github": "^6.0.0",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.9.0",
"@testing-library/dom": "^10.4.0", "@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.4.8", "@testing-library/jest-dom": "^6.4.8",
"@uppercod/css-to-object": "^1.1.1", "@uppercod/css-to-object": "^1.1.1",
"axios-mock-adapter": "^2.0.0", "axios-mock-adapter": "^2.0.0",
"color-contrast-checker": "^2.1.0", "color-contrast-checker": "^2.1.0",
"eslint": "^8.57.0", "eslint": "^9.8.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsdoc": "^50.0.1",
"globals": "^15.9.0",
"hjson": "^3.2.2", "hjson": "^3.2.2",
"husky": "^9.1.4", "husky": "^9.1.4",
"jest": "^29.7.0", "jest": "^29.7.0",

View File

@ -20,6 +20,9 @@ export const getRepoInfo = (ctx) => {
repo: ctx.repo.repo, repo: ctx.repo.repo,
}; };
} catch (error) { } catch (error) {
// Resolve eslint no-unused-vars
error;
return { return {
owner: OWNER, owner: OWNER,
repo: REPO, repo: REPO,

View File

@ -332,6 +332,9 @@ const parseJSON = (json) => {
); );
} }
} catch (error) { } catch (error) {
// Resolve eslint no-unused-vars
error;
// Remove trailing commas (if any). // Remove trailing commas (if any).
let parsedJson = json.replace(/(,\s*})/g, "}"); let parsedJson = json.replace(/(,\s*})/g, "}");