Skip to content

Commit

Permalink
test: fix unused case for new deprecated rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous committed Dec 18, 2023
1 parent 935b088 commit 203950c
Showing 1 changed file with 71 additions and 18 deletions.
89 changes: 71 additions & 18 deletions test/check-rules.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,7 @@ const checkRules = (file, option, env = {}) => {

test("no unused rules", () => {
const deprecatedRules = [
// NOTE: Node-specific rules are deprecated and will be removed.
// See https://eslint.org/docs/user-guide/migrating-to-7.0.0#deprecate-node-rules
"callback-return",
"global-require",
"handle-callback-err",
"no-buffer-constructor",
"no-mixed-requires",
"no-new-require",
"no-path-concat",
"no-process-env",
"no-process-exit",
"no-restricted-modules",
"no-sync",
// ...
];

const runTest = (/** @type {string} */ file) => {
Expand Down Expand Up @@ -66,11 +54,76 @@ test("no unused rules", () => {

test("deprecated rules", () => {
const ignoredRules = [
"no-process-exit",
"jsx-a11y/label-has-for",
"@typescript-eslint/camelcase",
"@typescript-eslint/class-name-casing",
"@typescript-eslint/interface-name-prefix",
// stylistic
"array-bracket-newline",
"array-bracket-spacing",
"array-element-newline",
"arrow-parens",
"arrow-spacing",
"block-spacing",
"brace-style",
"comma-dangle",
"comma-spacing",
"comma-style",
"computed-property-spacing",
"dot-location",
"eol-last",
"func-call-spacing",
"function-call-argument-newline",
"function-paren-newline",
"generator-star-spacing",
"implicit-arrow-linebreak",
"indent",
"indent-legacy",
"jsx-quotes",
"key-spacing",
"keyword-spacing",
"linebreak-style",
"lines-around-comment",
"lines-between-class-members",
"max-len",
"max-statements-per-line",
"multiline-ternary",
"new-parens",
"newline-per-chained-call",
"no-confusing-arrow",
"no-extra-parens",
"no-extra-semi",
"no-floating-decimal",
"no-mixed-operators",
"no-mixed-spaces-and-tabs",
"no-multi-spaces",
"no-multiple-empty-lines",
"no-spaced-func",
"no-tabs",
"no-trailing-spaces",
"no-whitespace-before-property",
"nonblock-statement-body-position",
"object-curly-newline",
"object-curly-spacing",
"object-property-newline",
"one-var-declaration-per-line",
"operator-linebreak",
"padded-blocks",
"padding-line-between-statements",
"quote-props",
"quotes",
"rest-spread-spacing",
"semi",
"semi-spacing",
"semi-style",
"space-before-blocks",
"space-before-function-paren",
"space-in-parens",
"space-infix-ops",
"space-unary-ops",
"spaced-comment",
"switch-colon-spacing",
"template-curly-spacing",
"template-tag-spacing",
"wrap-iife",
"wrap-regex",
"yield-star-spacing",
];

const runTest = (/** @type {string} */ file) => {
Expand Down

0 comments on commit 203950c

Please sign in to comment.