diff --git a/.eslintrc.json b/.eslintrc.json index 394b61b..8d770af 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -59,8 +59,10 @@ "unicorn/better-regex": "error", "unicorn/catch-error-name": "error", + "unicorn/consistent-destructuring": "error", "unicorn/consistent-function-scoping": "error", "unicorn/custom-error-definition": "error", + "unicorn/empty-brace-spaces": "error", "unicorn/error-message": "error", "unicorn/escape-case": "error", "unicorn/expiring-todo-comments": "error", @@ -70,45 +72,59 @@ "unicorn/import-style": "error", "unicorn/new-for-builtins": "error", "unicorn/no-abusive-eslint-disable": "error", - "unicorn/no-array-instanceof": "error", + "unicorn/no-array-callback-reference": "error", + "unicorn/no-array-for-each": "error", + "unicorn/no-array-push-push": "error", + "unicorn/no-array-reduce": "error", "unicorn/no-console-spaces": "error", - "unicorn/no-fn-reference-in-iterator": "error", "unicorn/no-for-loop": "error", "unicorn/no-hex-escape": "error", + "unicorn/no-instanceof-array": "error", "unicorn/no-keyword-prefix": "error", + "unicorn/no-lonely-if": "error", + "no-nested-ternary": "error", "unicorn/no-nested-ternary": "error", + "unicorn/no-new-array": "error", "unicorn/no-new-buffer": "error", "unicorn/no-null": "error", "unicorn/no-object-as-default-parameter": "error", "unicorn/no-process-exit": "error", - "unicorn/no-reduce": "error", + "unicorn/no-this-assignment": "error", "unicorn/no-unreadable-array-destructuring": "error", "unicorn/no-unsafe-regex": "error", "unicorn/no-unused-properties": "error", "unicorn/no-useless-undefined": "error", "unicorn/no-zero-fractions": "error", "unicorn/number-literal-case": "error", + "unicorn/numeric-separators-style": "error", "unicorn/prefer-add-event-listener": "error", "unicorn/prefer-array-find": "error", - "unicorn/prefer-dataset": "error", - "unicorn/prefer-event-key": "error", - "unicorn/prefer-flat-map": "error", + "unicorn/prefer-array-flat-map": "error", + "unicorn/prefer-array-index-of": "error", + "unicorn/prefer-array-some": "error", + "unicorn/prefer-date-now": "error", + "unicorn/prefer-default-parameters": "error", + "unicorn/prefer-dom-node-append": "error", + "unicorn/prefer-dom-node-dataset": "error", + "unicorn/prefer-dom-node-remove": "error", + "unicorn/prefer-dom-node-text-content": "error", "unicorn/prefer-includes": "error", + "unicorn/prefer-keyboard-event-key": "error", + "unicorn/prefer-math-trunc": "error", "unicorn/prefer-modern-dom-apis": "error", "unicorn/prefer-negative-index": "error", - "unicorn/prefer-node-append": "error", - "unicorn/prefer-node-remove": "error", "unicorn/prefer-number-properties": "error", "unicorn/prefer-optional-catch-binding": "error", "unicorn/prefer-query-selector": "error", "unicorn/prefer-reflect-apply": "error", - "unicorn/prefer-replace-all": "error", + "unicorn/prefer-regexp-test": "error", "unicorn/prefer-set-has": "error", "unicorn/prefer-spread": "error", - "unicorn/prefer-starts-ends-with": "error", + "unicorn/prefer-string-replace-all": "error", "unicorn/prefer-string-slice": "error", - "unicorn/prefer-text-content": "error", - "unicorn/prefer-trim-start-end": "error", + "unicorn/prefer-string-starts-ends-with": "error", + "unicorn/prefer-string-trim-start-end": "error", + "unicorn/prefer-ternary": "error", "unicorn/prefer-type-error": "error", "unicorn/prevent-abbreviations": "error", "unicorn/string-content": "error", diff --git a/dist/index.js b/dist/index.js index 64adafd..294503d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -18,7 +18,7 @@ const logError = core.error; const argv = core.getInput("globs"). split("\n"). - filter(String); + filter((glob) => String(glob)); markdownlintCli2({ argv, diff --git a/markdownlint-cli2-action.js b/markdownlint-cli2-action.js index c6aeb23..bed962c 100644 --- a/markdownlint-cli2-action.js +++ b/markdownlint-cli2-action.js @@ -10,7 +10,7 @@ const logError = core.error; const argv = core.getInput("globs"). split("\n"). - filter(String); + filter((glob) => String(glob)); markdownlintCli2({ argv, diff --git a/package.json b/package.json index 96e6e1a..09e38ce 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,8 @@ }, "devDependencies": { "@vercel/ncc": "~0.27.0", - "eslint": "~7.18.0", + "eslint": "~7.20.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-unicorn": "~26.0.1" + "eslint-plugin-unicorn": "~28.0.2" } }