From 3c75b2497b3500d7ba1f7cb63a40cdd2d5787fc9 Mon Sep 17 00:00:00 2001 From: oxc-bot <176400334+oxc-bot@users.noreply.github.com> Date: Mon, 30 Dec 2024 07:34:27 +0000 Subject: [PATCH] Release 0.15.4 --- .../guide/usage/linter/generated-rules.md | 17 ++- .../rules/eslint/array-callback-return.md | 2 +- .../linter/rules/eslint/constructor-super.md | 2 +- .../linter/rules/eslint/default-case-last.md | 2 +- .../usage/linter/rules/eslint/default-case.md | 2 +- .../linter/rules/eslint/default-param-last.md | 2 +- .../guide/usage/linter/rules/eslint/eqeqeq.md | 2 +- .../linter/rules/eslint/for-direction.md | 2 +- .../usage/linter/rules/eslint/func-names.md | 2 +- .../linter/rules/eslint/getter-return.md | 2 +- .../usage/linter/rules/eslint/guard-for-in.md | 2 +- .../rules/eslint/max-classes-per-file.md | 2 +- .../usage/linter/rules/eslint/max-lines.md | 2 +- .../usage/linter/rules/eslint/max-params.md | 2 +- .../usage/linter/rules/eslint/no-alert.md | 2 +- .../rules/eslint/no-array-constructor.md | 2 +- .../rules/eslint/no-async-promise-executor.md | 2 +- .../linter/rules/eslint/no-await-in-loop.md | 2 +- .../usage/linter/rules/eslint/no-bitwise.md | 2 +- .../usage/linter/rules/eslint/no-caller.md | 2 +- .../rules/eslint/no-case-declarations.md | 2 +- .../linter/rules/eslint/no-class-assign.md | 2 +- .../rules/eslint/no-compare-neg-zero.md | 2 +- .../linter/rules/eslint/no-cond-assign.md | 2 +- .../usage/linter/rules/eslint/no-console.md | 2 +- .../linter/rules/eslint/no-const-assign.md | 2 +- .../eslint/no-constant-binary-expression.md | 2 +- .../rules/eslint/no-constant-condition.md | 2 +- .../rules/eslint/no-constructor-return.md | 2 +- .../usage/linter/rules/eslint/no-continue.md | 2 +- .../linter/rules/eslint/no-control-regex.md | 2 +- .../usage/linter/rules/eslint/no-debugger.md | 2 +- .../linter/rules/eslint/no-delete-var.md | 2 +- .../usage/linter/rules/eslint/no-div-regex.md | 2 +- .../rules/eslint/no-dupe-class-members.md | 2 +- .../linter/rules/eslint/no-dupe-else-if.md | 2 +- .../usage/linter/rules/eslint/no-dupe-keys.md | 2 +- .../linter/rules/eslint/no-duplicate-case.md | 2 +- .../rules/eslint/no-duplicate-imports.md | 2 +- .../linter/rules/eslint/no-else-return.md | 2 +- .../rules/eslint/no-empty-character-class.md | 2 +- .../linter/rules/eslint/no-empty-function.md | 2 +- .../linter/rules/eslint/no-empty-pattern.md | 2 +- .../rules/eslint/no-empty-static-block.md | 2 +- .../usage/linter/rules/eslint/no-empty.md | 2 +- .../usage/linter/rules/eslint/no-eq-null.md | 2 +- .../usage/linter/rules/eslint/no-eval.md | 2 +- .../usage/linter/rules/eslint/no-ex-assign.md | 2 +- .../linter/rules/eslint/no-extend-native.md | 2 +- .../rules/eslint/no-extra-boolean-cast.md | 2 +- .../linter/rules/eslint/no-extra-label.md | 84 ++++++++++++++ .../linter/rules/eslint/no-fallthrough.md | 2 +- .../linter/rules/eslint/no-func-assign.md | 2 +- .../linter/rules/eslint/no-global-assign.md | 2 +- .../linter/rules/eslint/no-import-assign.md | 2 +- .../rules/eslint/no-inner-declarations.md | 2 +- .../linter/rules/eslint/no-invalid-regexp.md | 2 +- .../rules/eslint/no-irregular-whitespace.md | 2 +- .../usage/linter/rules/eslint/no-iterator.md | 2 +- .../usage/linter/rules/eslint/no-label-var.md | 2 +- .../usage/linter/rules/eslint/no-labels.md | 107 ++++++++++++++++++ .../rules/eslint/no-loss-of-precision.md | 2 +- .../linter/rules/eslint/no-magic-numbers.md | 2 +- .../linter/rules/eslint/no-multi-assign.md | 98 ++++++++++++++++ .../usage/linter/rules/eslint/no-multi-str.md | 2 +- .../rules/eslint/no-negated-condition.md | 47 ++++++++ .../linter/rules/eslint/no-nested-ternary.md | 37 ++++++ .../usage/linter/rules/eslint/no-new-func.md | 2 +- .../eslint/no-new-native-nonconstructor.md | 2 +- .../linter/rules/eslint/no-new-wrappers.md | 2 +- .../guide/usage/linter/rules/eslint/no-new.md | 2 +- .../eslint/no-nonoctal-decimal-escape.md | 2 +- .../usage/linter/rules/eslint/no-obj-calls.md | 2 +- .../rules/eslint/no-object-constructor.md | 2 +- .../usage/linter/rules/eslint/no-plusplus.md | 2 +- .../usage/linter/rules/eslint/no-proto.md | 2 +- .../rules/eslint/no-prototype-builtins.md | 2 +- .../usage/linter/rules/eslint/no-redeclare.md | 2 +- .../linter/rules/eslint/no-regex-spaces.md | 2 +- .../rules/eslint/no-restricted-globals.md | 2 +- .../rules/eslint/no-restricted-imports.md | 2 +- .../linter/rules/eslint/no-return-assign.md | 2 +- .../linter/rules/eslint/no-script-url.md | 2 +- .../linter/rules/eslint/no-self-assign.md | 2 +- .../linter/rules/eslint/no-self-compare.md | 2 +- .../linter/rules/eslint/no-setter-return.md | 2 +- .../eslint/no-shadow-restricted-names.md | 2 +- .../linter/rules/eslint/no-sparse-arrays.md | 2 +- .../eslint/no-template-curly-in-string.md | 2 +- .../usage/linter/rules/eslint/no-ternary.md | 2 +- .../rules/eslint/no-this-before-super.md | 2 +- .../linter/rules/eslint/no-throw-literal.md | 2 +- .../usage/linter/rules/eslint/no-undef.md | 2 +- .../usage/linter/rules/eslint/no-undefined.md | 2 +- .../rules/eslint/no-unexpected-multiline.md | 2 +- .../linter/rules/eslint/no-unreachable.md | 2 +- .../linter/rules/eslint/no-unsafe-finally.md | 2 +- .../linter/rules/eslint/no-unsafe-negation.md | 2 +- .../eslint/no-unsafe-optional-chaining.md | 2 +- .../rules/eslint/no-unused-expressions.md | 2 +- .../linter/rules/eslint/no-unused-labels.md | 2 +- .../eslint/no-unused-private-class-members.md | 2 +- .../linter/rules/eslint/no-unused-vars.md | 2 +- .../linter/rules/eslint/no-useless-catch.md | 2 +- .../linter/rules/eslint/no-useless-concat.md | 2 +- .../rules/eslint/no-useless-constructor.md | 2 +- .../linter/rules/eslint/no-useless-escape.md | 2 +- .../linter/rules/eslint/no-useless-rename.md | 2 +- .../guide/usage/linter/rules/eslint/no-var.md | 2 +- .../usage/linter/rules/eslint/no-void.md | 2 +- .../usage/linter/rules/eslint/no-with.md | 2 +- .../eslint/prefer-exponentiation-operator.md | 2 +- .../rules/eslint/prefer-numeric-literals.md | 2 +- .../rules/eslint/prefer-object-has-own.md | 2 +- .../linter/rules/eslint/prefer-rest-params.md | 60 ++++++++++ .../linter/rules/eslint/prefer-spread.md | 2 +- .../guide/usage/linter/rules/eslint/radix.md | 2 +- .../linter/rules/eslint/require-await.md | 2 +- .../linter/rules/eslint/require-yield.md | 2 +- .../usage/linter/rules/eslint/sort-imports.md | 2 +- .../usage/linter/rules/eslint/sort-keys.md | 2 +- .../usage/linter/rules/eslint/sort-vars.md | 2 +- .../linter/rules/eslint/symbol-description.md | 2 +- .../usage/linter/rules/eslint/unicode-bom.md | 2 +- .../usage/linter/rules/eslint/use-isnan.md | 2 +- .../usage/linter/rules/eslint/valid-typeof.md | 2 +- .../usage/linter/rules/eslint/vars-on-top.md | 83 ++++++++++++++ .../guide/usage/linter/rules/eslint/yoda.md | 2 +- .../usage/linter/rules/import/default.md | 2 +- .../guide/usage/linter/rules/import/export.md | 2 +- .../guide/usage/linter/rules/import/first.md | 2 +- .../linter/rules/import/max-dependencies.md | 2 +- .../guide/usage/linter/rules/import/named.md | 4 +- .../usage/linter/rules/import/namespace.md | 2 +- .../guide/usage/linter/rules/import/no-amd.md | 2 +- .../usage/linter/rules/import/no-commonjs.md | 2 +- .../usage/linter/rules/import/no-cycle.md | 2 +- .../linter/rules/import/no-default-export.md | 2 +- .../linter/rules/import/no-duplicates.md | 2 +- .../linter/rules/import/no-dynamic-require.md | 2 +- .../import/no-named-as-default-member.md | 2 +- .../rules/import/no-named-as-default.md | 2 +- .../linter/rules/import/no-named-default.md | 2 +- .../usage/linter/rules/import/no-namespace.md | 2 +- .../linter/rules/import/no-self-import.md | 2 +- .../rules/import/no-webpack-loader-syntax.md | 2 +- .../usage/linter/rules/import/unambiguous.md | 2 +- .../linter/rules/jest/consistent-test-it.md | 2 +- .../usage/linter/rules/jest/expect-expect.md | 2 +- .../usage/linter/rules/jest/max-expects.md | 2 +- .../linter/rules/jest/max-nested-describe.md | 2 +- .../linter/rules/jest/no-alias-methods.md | 2 +- .../rules/jest/no-commented-out-tests.md | 2 +- .../rules/jest/no-conditional-expect.md | 2 +- .../rules/jest/no-conditional-in-test.md | 2 +- .../rules/jest/no-confusing-set-timeout.md | 2 +- .../rules/jest/no-deprecated-functions.md | 2 +- .../linter/rules/jest/no-disabled-tests.md | 2 +- .../linter/rules/jest/no-done-callback.md | 2 +- .../linter/rules/jest/no-duplicate-hooks.md | 2 +- .../usage/linter/rules/jest/no-export.md | 2 +- .../linter/rules/jest/no-focused-tests.md | 2 +- .../guide/usage/linter/rules/jest/no-hooks.md | 2 +- .../linter/rules/jest/no-identical-title.md | 2 +- .../jest/no-interpolation-in-snapshots.md | 2 +- .../linter/rules/jest/no-jasmine-globals.md | 2 +- .../linter/rules/jest/no-large-snapshots.md | 2 +- .../linter/rules/jest/no-mocks-import.md | 2 +- .../rules/jest/no-restricted-jest-methods.md | 2 +- .../rules/jest/no-restricted-matchers.md | 2 +- .../linter/rules/jest/no-standalone-expect.md | 2 +- .../linter/rules/jest/no-test-prefixes.md | 2 +- .../rules/jest/no-test-return-statement.md | 2 +- .../rules/jest/no-untyped-mock-factory.md | 2 +- .../linter/rules/jest/prefer-called-with.md | 2 +- .../rules/jest/prefer-comparison-matcher.md | 2 +- .../rules/jest/prefer-equality-matcher.md | 2 +- .../rules/jest/prefer-expect-resolves.md | 2 +- .../rules/jest/prefer-hooks-in-order.md | 2 +- .../linter/rules/jest/prefer-hooks-on-top.md | 2 +- .../linter/rules/jest/prefer-jest-mocked.md | 2 +- .../rules/jest/prefer-lowercase-title.md | 2 +- .../jest/prefer-mock-promise-shorthand.md | 2 +- .../usage/linter/rules/jest/prefer-spy-on.md | 2 +- .../linter/rules/jest/prefer-strict-equal.md | 2 +- .../usage/linter/rules/jest/prefer-to-be.md | 2 +- .../linter/rules/jest/prefer-to-contain.md | 2 +- .../rules/jest/prefer-to-have-length.md | 2 +- .../usage/linter/rules/jest/prefer-todo.md | 2 +- .../usage/linter/rules/jest/require-hook.md | 2 +- .../rules/jest/require-to-throw-message.md | 2 +- .../rules/jest/require-top-level-describe.md | 2 +- .../rules/jest/valid-describe-callback.md | 2 +- .../usage/linter/rules/jest/valid-expect.md | 2 +- .../usage/linter/rules/jest/valid-title.md | 2 +- .../usage/linter/rules/jsdoc/check-access.md | 2 +- .../rules/jsdoc/check-property-names.md | 2 +- .../linter/rules/jsdoc/check-tag-names.md | 2 +- .../usage/linter/rules/jsdoc/empty-tags.md | 2 +- .../rules/jsdoc/implements-on-classes.md | 2 +- .../usage/linter/rules/jsdoc/no-defaults.md | 2 +- .../rules/jsdoc/require-param-description.md | 2 +- .../linter/rules/jsdoc/require-param-name.md | 2 +- .../linter/rules/jsdoc/require-param-type.md | 2 +- .../usage/linter/rules/jsdoc/require-param.md | 2 +- .../jsdoc/require-property-description.md | 2 +- .../rules/jsdoc/require-property-name.md | 2 +- .../rules/jsdoc/require-property-type.md | 2 +- .../linter/rules/jsdoc/require-property.md | 2 +- .../jsdoc/require-returns-description.md | 2 +- .../rules/jsdoc/require-returns-type.md | 2 +- .../linter/rules/jsdoc/require-returns.md | 2 +- .../linter/rules/jsdoc/require-yields.md | 2 +- .../usage/linter/rules/jsx_a11y/alt-text.md | 2 +- .../rules/jsx_a11y/anchor-ambiguous-text.md | 2 +- .../rules/jsx_a11y/anchor-has-content.md | 2 +- .../linter/rules/jsx_a11y/anchor-is-valid.md | 2 +- .../aria-activedescendant-has-tabindex.md | 2 +- .../usage/linter/rules/jsx_a11y/aria-props.md | 2 +- .../usage/linter/rules/jsx_a11y/aria-role.md | 2 +- .../jsx_a11y/aria-unsupported-elements.md | 2 +- .../rules/jsx_a11y/autocomplete-valid.md | 2 +- .../jsx_a11y/click-events-have-key-events.md | 2 +- .../rules/jsx_a11y/heading-has-content.md | 2 +- .../linter/rules/jsx_a11y/html-has-lang.md | 2 +- .../linter/rules/jsx_a11y/iframe-has-title.md | 2 +- .../rules/jsx_a11y/img-redundant-alt.md | 2 +- .../jsx_a11y/label-has-associated-control.md | 2 +- .../guide/usage/linter/rules/jsx_a11y/lang.md | 2 +- .../rules/jsx_a11y/media-has-caption.md | 2 +- .../jsx_a11y/mouse-events-have-key-events.md | 2 +- .../linter/rules/jsx_a11y/no-access-key.md | 2 +- .../jsx_a11y/no-aria-hidden-on-focusable.md | 2 +- .../linter/rules/jsx_a11y/no-autofocus.md | 2 +- .../rules/jsx_a11y/no-distracting-elements.md | 2 +- .../jsx_a11y/no-noninteractive-tabindex.md | 49 ++++++++ .../rules/jsx_a11y/no-redundant-roles.md | 2 +- .../rules/jsx_a11y/prefer-tag-over-role.md | 2 +- .../jsx_a11y/role-has-required-aria-props.md | 2 +- .../jsx_a11y/role-supports-aria-props.md | 2 +- .../usage/linter/rules/jsx_a11y/scope.md | 2 +- .../rules/jsx_a11y/tabindex-no-positive.md | 2 +- .../rules/nextjs/google-font-display.md | 2 +- .../rules/nextjs/google-font-preconnect.md | 2 +- .../linter/rules/nextjs/inline-script-id.md | 2 +- .../linter/rules/nextjs/next-script-for-ga.md | 2 +- .../rules/nextjs/no-assign-module-variable.md | 2 +- .../rules/nextjs/no-async-client-component.md | 2 +- ...ore-interactive-script-outside-document.md | 2 +- .../usage/linter/rules/nextjs/no-css-tags.md | 2 +- .../nextjs/no-document-import-in-page.md | 2 +- .../linter/rules/nextjs/no-duplicate-head.md | 2 +- .../linter/rules/nextjs/no-head-element.md | 2 +- .../nextjs/no-head-import-in-document.md | 2 +- .../linter/rules/nextjs/no-img-element.md | 2 +- .../rules/nextjs/no-page-custom-font.md | 2 +- .../nextjs/no-script-component-in-head.md | 2 +- .../rules/nextjs/no-styled-jsx-in-document.md | 2 +- .../linter/rules/nextjs/no-sync-scripts.md | 2 +- .../rules/nextjs/no-title-in-document-head.md | 2 +- .../usage/linter/rules/nextjs/no-typos.md | 2 +- .../rules/nextjs/no-unwanted-polyfillio.md | 2 +- .../linter/rules/node/no-exports-assign.md | 2 +- .../usage/linter/rules/node/no-new-require.md | 2 +- .../usage/linter/rules/oxc/approx-constant.md | 2 +- .../oxc/bad-array-method-on-arguments.md | 2 +- .../linter/rules/oxc/bad-bitwise-operator.md | 2 +- .../rules/oxc/bad-char-at-comparison.md | 2 +- .../rules/oxc/bad-comparison-sequence.md | 2 +- .../linter/rules/oxc/bad-min-max-func.md | 2 +- .../oxc/bad-object-literal-comparison.md | 2 +- .../linter/rules/oxc/bad-replace-all-arg.md | 2 +- .../linter/rules/oxc/const-comparisons.md | 2 +- .../linter/rules/oxc/double-comparisons.md | 2 +- .../usage/linter/rules/oxc/erasing-op.md | 2 +- .../rules/oxc/misrefactored-assign-op.md | 2 +- .../usage/linter/rules/oxc/missing-throw.md | 2 +- .../rules/oxc/no-accumulating-spread.md | 2 +- .../usage/linter/rules/oxc/no-async-await.md | 2 +- .../rules/oxc/no-async-endpoint-handlers.md | 2 +- .../usage/linter/rules/oxc/no-barrel-file.md | 2 +- .../usage/linter/rules/oxc/no-const-enum.md | 2 +- .../usage/linter/rules/oxc/no-map-spread.md | 2 +- .../linter/rules/oxc/no-optional-chaining.md | 2 +- .../rules/oxc/no-rest-spread-properties.md | 2 +- .../rules/oxc/number-arg-out-of-range.md | 2 +- .../rules/oxc/only-used-in-recursion.md | 2 +- .../rules/oxc/uninvoked-array-callback.md | 2 +- .../usage/linter/rules/promise/avoid-new.md | 2 +- .../linter/rules/promise/catch-or-return.md | 2 +- .../rules/promise/no-callback-in-promise.md | 2 +- .../linter/rules/promise/no-new-statics.md | 2 +- .../rules/promise/no-promise-in-callback.md | 2 +- .../rules/promise/no-return-in-finally.md | 2 +- .../usage/linter/rules/promise/param-names.md | 2 +- .../promise/prefer-await-to-callbacks.md | 2 +- .../rules/promise/prefer-await-to-then.md | 2 +- .../usage/linter/rules/promise/spec-only.md | 2 +- .../linter/rules/promise/valid-params.md | 2 +- .../linter/rules/react/button-has-type.md | 2 +- .../checked-requires-onchange-or-readonly.md | 2 +- .../linter/rules/react/exhaustive-deps.md | 2 +- .../rules/react/iframe-missing-sandbox.md | 2 +- .../linter/rules/react/jsx-boolean-value.md | 2 +- .../rules/react/jsx-curly-brace-presence.md | 2 +- .../guide/usage/linter/rules/react/jsx-key.md | 2 +- .../rules/react/jsx-no-comment-textnodes.md | 2 +- .../rules/react/jsx-no-duplicate-props.md | 2 +- .../linter/rules/react/jsx-no-script-url.md | 2 +- .../linter/rules/react/jsx-no-target-blank.md | 2 +- .../usage/linter/rules/react/jsx-no-undef.md | 2 +- .../rules/react/jsx-no-useless-fragment.md | 2 +- .../rules/react/jsx-props-no-spread-multi.md | 2 +- .../linter/rules/react/no-array-index-key.md | 2 +- .../linter/rules/react/no-children-prop.md | 2 +- .../rules/react/no-danger-with-children.md | 2 +- .../usage/linter/rules/react/no-danger.md | 2 +- .../rules/react/no-direct-mutation-state.md | 2 +- .../linter/rules/react/no-find-dom-node.md | 2 +- .../usage/linter/rules/react/no-is-mounted.md | 2 +- .../rules/react/no-render-return-value.md | 2 +- .../usage/linter/rules/react/no-set-state.md | 2 +- .../linter/rules/react/no-string-refs.md | 2 +- .../rules/react/no-unescaped-entities.md | 2 +- .../linter/rules/react/no-unknown-property.md | 2 +- .../linter/rules/react/prefer-es6-class.md | 2 +- .../linter/rules/react/react-in-jsx-scope.md | 2 +- .../rules/react/require-render-return.md | 2 +- .../linter/rules/react/rules-of-hooks.md | 4 +- .../linter/rules/react/self-closing-comp.md | 2 +- .../linter/rules/react/style-prop-object.md | 2 +- .../react/void-dom-elements-no-children.md | 2 +- .../rules/react_perf/jsx-no-jsx-as-prop.md | 2 +- .../react_perf/jsx-no-new-array-as-prop.md | 2 +- .../react_perf/jsx-no-new-function-as-prop.md | 2 +- .../react_perf/jsx-no-new-object-as-prop.md | 2 +- .../adjacent-overload-signatures.md | 2 +- .../linter/rules/typescript/array-type.md | 2 +- .../linter/rules/typescript/ban-ts-comment.md | 2 +- .../rules/typescript/ban-tslint-comment.md | 2 +- .../linter/rules/typescript/ban-types.md | 2 +- .../consistent-generic-constructors.md | 2 +- .../consistent-indexed-object-style.md | 2 +- .../typescript/consistent-type-definitions.md | 2 +- .../typescript/consistent-type-imports.md | 2 +- .../explicit-function-return-type.md | 2 +- .../no-confusing-non-null-assertion.md | 2 +- .../typescript/no-duplicate-enum-values.md | 2 +- .../rules/typescript/no-dynamic-delete.md | 2 +- .../rules/typescript/no-empty-interface.md | 2 +- .../rules/typescript/no-empty-object-type.md | 2 +- .../rules/typescript/no-explicit-any.md | 2 +- .../typescript/no-extra-non-null-assertion.md | 2 +- .../rules/typescript/no-extraneous-class.md | 2 +- .../typescript/no-import-type-side-effects.md | 2 +- .../rules/typescript/no-inferrable-types.md | 2 +- .../linter/rules/typescript/no-misused-new.md | 2 +- .../linter/rules/typescript/no-namespace.md | 2 +- ...no-non-null-asserted-nullish-coalescing.md | 2 +- .../no-non-null-asserted-optional-chain.md | 2 +- .../rules/typescript/no-non-null-assertion.md | 2 +- .../rules/typescript/no-require-imports.md | 2 +- .../linter/rules/typescript/no-this-alias.md | 2 +- .../no-unnecessary-type-constraint.md | 2 +- .../no-unsafe-declaration-merging.md | 2 +- .../typescript/no-unsafe-function-type.md | 2 +- .../typescript/no-useless-empty-export.md | 2 +- .../rules/typescript/no-var-requires.md | 2 +- .../typescript/no-wrapper-object-types.md | 2 +- .../rules/typescript/prefer-as-const.md | 2 +- .../typescript/prefer-enum-initializers.md | 2 +- .../linter/rules/typescript/prefer-for-of.md | 2 +- .../rules/typescript/prefer-function-type.md | 2 +- .../typescript/prefer-literal-enum-member.md | 2 +- .../typescript/prefer-namespace-keyword.md | 2 +- .../typescript/prefer-ts-expect-error.md | 2 +- .../typescript/triple-slash-reference.md | 2 +- .../linter/rules/unicorn/catch-error-name.md | 2 +- .../unicorn/consistent-empty-array-spread.md | 2 +- .../consistent-existence-index-check.md | 2 +- .../unicorn/consistent-function-scoping.md | 2 +- .../rules/unicorn/empty-brace-spaces.md | 2 +- .../linter/rules/unicorn/error-message.md | 2 +- .../usage/linter/rules/unicorn/escape-case.md | 2 +- .../rules/unicorn/explicit-length-check.md | 2 +- .../linter/rules/unicorn/filename-case.md | 2 +- .../linter/rules/unicorn/new-for-builtins.md | 2 +- .../unicorn/no-abusive-eslint-disable.md | 2 +- .../unicorn/no-anonymous-default-export.md | 2 +- .../linter/rules/unicorn/no-array-for-each.md | 2 +- .../linter/rules/unicorn/no-array-reduce.md | 2 +- .../unicorn/no-await-expression-member.md | 2 +- .../unicorn/no-await-in-promise-methods.md | 2 +- .../linter/rules/unicorn/no-console-spaces.md | 2 +- .../rules/unicorn/no-document-cookie.md | 2 +- .../linter/rules/unicorn/no-empty-file.md | 2 +- .../linter/rules/unicorn/no-hex-escape.md | 2 +- .../rules/unicorn/no-instanceof-array.md | 2 +- .../no-invalid-remove-event-listener.md | 2 +- .../rules/unicorn/no-length-as-slice-end.md | 2 +- .../linter/rules/unicorn/no-lonely-if.md | 2 +- .../unicorn/no-magic-array-flat-depth.md | 2 +- .../unicorn/no-negation-in-equality-check.md | 2 +- .../linter/rules/unicorn/no-nested-ternary.md | 2 +- .../linter/rules/unicorn/no-new-array.md | 2 +- .../linter/rules/unicorn/no-new-buffer.md | 2 +- .../usage/linter/rules/unicorn/no-null.md | 2 +- .../unicorn/no-object-as-default-parameter.md | 2 +- .../linter/rules/unicorn/no-process-exit.md | 2 +- .../no-single-promise-in-promise-methods.md | 2 +- .../rules/unicorn/no-static-only-class.md | 2 +- .../usage/linter/rules/unicorn/no-thenable.md | 2 +- .../rules/unicorn/no-this-assignment.md | 2 +- .../rules/unicorn/no-typeof-undefined.md | 2 +- .../rules/unicorn/no-unnecessary-await.md | 2 +- .../no-unreadable-array-destructuring.md | 2 +- .../rules/unicorn/no-unreadable-iife.md | 2 +- .../unicorn/no-useless-fallback-in-spread.md | 2 +- .../rules/unicorn/no-useless-length-check.md | 2 +- .../no-useless-promise-resolve-reject.md | 2 +- .../linter/rules/unicorn/no-useless-spread.md | 2 +- .../rules/unicorn/no-useless-switch-case.md | 2 +- .../rules/unicorn/no-useless-undefined.md | 2 +- .../linter/rules/unicorn/no-zero-fractions.md | 2 +- .../rules/unicorn/number-literal-case.md | 2 +- .../rules/unicorn/numeric-separators-style.md | 2 +- .../unicorn/prefer-add-event-listener.md | 2 +- .../rules/unicorn/prefer-array-flat-map.md | 2 +- .../linter/rules/unicorn/prefer-array-flat.md | 2 +- .../linter/rules/unicorn/prefer-array-some.md | 2 +- .../unicorn/prefer-blob-reading-methods.md | 2 +- .../linter/rules/unicorn/prefer-code-point.md | 2 +- .../linter/rules/unicorn/prefer-date-now.md | 2 +- .../rules/unicorn/prefer-dom-node-append.md | 2 +- .../rules/unicorn/prefer-dom-node-dataset.md | 2 +- .../rules/unicorn/prefer-dom-node-remove.md | 2 +- .../unicorn/prefer-dom-node-text-content.md | 2 +- .../rules/unicorn/prefer-event-target.md | 2 +- .../linter/rules/unicorn/prefer-includes.md | 2 +- .../prefer-logical-operator-over-ternary.md | 2 +- .../rules/unicorn/prefer-math-min-max.md | 2 +- .../linter/rules/unicorn/prefer-math-trunc.md | 2 +- .../rules/unicorn/prefer-modern-dom-apis.md | 2 +- .../rules/unicorn/prefer-modern-math-apis.md | 2 +- .../prefer-native-coercion-functions.md | 2 +- .../rules/unicorn/prefer-negative-index.md | 2 +- .../rules/unicorn/prefer-node-protocol.md | 2 +- .../rules/unicorn/prefer-number-properties.md | 2 +- .../unicorn/prefer-optional-catch-binding.md | 2 +- .../rules/unicorn/prefer-prototype-methods.md | 2 +- .../rules/unicorn/prefer-query-selector.md | 2 +- .../rules/unicorn/prefer-reflect-apply.md | 2 +- .../rules/unicorn/prefer-regexp-test.md | 2 +- .../linter/rules/unicorn/prefer-set-has.md | 2 +- .../linter/rules/unicorn/prefer-set-size.md | 2 +- .../linter/rules/unicorn/prefer-string-raw.md | 2 +- .../unicorn/prefer-string-replace-all.md | 2 +- .../rules/unicorn/prefer-string-slice.md | 2 +- .../unicorn/prefer-string-starts-ends-with.md | 2 +- .../unicorn/prefer-string-trim-start-end.md | 2 +- .../rules/unicorn/prefer-structured-clone.md | 2 +- .../linter/rules/unicorn/prefer-type-error.md | 2 +- .../unicorn/require-array-join-separator.md | 2 +- ...require-number-to-fixed-digits-argument.md | 2 +- .../rules/unicorn/switch-case-braces.md | 2 +- .../unicorn/text-encoding-identifier-case.md | 2 +- .../linter/rules/unicorn/throw-new-error.md | 2 +- .../rules/vitest/no-conditional-tests.md | 2 +- .../rules/vitest/no-import-node-test.md | 2 +- .../usage/linter/rules/vitest/prefer-each.md | 2 +- .../linter/rules/vitest/prefer-to-be-falsy.md | 2 +- .../rules/vitest/prefer-to-be-object.md | 2 +- .../rules/vitest/prefer-to-be-truthy.md | 2 +- ...l-test-context-for-concurrent-snapshots.md | 2 +- 474 files changed, 1044 insertions(+), 472 deletions(-) create mode 100644 src/docs/guide/usage/linter/rules/eslint/no-extra-label.md create mode 100644 src/docs/guide/usage/linter/rules/eslint/no-labels.md create mode 100644 src/docs/guide/usage/linter/rules/eslint/no-multi-assign.md create mode 100644 src/docs/guide/usage/linter/rules/eslint/no-negated-condition.md create mode 100644 src/docs/guide/usage/linter/rules/eslint/no-nested-ternary.md create mode 100644 src/docs/guide/usage/linter/rules/eslint/prefer-rest-params.md create mode 100644 src/docs/guide/usage/linter/rules/eslint/vars-on-top.md create mode 100644 src/docs/guide/usage/linter/rules/jsx_a11y/no-noninteractive-tabindex.md diff --git a/src/docs/guide/usage/linter/generated-rules.md b/src/docs/guide/usage/linter/generated-rules.md index 8b17001922..f9ff2c1d4d 100644 --- a/src/docs/guide/usage/linter/generated-rules.md +++ b/src/docs/guide/usage/linter/generated-rules.md @@ -2,7 +2,7 @@ The progress of all rule implementations is tracked [here](https://github.com/oxc-project/oxc/issues/481). -- Total number of rules: 466 +- Total number of rules: 473 - Rules turned on by default: 97 **Legend for 'Fixable?' column:** @@ -67,7 +67,6 @@ Code that is outright wrong or useless. | [use-isnan](/docs/guide/usage/linter/rules/eslint/use-isnan.html) | eslint | ✅ | 🛠️ | | [valid-typeof](/docs/guide/usage/linter/rules/eslint/valid-typeof.html) | eslint | ✅ | 🛠️ | | [default](/docs/guide/usage/linter/rules/import/default.html) | import | | | -| [named](/docs/guide/usage/linter/rules/import/named.html) | import | | | | [namespace](/docs/guide/usage/linter/rules/import/namespace.html) | import | | | | [expect-expect](/docs/guide/usage/linter/rules/jest/expect-expect.html) | jest | | | | [no-conditional-expect](/docs/guide/usage/linter/rules/jest/no-conditional-expect.html) | jest | | | @@ -109,6 +108,7 @@ Code that is outright wrong or useless. | [no-aria-hidden-on-focusable](/docs/guide/usage/linter/rules/jsx_a11y/no-aria-hidden-on-focusable.html) | jsx_a11y | | 🛠️ | | [no-autofocus](/docs/guide/usage/linter/rules/jsx_a11y/no-autofocus.html) | jsx_a11y | | 🛠️ | | [no-distracting-elements](/docs/guide/usage/linter/rules/jsx_a11y/no-distracting-elements.html) | jsx_a11y | | | +| [no-noninteractive-tabindex](/docs/guide/usage/linter/rules/jsx_a11y/no-noninteractive-tabindex.html) | jsx_a11y | | | | [no-redundant-roles](/docs/guide/usage/linter/rules/jsx_a11y/no-redundant-roles.html) | jsx_a11y | | 🛠️ | | [prefer-tag-over-role](/docs/guide/usage/linter/rules/jsx_a11y/prefer-tag-over-role.html) | jsx_a11y | | | | [role-has-required-aria-props](/docs/guide/usage/linter/rules/jsx_a11y/role-has-required-aria-props.html) | jsx_a11y | | | @@ -318,6 +318,7 @@ Lints which are rather strict or have occasional false positives. | [no-else-return](/docs/guide/usage/linter/rules/eslint/no-else-return.html) | eslint | | 🛠️ | | [no-fallthrough](/docs/guide/usage/linter/rules/eslint/no-fallthrough.html) | eslint | | 🚧 | | [no-inner-declarations](/docs/guide/usage/linter/rules/eslint/no-inner-declarations.html) | eslint | | | +| [no-negated-condition](/docs/guide/usage/linter/rules/eslint/no-negated-condition.html) | eslint | | 🚧 | | [no-new-wrappers](/docs/guide/usage/linter/rules/eslint/no-new-wrappers.html) | eslint | | 🚧 | | [no-object-constructor](/docs/guide/usage/linter/rules/eslint/no-object-constructor.html) | eslint | | 🚧 | | [no-prototype-builtins](/docs/guide/usage/linter/rules/eslint/no-prototype-builtins.html) | eslint | | | @@ -353,7 +354,6 @@ Lints which are rather strict or have occasional false positives. | [no-hex-escape](/docs/guide/usage/linter/rules/unicorn/no-hex-escape.html) | unicorn | | 🛠️ | | [no-instanceof-array](/docs/guide/usage/linter/rules/unicorn/no-instanceof-array.html) | unicorn | | 🛠️ | | [no-lonely-if](/docs/guide/usage/linter/rules/unicorn/no-lonely-if.html) | unicorn | | | -| [no-negated-condition](/docs/guide/usage/linter/rules/unicorn/no-negated-condition.html) | unicorn | | 🚧 | | [no-negation-in-equality-check](/docs/guide/usage/linter/rules/unicorn/no-negation-in-equality-check.html) | unicorn | | 🚧 | | [no-new-buffer](/docs/guide/usage/linter/rules/unicorn/no-new-buffer.html) | unicorn | | 🚧 | | [no-object-as-default-parameter](/docs/guide/usage/linter/rules/unicorn/no-object-as-default-parameter.html) | unicorn | | | @@ -384,7 +384,7 @@ Lints which are rather strict or have occasional false positives. | [prefer-type-error](/docs/guide/usage/linter/rules/unicorn/prefer-type-error.html) | unicorn | | 🛠️ | | [require-number-to-fixed-digits-argument](/docs/guide/usage/linter/rules/unicorn/require-number-to-fixed-digits-argument.html) | unicorn | | 🛠️ | -## Style (114): +## Style (120): Code that should be written in a more idiomatic way. | Rule name | Source | Default | Fixable? | @@ -396,9 +396,13 @@ Code that should be written in a more idiomatic way. | [max-params](/docs/guide/usage/linter/rules/eslint/max-params.html) | eslint | | | | [no-continue](/docs/guide/usage/linter/rules/eslint/no-continue.html) | eslint | | | | [no-duplicate-imports](/docs/guide/usage/linter/rules/eslint/no-duplicate-imports.html) | eslint | | 🚧 | +| [no-extra-label](/docs/guide/usage/linter/rules/eslint/no-extra-label.html) | eslint | | 🛠️ | | [no-label-var](/docs/guide/usage/linter/rules/eslint/no-label-var.html) | eslint | | | +| [no-labels](/docs/guide/usage/linter/rules/eslint/no-labels.html) | eslint | | | | [no-magic-numbers](/docs/guide/usage/linter/rules/eslint/no-magic-numbers.html) | eslint | | 🚧 | +| [no-multi-assign](/docs/guide/usage/linter/rules/eslint/no-multi-assign.html) | eslint | | | | [no-multi-str](/docs/guide/usage/linter/rules/eslint/no-multi-str.html) | eslint | | | +| [no-nested-ternary](/docs/guide/usage/linter/rules/eslint/no-nested-ternary.html) | eslint | | | | [no-new-func](/docs/guide/usage/linter/rules/eslint/no-new-func.html) | eslint | | | | [no-return-assign](/docs/guide/usage/linter/rules/eslint/no-return-assign.html) | eslint | | 🚧 | | [no-script-url](/docs/guide/usage/linter/rules/eslint/no-script-url.html) | eslint | | | @@ -407,9 +411,11 @@ Code that should be written in a more idiomatic way. | [prefer-exponentiation-operator](/docs/guide/usage/linter/rules/eslint/prefer-exponentiation-operator.html) | eslint | | | | [prefer-numeric-literals](/docs/guide/usage/linter/rules/eslint/prefer-numeric-literals.html) | eslint | | 🛠️ | | [prefer-object-has-own](/docs/guide/usage/linter/rules/eslint/prefer-object-has-own.html) | eslint | | 🛠️ | +| [prefer-rest-params](/docs/guide/usage/linter/rules/eslint/prefer-rest-params.html) | eslint | | | | [prefer-spread](/docs/guide/usage/linter/rules/eslint/prefer-spread.html) | eslint | | 🛠️ | | [sort-imports](/docs/guide/usage/linter/rules/eslint/sort-imports.html) | eslint | | 🛠️ | | [sort-keys](/docs/guide/usage/linter/rules/eslint/sort-keys.html) | eslint | | 🚧 | +| [vars-on-top](/docs/guide/usage/linter/rules/eslint/vars-on-top.html) | eslint | | | | [yoda](/docs/guide/usage/linter/rules/eslint/yoda.html) | eslint | | 🛠️ | | [first](/docs/guide/usage/linter/rules/import/first.html) | import | | 🚧 | | [no-named-default](/docs/guide/usage/linter/rules/import/no-named-default.html) | import | | | @@ -504,7 +510,7 @@ Code that should be written in a more idiomatic way. | [prefer-to-be-object](/docs/guide/usage/linter/rules/vitest/prefer-to-be-object.html) | vitest | | 🛠️ | | [prefer-to-be-truthy](/docs/guide/usage/linter/rules/vitest/prefer-to-be-truthy.html) | vitest | | 🛠️ | -## Nursery (11): +## Nursery (12): New lints that are still under development. | Rule name | Source | Default | Fixable? | @@ -515,6 +521,7 @@ New lints that are still under development. | [no-undef](/docs/guide/usage/linter/rules/eslint/no-undef.html) | eslint | | | | [no-unreachable](/docs/guide/usage/linter/rules/eslint/no-unreachable.html) | eslint | | | | [export](/docs/guide/usage/linter/rules/import/export.html) | import | | | +| [named](/docs/guide/usage/linter/rules/import/named.html) | import | | | | [no-map-spread](/docs/guide/usage/linter/rules/oxc/no-map-spread.html) | oxc | | 🛠️💡 | | [no-return-in-finally](/docs/guide/usage/linter/rules/promise/no-return-in-finally.html) | promise | | | | [exhaustive-deps](/docs/guide/usage/linter/rules/react/exhaustive-deps.html) | react | | | diff --git a/src/docs/guide/usage/linter/rules/eslint/array-callback-return.md b/src/docs/guide/usage/linter/rules/eslint/array-callback-return.md index 06e3ce8e83..6fc5820eb3 100644 --- a/src/docs/guide/usage/linter/rules/eslint/array-callback-return.md +++ b/src/docs/guide/usage/linter/rules/eslint/array-callback-return.md @@ -27,4 +27,4 @@ foo.map((a) => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/array_callback_return/mod.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/array_callback_return/mod.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/constructor-super.md b/src/docs/guide/usage/linter/rules/eslint/constructor-super.md index af15908767..0274ba7397 100644 --- a/src/docs/guide/usage/linter/rules/eslint/constructor-super.md +++ b/src/docs/guide/usage/linter/rules/eslint/constructor-super.md @@ -21,4 +21,4 @@ class A extends B { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/constructor_super.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/constructor_super.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/default-case-last.md b/src/docs/guide/usage/linter/rules/eslint/default-case-last.md index 2463e8b7ed..134e1b1be4 100644 --- a/src/docs/guide/usage/linter/rules/eslint/default-case-last.md +++ b/src/docs/guide/usage/linter/rules/eslint/default-case-last.md @@ -43,4 +43,4 @@ switch (foo) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/default_case_last.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/default_case_last.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/default-case.md b/src/docs/guide/usage/linter/rules/eslint/default-case.md index 79685ab021..3185525e98 100644 --- a/src/docs/guide/usage/linter/rules/eslint/default-case.md +++ b/src/docs/guide/usage/linter/rules/eslint/default-case.md @@ -25,4 +25,4 @@ switch (foo) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/default_case.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/default_case.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/default-param-last.md b/src/docs/guide/usage/linter/rules/eslint/default-param-last.md index 8e627dba1c..cd08319adb 100644 --- a/src/docs/guide/usage/linter/rules/eslint/default-param-last.md +++ b/src/docs/guide/usage/linter/rules/eslint/default-param-last.md @@ -27,4 +27,4 @@ createUser(undefined, "tabby"); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/default_param_last.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/default_param_last.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/eqeqeq.md b/src/docs/guide/usage/linter/rules/eslint/eqeqeq.md index 431003d9bf..ece8a4f714 100644 --- a/src/docs/guide/usage/linter/rules/eslint/eqeqeq.md +++ b/src/docs/guide/usage/linter/rules/eslint/eqeqeq.md @@ -26,4 +26,4 @@ a == b; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/eqeqeq.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/eqeqeq.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/for-direction.md b/src/docs/guide/usage/linter/rules/eslint/for-direction.md index a65f53b5d3..387f2aa732 100644 --- a/src/docs/guide/usage/linter/rules/eslint/for-direction.md +++ b/src/docs/guide/usage/linter/rules/eslint/for-direction.md @@ -66,4 +66,4 @@ for (let i = MIN; i <= MAX; i -= 0) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/for_direction.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/for_direction.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/func-names.md b/src/docs/guide/usage/linter/rules/eslint/func-names.md index d521bb83e3..7bdd03e295 100644 --- a/src/docs/guide/usage/linter/rules/eslint/func-names.md +++ b/src/docs/guide/usage/linter/rules/eslint/func-names.md @@ -80,4 +80,4 @@ Foo.prototype.bar = function () {}; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/func_names.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/func_names.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/getter-return.md b/src/docs/guide/usage/linter/rules/eslint/getter-return.md index 90e4237e91..9e5ee9fe35 100644 --- a/src/docs/guide/usage/linter/rules/eslint/getter-return.md +++ b/src/docs/guide/usage/linter/rules/eslint/getter-return.md @@ -46,4 +46,4 @@ class Person { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/getter_return.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/getter_return.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/guard-for-in.md b/src/docs/guide/usage/linter/rules/eslint/guard-for-in.md index 4035f64c16..287761a8da 100644 --- a/src/docs/guide/usage/linter/rules/eslint/guard-for-in.md +++ b/src/docs/guide/usage/linter/rules/eslint/guard-for-in.md @@ -21,4 +21,4 @@ for (key in foo) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/guard_for_in.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/guard_for_in.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/max-classes-per-file.md b/src/docs/guide/usage/linter/rules/eslint/max-classes-per-file.md index abfc202668..2c3cf80af9 100644 --- a/src/docs/guide/usage/linter/rules/eslint/max-classes-per-file.md +++ b/src/docs/guide/usage/linter/rules/eslint/max-classes-per-file.md @@ -23,4 +23,4 @@ class Bar {} ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/max_classes_per_file.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/max_classes_per_file.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/max-lines.md b/src/docs/guide/usage/linter/rules/eslint/max-lines.md index 2b43a7d185..07d8c52f7e 100644 --- a/src/docs/guide/usage/linter/rules/eslint/max-lines.md +++ b/src/docs/guide/usage/linter/rules/eslint/max-lines.md @@ -19,4 +19,4 @@ Recommendations usually range from 100 to 500 lines. ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/max_lines.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/max_lines.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/max-params.md b/src/docs/guide/usage/linter/rules/eslint/max-params.md index 5dd33ec6d0..9e7d7a90b6 100644 --- a/src/docs/guide/usage/linter/rules/eslint/max-params.md +++ b/src/docs/guide/usage/linter/rules/eslint/max-params.md @@ -23,4 +23,4 @@ function foo(bar, baz, qux, qxx) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/max_params.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/max_params.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-alert.md b/src/docs/guide/usage/linter/rules/eslint/no-alert.md index 64740cf0a0..19d13f7176 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-alert.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-alert.md @@ -43,4 +43,4 @@ function foo() { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_alert.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_alert.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-array-constructor.md b/src/docs/guide/usage/linter/rules/eslint/no-array-constructor.md index 3be5768904..0ed4706938 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-array-constructor.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-array-constructor.md @@ -39,4 +39,4 @@ let arr3 = new Array(9); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_array_constructor.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_array_constructor.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-async-promise-executor.md b/src/docs/guide/usage/linter/rules/eslint/no-async-promise-executor.md index 0a8b61a5f0..3f19a4f42c 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-async-promise-executor.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-async-promise-executor.md @@ -39,4 +39,4 @@ The executor function can also be an `async function`. However, this is usually ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_async_promise_executor.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_async_promise_executor.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-await-in-loop.md b/src/docs/guide/usage/linter/rules/eslint/no-await-in-loop.md index 06a15169d1..8d63174ad8 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-await-in-loop.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-await-in-loop.md @@ -36,4 +36,4 @@ async function good() { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_await_in_loop.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_await_in_loop.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-bitwise.md b/src/docs/guide/usage/linter/rules/eslint/no-bitwise.md index b8df8da58a..8c99dda543 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-bitwise.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-bitwise.md @@ -22,4 +22,4 @@ var x = y | z; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_bitwise.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_bitwise.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-caller.md b/src/docs/guide/usage/linter/rules/eslint/no-caller.md index 414a2fd033..c9483112b0 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-caller.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-caller.md @@ -65,4 +65,4 @@ function foo(n) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_caller.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_caller.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-case-declarations.md b/src/docs/guide/usage/linter/rules/eslint/no-case-declarations.md index 3f0cf558c6..0e8f8b8883 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-case-declarations.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-case-declarations.md @@ -35,4 +35,4 @@ switch (foo) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_case_declarations.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_case_declarations.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-class-assign.md b/src/docs/guide/usage/linter/rules/eslint/no-class-assign.md index 55c00724dd..521e786e95 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-class-assign.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-class-assign.md @@ -27,4 +27,4 @@ let a = new A(); // Error ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_class_assign.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_class_assign.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-compare-neg-zero.md b/src/docs/guide/usage/linter/rules/eslint/no-compare-neg-zero.md index db02107a6a..0605e6e6e6 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-compare-neg-zero.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-compare-neg-zero.md @@ -30,4 +30,4 @@ if (x === -0) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_compare_neg_zero.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_compare_neg_zero.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-cond-assign.md b/src/docs/guide/usage/linter/rules/eslint/no-cond-assign.md index 78a1fa4cc9..50f8cdb3c5 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-cond-assign.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-cond-assign.md @@ -32,4 +32,4 @@ if ((user.jobTitle = "manager")) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_cond_assign.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_cond_assign.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-console.md b/src/docs/guide/usage/linter/rules/eslint/no-console.md index 51b5000adc..ce8276e6eb 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-console.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-console.md @@ -27,4 +27,4 @@ console.log("here"); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_console.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_console.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-const-assign.md b/src/docs/guide/usage/linter/rules/eslint/no-const-assign.md index 31d214d6cf..c8e1d65dec 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-const-assign.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-const-assign.md @@ -41,4 +41,4 @@ b += 1; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_const_assign.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_const_assign.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-constant-binary-expression.md b/src/docs/guide/usage/linter/rules/eslint/no-constant-binary-expression.md index 5f8388feb3..98fa4fd5d1 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-constant-binary-expression.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-constant-binary-expression.md @@ -40,4 +40,4 @@ const isEmpty = x === []; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_constant_binary_expression.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_constant_binary_expression.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-constant-condition.md b/src/docs/guide/usage/linter/rules/eslint/no-constant-condition.md index d25a5cdb4a..9ed8a04640 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-constant-condition.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-constant-condition.md @@ -57,4 +57,4 @@ while (typeof x === "undefined") { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_constant_condition.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_constant_condition.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-constructor-return.md b/src/docs/guide/usage/linter/rules/eslint/no-constructor-return.md index 838898ce7f..b4c939d0f5 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-constructor-return.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-constructor-return.md @@ -34,4 +34,4 @@ class C { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_constructor_return.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_constructor_return.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-continue.md b/src/docs/guide/usage/linter/rules/eslint/no-continue.md index 9ba9f83bac..c0b8c5eb11 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-continue.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-continue.md @@ -30,4 +30,4 @@ for (i = 0; i < 10; i++) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_continue.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_continue.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-control-regex.md b/src/docs/guide/usage/linter/rules/eslint/no-control-regex.md index 7b2c36e504..72f54d1b15 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-control-regex.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-control-regex.md @@ -49,4 +49,4 @@ var pattern8 = new RegExp("\\n"); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_control_regex.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_control_regex.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-debugger.md b/src/docs/guide/usage/linter/rules/eslint/no-debugger.md index 5305da943d..a9e46cd77e 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-debugger.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-debugger.md @@ -32,4 +32,4 @@ async function main() { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_debugger.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_debugger.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-delete-var.md b/src/docs/guide/usage/linter/rules/eslint/no-delete-var.md index 041ac7ac6d..859b023b18 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-delete-var.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-delete-var.md @@ -29,4 +29,4 @@ delete x; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_delete_var.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_delete_var.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-div-regex.md b/src/docs/guide/usage/linter/rules/eslint/no-div-regex.md index 8173471d70..8d9cb79ef9 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-div-regex.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-div-regex.md @@ -27,4 +27,4 @@ function bar() { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_div_regex.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_div_regex.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-dupe-class-members.md b/src/docs/guide/usage/linter/rules/eslint/no-dupe-class-members.md index b3eb82d7e4..5578b08d0e 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-dupe-class-members.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-dupe-class-members.md @@ -32,4 +32,4 @@ a.foo(); // Uncaught TypeError: a.foo is not a function ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_dupe_class_members.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_dupe_class_members.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-dupe-else-if.md b/src/docs/guide/usage/linter/rules/eslint/no-dupe-else-if.md index 43624cd712..39c2dfbf11 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-dupe-else-if.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-dupe-else-if.md @@ -32,4 +32,4 @@ if (a) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_dupe_else_if.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_dupe_else_if.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-dupe-keys.md b/src/docs/guide/usage/linter/rules/eslint/no-dupe-keys.md index d69f3242de..2cde95938f 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-dupe-keys.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-dupe-keys.md @@ -52,4 +52,4 @@ var foo = { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_dupe_keys.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_dupe_keys.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-duplicate-case.md b/src/docs/guide/usage/linter/rules/eslint/no-duplicate-case.md index b5bfb2b3bf..8a2e2c3173 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-duplicate-case.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-duplicate-case.md @@ -73,4 +73,4 @@ switch (a) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_duplicate_case.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_duplicate_case.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-duplicate-imports.md b/src/docs/guide/usage/linter/rules/eslint/no-duplicate-imports.md index bcddd82464..8928fd3cc1 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-duplicate-imports.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-duplicate-imports.md @@ -35,4 +35,4 @@ import something from "another-module"; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_duplicate_imports.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_duplicate_imports.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-else-return.md b/src/docs/guide/usage/linter/rules/eslint/no-else-return.md index cf24302a73..aa332dc5c0 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-else-return.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-else-return.md @@ -167,4 +167,4 @@ function foo() { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_else_return.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_else_return.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-empty-character-class.md b/src/docs/guide/usage/linter/rules/eslint/no-empty-character-class.md index 081641979f..a6413da531 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-empty-character-class.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-empty-character-class.md @@ -24,4 +24,4 @@ var foo = /^abc[]/; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_empty_character_class.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_empty_character_class.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-empty-function.md b/src/docs/guide/usage/linter/rules/eslint/no-empty-function.md index 8903c43c26..b26784fe5c 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-empty-function.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-empty-function.md @@ -39,4 +39,4 @@ const add = (a, b) => a + b; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_empty_function.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_empty_function.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-empty-pattern.md b/src/docs/guide/usage/linter/rules/eslint/no-empty-pattern.md index 7d57903de7..36196a412f 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-empty-pattern.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-empty-pattern.md @@ -66,4 +66,4 @@ function foo({a = []}) {} ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_empty_pattern.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_empty_pattern.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-empty-static-block.md b/src/docs/guide/usage/linter/rules/eslint/no-empty-static-block.md index cd01c0b51a..6a2ba62f67 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-empty-static-block.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-empty-static-block.md @@ -48,4 +48,4 @@ class Bar { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_empty_static_block.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_empty_static_block.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-empty.md b/src/docs/guide/usage/linter/rules/eslint/no-empty.md index cc3d78e87f..25cdabe201 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-empty.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-empty.md @@ -26,4 +26,4 @@ if (condition) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_empty.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_empty.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-eq-null.md b/src/docs/guide/usage/linter/rules/eslint/no-eq-null.md index 8e49d0eb60..2df32c7afa 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-eq-null.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-eq-null.md @@ -49,4 +49,4 @@ if (bang === undefined) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_eq_null.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_eq_null.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-eval.md b/src/docs/guide/usage/linter/rules/eslint/no-eval.md index 25ad9c8f6f..9b1fb3170b 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-eval.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-eval.md @@ -23,4 +23,4 @@ eval(someString); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_eval.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_eval.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-ex-assign.md b/src/docs/guide/usage/linter/rules/eslint/no-ex-assign.md index 3202f71445..beba6795a6 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-ex-assign.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-ex-assign.md @@ -32,4 +32,4 @@ try { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_ex_assign.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_ex_assign.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-extend-native.md b/src/docs/guide/usage/linter/rules/eslint/no-extend-native.md index 65bffa7078..19d58525ff 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-extend-native.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-extend-native.md @@ -50,4 +50,4 @@ Object.defineProperty(x.prototype, "p", { value: 0 }); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_extend_native.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_extend_native.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-extra-boolean-cast.md b/src/docs/guide/usage/linter/rules/eslint/no-extra-boolean-cast.md index 1497851eb0..d00913cc2c 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-extra-boolean-cast.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-extra-boolean-cast.md @@ -38,4 +38,4 @@ if (!!foo || bar) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_extra_boolean_cast.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_extra_boolean_cast.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-extra-label.md b/src/docs/guide/usage/linter/rules/eslint/no-extra-label.md new file mode 100644 index 0000000000..e8bdc3ba96 --- /dev/null +++ b/src/docs/guide/usage/linter/rules/eslint/no-extra-label.md @@ -0,0 +1,84 @@ + + +# eslint/no-extra-label + +
+ +🛠️ An auto-fix is available for this rule. + +
+ +### What it does + +Disallow unnecessary labels. + +### Why is this bad? + +If a loop contains no nested loops or switches, labeling the loop is unnecessary. + +```js +A: while (a) { + break A; +} +``` + +You can achieve the same result by removing the label and using `break` or `continue` without a label. +Probably those labels would confuse developers because they expect labels to jump to further. + +### Examples + +Examples of **incorrect** code for this rule: + +```js +A: while (a) { + break A; +} + +B: for (let i = 0; i < 10; ++i) { + break B; +} + +C: switch (a) { + case 0: + break C; +} +``` + +Examples of **correct** code for this rule: + +```js +while (a) { + break; +} + +for (let i = 0; i < 10; ++i) { + break; +} + +switch (a) { + case 0: + break; +} + +A: { + break A; +} + +B: while (a) { + while (b) { + break B; + } +} + +C: switch (a) { + case 0: + while (b) { + break C; + } + break; +} +``` + +## References + +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_extra_label.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-fallthrough.md b/src/docs/guide/usage/linter/rules/eslint/no-fallthrough.md index aae5035760..9bc99e3f5f 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-fallthrough.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-fallthrough.md @@ -185,4 +185,4 @@ warning because there is nothing to fall through into. ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_fallthrough.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_fallthrough.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-func-assign.md b/src/docs/guide/usage/linter/rules/eslint/no-func-assign.md index 82021f5f08..c30fb0dc1f 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-func-assign.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-func-assign.md @@ -25,4 +25,4 @@ foo = bar; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_func_assign.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_func_assign.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-global-assign.md b/src/docs/guide/usage/linter/rules/eslint/no-global-assign.md index 3e878499c6..9cb1b75a7c 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-global-assign.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-global-assign.md @@ -24,4 +24,4 @@ Object = null; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_global_assign.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_global_assign.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-import-assign.md b/src/docs/guide/usage/linter/rules/eslint/no-import-assign.md index 39d667eb05..1a493e39d4 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-import-assign.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-import-assign.md @@ -32,4 +32,4 @@ Object.assign(mod_ns, { foo: "foo" }); // ERROR: The members of 'mod_ns' are rea ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_import_assign.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_import_assign.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-inner-declarations.md b/src/docs/guide/usage/linter/rules/eslint/no-inner-declarations.md index 1807ce90a5..5de60e9ac9 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-inner-declarations.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-inner-declarations.md @@ -25,4 +25,4 @@ if (test) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_inner_declarations.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_inner_declarations.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-invalid-regexp.md b/src/docs/guide/usage/linter/rules/eslint/no-invalid-regexp.md index 4dcd93c8e8..dd588c2ee8 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-invalid-regexp.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-invalid-regexp.md @@ -37,4 +37,4 @@ this.RegExp("["); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_invalid_regexp.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_invalid_regexp.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-irregular-whitespace.md b/src/docs/guide/usage/linter/rules/eslint/no-irregular-whitespace.md index df44410b03..eed61096a7 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-irregular-whitespace.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-irregular-whitespace.md @@ -27,4 +27,4 @@ function invalidExample() { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_irregular_whitespace.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_irregular_whitespace.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-iterator.md b/src/docs/guide/usage/linter/rules/eslint/no-iterator.md index d9983330b4..5e479a45dc 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-iterator.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-iterator.md @@ -52,4 +52,4 @@ Foo.prototype[Symbol.iterator] = function () { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_iterator.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_iterator.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-label-var.md b/src/docs/guide/usage/linter/rules/eslint/no-label-var.md index 4a8f2ca2f4..8ab3c93093 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-label-var.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-label-var.md @@ -45,4 +45,4 @@ function bar() { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_label_var.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_label_var.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-labels.md b/src/docs/guide/usage/linter/rules/eslint/no-labels.md new file mode 100644 index 0000000000..9539012b47 --- /dev/null +++ b/src/docs/guide/usage/linter/rules/eslint/no-labels.md @@ -0,0 +1,107 @@ + + +# eslint/no-labels + +
+
+ +### What it does + +Disallow labeled statements. + +### Why is this bad? + +Labeled statements in JavaScript are used in conjunction with `break` and `continue` to control flow around multiple loops. For example: + +```js +outer: while (true) { + while (true) { + break outer; + } +} +``` + +The `break outer` statement ensures that this code will not result in an infinite loop because control is returned to the next statement after the `outer` label was applied. If this statement was changed to be just `break`, control would flow back to the outer `while` statement and an infinite loop would result. +While convenient in some cases, labels tend to be used only rarely and are frowned upon by some as a remedial form of flow control that is more error prone and harder to understand. + +### Examples + +Examples of **incorrect** code for this rule: + +```js +label: while (true) { + // ... +} + +label: while (true) { + break label; +} + +label: while (true) { + continue label; +} + +label: switch (a) { + case 0: + break label; +} + +label: { + break label; +} + +label: if (a) { + break label; +} +``` + +Examples of **correct** code for this rule: + +```js +var f = { + label: "foo", +}; + +while (true) { + break; +} + +while (true) { + continue; +} +``` + +### Options + +The options allow labels with loop or switch statements: + +- `"allowLoop"` (`boolean`, default is `false`) - If this option was set `true`, this rule ignores labels which are sticking to loop statements. +- `"allowSwitch"` (`boolean`, default is `false`) - If this option was set `true`, this rule ignores labels which are sticking to switch statements. + +Actually labeled statements in JavaScript can be used with other than loop and switch statements. +However, this way is ultra rare, not well-known, so this would be confusing developers. + +#### allowLoop + +Examples of **correct** code for the `{ "allowLoop": true }` option: + +```js +label: while (true) { + break label; +} +``` + +#### allowSwitch + +Examples of **correct** code for the `{ "allowSwitch": true }` option: + +```js +label: switch (a) { + case 0: + break label; +} +``` + +## References + +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_labels.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-loss-of-precision.md b/src/docs/guide/usage/linter/rules/eslint/no-loss-of-precision.md index 9ef0b69655..e148291063 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-loss-of-precision.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-loss-of-precision.md @@ -25,4 +25,4 @@ var x = 2e999; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_loss_of_precision.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_loss_of_precision.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-magic-numbers.md b/src/docs/guide/usage/linter/rules/eslint/no-magic-numbers.md index da9b6b79a4..7f0cc6c577 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-magic-numbers.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-magic-numbers.md @@ -134,4 +134,4 @@ type Baz = Parameters[2]; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_magic_numbers.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_magic_numbers.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-multi-assign.md b/src/docs/guide/usage/linter/rules/eslint/no-multi-assign.md new file mode 100644 index 0000000000..12a27e9aa8 --- /dev/null +++ b/src/docs/guide/usage/linter/rules/eslint/no-multi-assign.md @@ -0,0 +1,98 @@ + + +# eslint/no-multi-assign + +
+
+ +### What it does + +Disallow use of chained assignment expressions. + +### Why is this bad? + +Chaining the assignment of variables can lead to unexpected results and be difficult to read. + +```js +(function () { + const foo = (bar = 0); // Did you mean `foo = bar == 0`? + bar = 1; // This will not fail since `bar` is not constant. +})(); +console.log(bar); // This will output 1 since `bar` is not scoped. +``` + +### Examples + +Examples of **incorrect** code for this rule: + +```js +var a = (b = c = 5); + +const foo = (bar = "baz"); + +let d = (e = f); + +class Foo { + a = (b = 10); +} + +a = b = "quux"; +``` + +Examples of **correct** code for this rule: + +```js +var a = 5; +var b = 5; +var c = 5; + +const foo = "baz"; +const bar = "baz"; + +let d = c; +let e = c; + +class Foo { + a = 10; + b = 10; +} + +a = "quux"; +b = "quux"; +``` + +### Options + +This rule has an object option: + +- `"ignoreNonDeclaration"`: When set to `true`, the rule allows chains that don't include initializing a variable in a declaration or initializing a class field. Default is `false`. + +#### ignoreNonDeclaration + +Examples of **correct** code for the `{ "ignoreNonDeclaration": true }` option: + +```js +let a; +let b; +a = b = "baz"; + +const x = {}; +const y = {}; +x.one = y.one = 1; +``` + +Examples of **incorrect** code for the `{ "ignoreNonDeclaration": true }` option: + +```js +let a = (b = "baz"); + +const foo = (bar = 1); + +class Foo { + a = (b = 10); +} +``` + +## References + +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_multi_assign.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-multi-str.md b/src/docs/guide/usage/linter/rules/eslint/no-multi-str.md index 36112174d3..e6d6e3062d 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-multi-str.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-multi-str.md @@ -24,4 +24,4 @@ var x = ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_multi_str.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_multi_str.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-negated-condition.md b/src/docs/guide/usage/linter/rules/eslint/no-negated-condition.md new file mode 100644 index 0000000000..89ae8d8862 --- /dev/null +++ b/src/docs/guide/usage/linter/rules/eslint/no-negated-condition.md @@ -0,0 +1,47 @@ + + +# eslint/no-negated-condition + +
+ +🚧 An auto-fix is still under development. + +
+ +### What it does + +Disallow negated conditions. + +### Why is this bad? + +Negated conditions are more difficult to understand. Code can be made more readable by inverting the condition. + +### Example + +Examples of **incorrect** code for this rule: + +```javascript +if (!a) { + doSomethingC(); +} else { + doSomethingB(); +} + +!a ? doSomethingC() : doSomethingB(); +``` + +Examples of **correct** code for this rule: + +```javascript +if (a) { + doSomethingB(); +} else { + doSomethingC(); +} + +a ? doSomethingB() : doSomethingC(); +``` + +## References + +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_negated_condition.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-nested-ternary.md b/src/docs/guide/usage/linter/rules/eslint/no-nested-ternary.md new file mode 100644 index 0000000000..b0256531a1 --- /dev/null +++ b/src/docs/guide/usage/linter/rules/eslint/no-nested-ternary.md @@ -0,0 +1,37 @@ + + +# eslint/no-nested-ternary + +
+
+ +### What it does + +Disallows nested ternary expressions to improve code readability and maintainability. + +### Why is this bad? + +Nested ternary expressions make code harder to read and understand. They can lead to complex, difficult-to-debug logic. + +### Examples + +Examples of **incorrect** code for this rule: + +```js +const result = condition1 ? (condition2 ? "a" : "b") : "c"; +``` + +Examples of **correct** code for this rule: + +```js +let result; +if (condition1) { + result = condition2 ? "a" : "b"; +} else { + result = "c"; +} +``` + +## References + +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_nested_ternary.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-new-func.md b/src/docs/guide/usage/linter/rules/eslint/no-new-func.md index c6a8af5f52..fa4acdfb3a 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-new-func.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-new-func.md @@ -36,4 +36,4 @@ let x = function (a, b) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_new_func.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_new_func.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-new-native-nonconstructor.md b/src/docs/guide/usage/linter/rules/eslint/no-new-native-nonconstructor.md index 5b47434d84..f96f2e8c55 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-new-native-nonconstructor.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-new-native-nonconstructor.md @@ -40,4 +40,4 @@ let result = BigInt(9007199254740991); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_new_native_nonconstructor.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_new_native_nonconstructor.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-new-wrappers.md b/src/docs/guide/usage/linter/rules/eslint/no-new-wrappers.md index 9540c14088..68bbe764d6 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-new-wrappers.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-new-wrappers.md @@ -43,4 +43,4 @@ var booleanObject = Boolean(value); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_new_wrappers.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_new_wrappers.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-new.md b/src/docs/guide/usage/linter/rules/eslint/no-new.md index 805a535261..11d10b9532 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-new.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-new.md @@ -22,4 +22,4 @@ new Person(); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_new.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_new.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-nonoctal-decimal-escape.md b/src/docs/guide/usage/linter/rules/eslint/no-nonoctal-decimal-escape.md index 5b307d4a6b..837ba04ab6 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-nonoctal-decimal-escape.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-nonoctal-decimal-escape.md @@ -30,4 +30,4 @@ correct: "8"; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_nonoctal_decimal_escape.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_nonoctal_decimal_escape.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-obj-calls.md b/src/docs/guide/usage/linter/rules/eslint/no-obj-calls.md index 24b835644e..fea741ee47 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-obj-calls.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-obj-calls.md @@ -49,4 +49,4 @@ let segmenterFrom = Intl.Segmenter("fr", { granularity: "word" }); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_obj_calls.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_obj_calls.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-object-constructor.md b/src/docs/guide/usage/linter/rules/eslint/no-object-constructor.md index afe16f3de5..9fe7525600 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-object-constructor.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-object-constructor.md @@ -36,4 +36,4 @@ const createObject = (Object) => new Object(); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_object_constructor.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_object_constructor.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-plusplus.md b/src/docs/guide/usage/linter/rules/eslint/no-plusplus.md index c613b7d40c..7e70b2f436 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-plusplus.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-plusplus.md @@ -63,4 +63,4 @@ for (let i = 0; i < l; i += 1) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_plusplus.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_plusplus.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-proto.md b/src/docs/guide/usage/linter/rules/eslint/no-proto.md index 8916c55feb..0d8b83aa45 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-proto.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-proto.md @@ -34,4 +34,4 @@ obj["__proto__"] = b; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_proto.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_proto.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-prototype-builtins.md b/src/docs/guide/usage/linter/rules/eslint/no-prototype-builtins.md index cb7ed3536f..34c3346e1b 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-prototype-builtins.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-prototype-builtins.md @@ -29,4 +29,4 @@ var barIsEnumerable = foo.propertyIsEnumerable("bar"); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_prototype_builtins.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_prototype_builtins.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-redeclare.md b/src/docs/guide/usage/linter/rules/eslint/no-redeclare.md index 01f2c8fafb..6e27ec2108 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-redeclare.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-redeclare.md @@ -22,4 +22,4 @@ var a = 10; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_redeclare.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_redeclare.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-regex-spaces.md b/src/docs/guide/usage/linter/rules/eslint/no-regex-spaces.md index 51f888d9a1..d952bae2f6 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-regex-spaces.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-regex-spaces.md @@ -30,4 +30,4 @@ var re = /foo bar/; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_regex_spaces.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_regex_spaces.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-restricted-globals.md b/src/docs/guide/usage/linter/rules/eslint/no-restricted-globals.md index 553f50ff94..92f9783376 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-restricted-globals.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-restricted-globals.md @@ -36,4 +36,4 @@ function onClick() { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_restricted_globals.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_restricted_globals.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-restricted-imports.md b/src/docs/guide/usage/linter/rules/eslint/no-restricted-imports.md index ffa691a3c3..c0b7068e62 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-restricted-imports.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-restricted-imports.md @@ -40,4 +40,4 @@ export { foo } from "bar"; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_restricted_imports.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_restricted_imports.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-return-assign.md b/src/docs/guide/usage/linter/rules/eslint/no-return-assign.md index b179256e3d..4e894bd73a 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-return-assign.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-return-assign.md @@ -41,4 +41,4 @@ function x() { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_return_assign.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_return_assign.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-script-url.md b/src/docs/guide/usage/linter/rules/eslint/no-script-url.md index 3fc4d9faed..f62a5c354c 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-script-url.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-script-url.md @@ -30,4 +30,4 @@ location.href = `javascript:void(0)`; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_script_url.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_script_url.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-self-assign.md b/src/docs/guide/usage/linter/rules/eslint/no-self-assign.md index 96137eec94..27cf70117e 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-self-assign.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-self-assign.md @@ -25,4 +25,4 @@ foo = foo; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_self_assign.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_self_assign.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-self-compare.md b/src/docs/guide/usage/linter/rules/eslint/no-self-compare.md index 34b3c46b3c..7e88ff68cb 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-self-compare.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-self-compare.md @@ -27,4 +27,4 @@ if (x === x) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_self_compare.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_self_compare.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-setter-return.md b/src/docs/guide/usage/linter/rules/eslint/no-setter-return.md index 0303230e18..2ac1c64913 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-setter-return.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-setter-return.md @@ -30,4 +30,4 @@ class URL { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_setter_return.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_setter_return.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-shadow-restricted-names.md b/src/docs/guide/usage/linter/rules/eslint/no-shadow-restricted-names.md index c601c67795..406c65d9e1 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-shadow-restricted-names.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-shadow-restricted-names.md @@ -29,4 +29,4 @@ try { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_shadow_restricted_names.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_shadow_restricted_names.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-sparse-arrays.md b/src/docs/guide/usage/linter/rules/eslint/no-sparse-arrays.md index 92b5fb9ecb..2b17357cc1 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-sparse-arrays.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-sparse-arrays.md @@ -25,4 +25,4 @@ var colors = ["red", , "blue"]; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_sparse_arrays.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_sparse_arrays.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-template-curly-in-string.md b/src/docs/guide/usage/linter/rules/eslint/no-template-curly-in-string.md index fadfcefd9c..ed21f5261a 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-template-curly-in-string.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-template-curly-in-string.md @@ -35,4 +35,4 @@ Examples of **incorrect** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_template_curly_in_string.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_template_curly_in_string.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-ternary.md b/src/docs/guide/usage/linter/rules/eslint/no-ternary.md index 9a5dc069a1..3f6c4c61ee 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-ternary.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-ternary.md @@ -21,4 +21,4 @@ var foo = isBar ? baz : qux; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_ternary.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_ternary.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-this-before-super.md b/src/docs/guide/usage/linter/rules/eslint/no-this-before-super.md index 84e344c72c..fa324b0afd 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-this-before-super.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-this-before-super.md @@ -31,4 +31,4 @@ class A1 extends B { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_this_before_super.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_this_before_super.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-throw-literal.md b/src/docs/guide/usage/linter/rules/eslint/no-throw-literal.md index eea4b84ff3..20d5697ff5 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-throw-literal.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-throw-literal.md @@ -58,4 +58,4 @@ try { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_throw_literal.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_throw_literal.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-undef.md b/src/docs/guide/usage/linter/rules/eslint/no-undef.md index 8c35af6e22..3667db3038 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-undef.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-undef.md @@ -22,4 +22,4 @@ var bar = a + 1; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_undef.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_undef.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-undefined.md b/src/docs/guide/usage/linter/rules/eslint/no-undefined.md index 850e9d2f6b..6536c094f2 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-undefined.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-undefined.md @@ -47,4 +47,4 @@ bar(void 0, "lorem"); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_undefined.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_undefined.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-unexpected-multiline.md b/src/docs/guide/usage/linter/rules/eslint/no-unexpected-multiline.md index 128932183b..8f4179370f 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-unexpected-multiline.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-unexpected-multiline.md @@ -52,4 +52,4 @@ foo; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_unexpected_multiline.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_unexpected_multiline.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-unreachable.md b/src/docs/guide/usage/linter/rules/eslint/no-unreachable.md index 1179c48c21..2a707b30d4 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-unreachable.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-unreachable.md @@ -35,4 +35,4 @@ function foo() { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_unreachable.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_unreachable.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-unsafe-finally.md b/src/docs/guide/usage/linter/rules/eslint/no-unsafe-finally.md index 6b94a72314..fcb542f4c8 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-unsafe-finally.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-unsafe-finally.md @@ -36,4 +36,4 @@ So, when return, throw, break, or continue is used in finally, control flow stat ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_unsafe_finally.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_unsafe_finally.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-unsafe-negation.md b/src/docs/guide/usage/linter/rules/eslint/no-unsafe-negation.md index d236d517ec..ca6c4c2b2d 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-unsafe-negation.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-unsafe-negation.md @@ -32,4 +32,4 @@ if ((!key) in object) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_unsafe_negation.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_unsafe_negation.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-unsafe-optional-chaining.md b/src/docs/guide/usage/linter/rules/eslint/no-unsafe-optional-chaining.md index 0510015810..aecd746163 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-unsafe-optional-chaining.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-unsafe-optional-chaining.md @@ -31,4 +31,4 @@ const { bar } = obj?.foo; // TypeError ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_unsafe_optional_chaining.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_unsafe_optional_chaining.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-unused-expressions.md b/src/docs/guide/usage/linter/rules/eslint/no-unused-expressions.md index 30b412daa3..9e5cbb188c 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-unused-expressions.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-unused-expressions.md @@ -31,4 +31,4 @@ const foo = new Set(); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_unused_expressions.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_unused_expressions.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-unused-labels.md b/src/docs/guide/usage/linter/rules/eslint/no-unused-labels.md index f913da7d0a..4d410e1dc1 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-unused-labels.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-unused-labels.md @@ -32,4 +32,4 @@ OUTER_LOOP: for (const student of students) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_unused_labels.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_unused_labels.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-unused-private-class-members.md b/src/docs/guide/usage/linter/rules/eslint/no-unused-private-class-members.md index b0a0e6d53f..5e089a3df9 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-unused-private-class-members.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-unused-private-class-members.md @@ -80,4 +80,4 @@ class C { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_unused_private_class_members.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_unused_private_class_members.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-unused-vars.md b/src/docs/guide/usage/linter/rules/eslint/no-unused-vars.md index 204c4b84c3..e5fd652bd0 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-unused-vars.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-unused-vars.md @@ -180,4 +180,4 @@ var global_var = 42; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_unused_vars/mod.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_unused_vars/mod.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-useless-catch.md b/src/docs/guide/usage/linter/rules/eslint/no-useless-catch.md index 07dc67b38e..506bfc2024 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-useless-catch.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-useless-catch.md @@ -31,4 +31,4 @@ try { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_useless_catch.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_useless_catch.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-useless-concat.md b/src/docs/guide/usage/linter/rules/eslint/no-useless-concat.md index 1484b8aee7..1d8508dfbb 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-useless-concat.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-useless-concat.md @@ -21,4 +21,4 @@ var foo = "a" + "b"; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_useless_concat.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_useless_concat.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-useless-constructor.md b/src/docs/guide/usage/linter/rules/eslint/no-useless-constructor.md index 309097037a..483061522a 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-useless-constructor.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-useless-constructor.md @@ -62,4 +62,4 @@ class D extends A { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_useless_constructor.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_useless_constructor.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-useless-escape.md b/src/docs/guide/usage/linter/rules/eslint/no-useless-escape.md index 384e59f45c..2389fbfa63 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-useless-escape.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-useless-escape.md @@ -61,4 +61,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_useless_escape.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_useless_escape.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-useless-rename.md b/src/docs/guide/usage/linter/rules/eslint/no-useless-rename.md index a08c957879..747b3f5ae8 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-useless-rename.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-useless-rename.md @@ -36,4 +36,4 @@ export { baz }; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_useless_rename.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_useless_rename.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-var.md b/src/docs/guide/usage/linter/rules/eslint/no-var.md index 5a14b3da82..df10347f83 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-var.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-var.md @@ -33,4 +33,4 @@ const CONFIG = {}; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_var.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_var.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-void.md b/src/docs/guide/usage/linter/rules/eslint/no-void.md index dedae9ec96..d81d53b61d 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-void.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-void.md @@ -35,4 +35,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_void.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_void.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/no-with.md b/src/docs/guide/usage/linter/rules/eslint/no-with.md index 6edefe033d..c0797d72cd 100644 --- a/src/docs/guide/usage/linter/rules/eslint/no-with.md +++ b/src/docs/guide/usage/linter/rules/eslint/no-with.md @@ -26,4 +26,4 @@ with (point) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/no_with.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/no_with.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/prefer-exponentiation-operator.md b/src/docs/guide/usage/linter/rules/eslint/prefer-exponentiation-operator.md index b589bd7724..50d0db5341 100644 --- a/src/docs/guide/usage/linter/rules/eslint/prefer-exponentiation-operator.md +++ b/src/docs/guide/usage/linter/rules/eslint/prefer-exponentiation-operator.md @@ -23,4 +23,4 @@ Math.pow(a, b); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/prefer_exponentiation_operator.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/prefer_exponentiation_operator.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/prefer-numeric-literals.md b/src/docs/guide/usage/linter/rules/eslint/prefer-numeric-literals.md index fe87cf6471..70408af31b 100644 --- a/src/docs/guide/usage/linter/rules/eslint/prefer-numeric-literals.md +++ b/src/docs/guide/usage/linter/rules/eslint/prefer-numeric-literals.md @@ -34,4 +34,4 @@ Number.parseInt("1F7", 16) === 503; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/prefer_numeric_literals.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/prefer_numeric_literals.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/prefer-object-has-own.md b/src/docs/guide/usage/linter/rules/eslint/prefer-object-has-own.md index 459750d62f..8fc3d0a957 100644 --- a/src/docs/guide/usage/linter/rules/eslint/prefer-object-has-own.md +++ b/src/docs/guide/usage/linter/rules/eslint/prefer-object-has-own.md @@ -51,4 +51,4 @@ const hasProperty = Object.hasOwn(object, property); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/prefer_object_has_own.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/prefer_object_has_own.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/prefer-rest-params.md b/src/docs/guide/usage/linter/rules/eslint/prefer-rest-params.md new file mode 100644 index 0000000000..dcb6ff35d9 --- /dev/null +++ b/src/docs/guide/usage/linter/rules/eslint/prefer-rest-params.md @@ -0,0 +1,60 @@ + + +# eslint/prefer-rest-params + +
+
+ +### What it does + +Disallows the use of the `arguments` object and instead enforces the use of rest parameters. + +### Why is this bad? + +The `arguments` object does not have methods from `Array.prototype`, making it inconvenient for array-like operations. +Using rest parameters provides a more intuitive and efficient way to handle variadic arguments. + +### Examples + +Examples of **incorrect** code for this rule: + +```javascript +function foo() { + console.log(arguments); +} + +function foo(action) { + var args = Array.prototype.slice.call(arguments, 1); + action.apply(null, args); +} + +function foo(action) { + var args = [].slice.call(arguments, 1); + action.apply(null, args); +} +``` + +Examples of **correct** code for this rule: + +```javascript +function foo(...args) { + console.log(args); +} + +function foo(action, ...args) { + action.apply(null, args); // Or use `action(...args)` (related to `prefer-spread` rule). +} + +// Note: Implicit `arguments` can be shadowed. +function foo(arguments) { + console.log(arguments); // This refers to the first argument. +} +function foo() { + var arguments = 0; + console.log(arguments); // This is a local variable. +} +``` + +## References + +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/prefer_rest_params.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/prefer-spread.md b/src/docs/guide/usage/linter/rules/eslint/prefer-spread.md index a4b97b2e41..82769843b4 100644 --- a/src/docs/guide/usage/linter/rules/eslint/prefer-spread.md +++ b/src/docs/guide/usage/linter/rules/eslint/prefer-spread.md @@ -89,4 +89,4 @@ Array.from(...argumentsArray); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/prefer_spread.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/prefer_spread.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/radix.md b/src/docs/guide/usage/linter/rules/eslint/radix.md index 6da6131a96..3d49b2c7c0 100644 --- a/src/docs/guide/usage/linter/rules/eslint/radix.md +++ b/src/docs/guide/usage/linter/rules/eslint/radix.md @@ -25,4 +25,4 @@ var num = parseInt("071", 10); // 71 ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/radix.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/radix.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/require-await.md b/src/docs/guide/usage/linter/rules/eslint/require-await.md index 7e0dc9ed5a..873b9e91f8 100644 --- a/src/docs/guide/usage/linter/rules/eslint/require-await.md +++ b/src/docs/guide/usage/linter/rules/eslint/require-await.md @@ -58,4 +58,4 @@ async function foo() { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/require_await.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/require_await.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/require-yield.md b/src/docs/guide/usage/linter/rules/eslint/require-yield.md index 4a86dad32e..1ddf566481 100644 --- a/src/docs/guide/usage/linter/rules/eslint/require-yield.md +++ b/src/docs/guide/usage/linter/rules/eslint/require-yield.md @@ -26,4 +26,4 @@ function* foo() { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/require_yield.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/require_yield.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/sort-imports.md b/src/docs/guide/usage/linter/rules/eslint/sort-imports.md index 493bb9cd8a..f6fb0bb21e 100644 --- a/src/docs/guide/usage/linter/rules/eslint/sort-imports.md +++ b/src/docs/guide/usage/linter/rules/eslint/sort-imports.md @@ -29,4 +29,4 @@ import e from "bar.js"; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/sort_imports.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/sort_imports.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/sort-keys.md b/src/docs/guide/usage/linter/rules/eslint/sort-keys.md index 3716bbbc03..cf0789a55b 100644 --- a/src/docs/guide/usage/linter/rules/eslint/sort-keys.md +++ b/src/docs/guide/usage/linter/rules/eslint/sort-keys.md @@ -39,4 +39,4 @@ let myObj = { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/sort_keys.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/sort_keys.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/sort-vars.md b/src/docs/guide/usage/linter/rules/eslint/sort-vars.md index def565b9a7..f4d2f54d2d 100644 --- a/src/docs/guide/usage/linter/rules/eslint/sort-vars.md +++ b/src/docs/guide/usage/linter/rules/eslint/sort-vars.md @@ -35,4 +35,4 @@ var B, a, c; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/sort_vars.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/sort_vars.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/symbol-description.md b/src/docs/guide/usage/linter/rules/eslint/symbol-description.md index 7835bdcf74..2924e2b929 100644 --- a/src/docs/guide/usage/linter/rules/eslint/symbol-description.md +++ b/src/docs/guide/usage/linter/rules/eslint/symbol-description.md @@ -37,4 +37,4 @@ var foo = Symbol(); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/symbol_description.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/symbol_description.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/unicode-bom.md b/src/docs/guide/usage/linter/rules/eslint/unicode-bom.md index fa0257b23c..51b2edbaa5 100644 --- a/src/docs/guide/usage/linter/rules/eslint/unicode-bom.md +++ b/src/docs/guide/usage/linter/rules/eslint/unicode-bom.md @@ -28,4 +28,4 @@ var a = 123; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/unicode_bom.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/unicode_bom.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/use-isnan.md b/src/docs/guide/usage/linter/rules/eslint/use-isnan.md index 526cd26698..70b7417851 100644 --- a/src/docs/guide/usage/linter/rules/eslint/use-isnan.md +++ b/src/docs/guide/usage/linter/rules/eslint/use-isnan.md @@ -41,4 +41,4 @@ foo > NaN; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/use_isnan.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/use_isnan.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/valid-typeof.md b/src/docs/guide/usage/linter/rules/eslint/valid-typeof.md index 0e2cda64fe..4c21cc2623 100644 --- a/src/docs/guide/usage/linter/rules/eslint/valid-typeof.md +++ b/src/docs/guide/usage/linter/rules/eslint/valid-typeof.md @@ -37,4 +37,4 @@ typeof foo === baz; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/valid_typeof.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/valid_typeof.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/vars-on-top.md b/src/docs/guide/usage/linter/rules/eslint/vars-on-top.md new file mode 100644 index 0000000000..64e58318d6 --- /dev/null +++ b/src/docs/guide/usage/linter/rules/eslint/vars-on-top.md @@ -0,0 +1,83 @@ + + +# eslint/vars-on-top + +
+
+ +### What it does + +Enforces that all `var` declarations are placed at the top of their containing scope. + +### Why is this bad? + +In JavaScript, `var` declarations are hoisted to the top of their containing scope. Placing `var` declarations at the top explicitly improves code readability and maintainability by making the scope of variables clear. + +### Examples + +Examples of **incorrect** code for this rule: + +```js +function doSomething() { + if (true) { + var first = true; + } + var second; +} + +function doSomethingElse() { + for (var i = 0; i < 10; i++) {} +} + +f(); +var a; + +class C { + static { + if (something) { + var a = true; + } + } + static { + f(); + var a; + } +} +``` + +Examples of **correct** code for this rule: + +```js +function doSomething() { + var first; + var second; + if (true) { + first = true; + } +} + +function doSomethingElse() { + var i; + for (i = 0; i < 10; i++) {} +} + +var a; +f(); + +class C { + static { + var a; + if (something) { + a = true; + } + } + static { + var a; + f(); + } +} +``` + +## References + +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/vars_on_top.rs) diff --git a/src/docs/guide/usage/linter/rules/eslint/yoda.md b/src/docs/guide/usage/linter/rules/eslint/yoda.md index cad5257365..257ed2d856 100644 --- a/src/docs/guide/usage/linter/rules/eslint/yoda.md +++ b/src/docs/guide/usage/linter/rules/eslint/yoda.md @@ -165,4 +165,4 @@ if (-1 < str.indexOf(substr)) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/eslint/yoda.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/eslint/yoda.rs) diff --git a/src/docs/guide/usage/linter/rules/import/default.md b/src/docs/guide/usage/linter/rules/import/default.md index 0faab94345..329790f297 100644 --- a/src/docs/guide/usage/linter/rules/import/default.md +++ b/src/docs/guide/usage/linter/rules/import/default.md @@ -45,4 +45,4 @@ import { bar } from "./bar"; // correct usage of named import ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/default.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/default.rs) diff --git a/src/docs/guide/usage/linter/rules/import/export.md b/src/docs/guide/usage/linter/rules/import/export.md index d3eb62f76d..6fafca7578 100644 --- a/src/docs/guide/usage/linter/rules/import/export.md +++ b/src/docs/guide/usage/linter/rules/import/export.md @@ -35,4 +35,4 @@ export * from "./export-all"; // No conflict if export-all.js also exports foo ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/export.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/export.rs) diff --git a/src/docs/guide/usage/linter/rules/import/first.md b/src/docs/guide/usage/linter/rules/import/first.md index d3f3f11fbf..96b72d4169 100644 --- a/src/docs/guide/usage/linter/rules/import/first.md +++ b/src/docs/guide/usage/linter/rules/import/first.md @@ -57,4 +57,4 @@ import { x } from "./foo"; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/first.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/first.rs) diff --git a/src/docs/guide/usage/linter/rules/import/max-dependencies.md b/src/docs/guide/usage/linter/rules/import/max-dependencies.md index 36bb56a79e..4b0c18f5dd 100644 --- a/src/docs/guide/usage/linter/rules/import/max-dependencies.md +++ b/src/docs/guide/usage/linter/rules/import/max-dependencies.md @@ -36,4 +36,4 @@ import b from "./b"; // Allowed: 2 dependencies (max: 2) ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/max_dependencies.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/max_dependencies.rs) diff --git a/src/docs/guide/usage/linter/rules/import/named.md b/src/docs/guide/usage/linter/rules/import/named.md index 24b619aaad..b58b76d1cf 100644 --- a/src/docs/guide/usage/linter/rules/import/named.md +++ b/src/docs/guide/usage/linter/rules/import/named.md @@ -1,6 +1,6 @@ -# import/named +# import/named
@@ -68,4 +68,4 @@ import { SomeNonsenseThatDoesntExist } from "react"; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/named.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/named.rs) diff --git a/src/docs/guide/usage/linter/rules/import/namespace.md b/src/docs/guide/usage/linter/rules/import/namespace.md index a3112570e8..cabec06f87 100644 --- a/src/docs/guide/usage/linter/rules/import/namespace.md +++ b/src/docs/guide/usage/linter/rules/import/namespace.md @@ -60,4 +60,4 @@ foo[method](); // Valid: method refers to an exported function ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/namespace.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/namespace.rs) diff --git a/src/docs/guide/usage/linter/rules/import/no-amd.md b/src/docs/guide/usage/linter/rules/import/no-amd.md index c5e4d7b4b0..01d48e4f4f 100644 --- a/src/docs/guide/usage/linter/rules/import/no-amd.md +++ b/src/docs/guide/usage/linter/rules/import/no-amd.md @@ -35,4 +35,4 @@ require(`../name`); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/no_amd.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/no_amd.rs) diff --git a/src/docs/guide/usage/linter/rules/import/no-commonjs.md b/src/docs/guide/usage/linter/rules/import/no-commonjs.md index 7fce06fda8..d6b6b63c10 100644 --- a/src/docs/guide/usage/linter/rules/import/no-commonjs.md +++ b/src/docs/guide/usage/linter/rules/import/no-commonjs.md @@ -83,4 +83,4 @@ exports.z = function bark() { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/no_commonjs.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/no_commonjs.rs) diff --git a/src/docs/guide/usage/linter/rules/import/no-cycle.md b/src/docs/guide/usage/linter/rules/import/no-cycle.md index 9d01a2485c..5b5d1f72ae 100644 --- a/src/docs/guide/usage/linter/rules/import/no-cycle.md +++ b/src/docs/guide/usage/linter/rules/import/no-cycle.md @@ -61,4 +61,4 @@ In this corrected version, `dep-b.js` no longer imports `dep-a.js`, breaking the ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/no_cycle.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/no_cycle.rs) diff --git a/src/docs/guide/usage/linter/rules/import/no-default-export.md b/src/docs/guide/usage/linter/rules/import/no-default-export.md index b32d723053..18d2ebb2f1 100644 --- a/src/docs/guide/usage/linter/rules/import/no-default-export.md +++ b/src/docs/guide/usage/linter/rules/import/no-default-export.md @@ -37,4 +37,4 @@ export const bar = "bar"; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/no_default_export.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/no_default_export.rs) diff --git a/src/docs/guide/usage/linter/rules/import/no-duplicates.md b/src/docs/guide/usage/linter/rules/import/no-duplicates.md index 20e16758a8..cb121f1691 100644 --- a/src/docs/guide/usage/linter/rules/import/no-duplicates.md +++ b/src/docs/guide/usage/linter/rules/import/no-duplicates.md @@ -42,4 +42,4 @@ import type { d } from "foo"; // `preferInline` is true ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/no_duplicates.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/no_duplicates.rs) diff --git a/src/docs/guide/usage/linter/rules/import/no-dynamic-require.md b/src/docs/guide/usage/linter/rules/import/no-dynamic-require.md index c5df31f9d1..15fd1db5f0 100644 --- a/src/docs/guide/usage/linter/rules/import/no-dynamic-require.md +++ b/src/docs/guide/usage/linter/rules/import/no-dynamic-require.md @@ -35,4 +35,4 @@ require(`../name`); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/no_dynamic_require.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/no_dynamic_require.rs) diff --git a/src/docs/guide/usage/linter/rules/import/no-named-as-default-member.md b/src/docs/guide/usage/linter/rules/import/no-named-as-default-member.md index e0445675d0..4e40c61b56 100644 --- a/src/docs/guide/usage/linter/rules/import/no-named-as-default-member.md +++ b/src/docs/guide/usage/linter/rules/import/no-named-as-default-member.md @@ -49,4 +49,4 @@ import { bar } from "./bar"; // Correct: accessing named export directly ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/no_named_as_default_member.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/no_named_as_default_member.rs) diff --git a/src/docs/guide/usage/linter/rules/import/no-named-as-default.md b/src/docs/guide/usage/linter/rules/import/no-named-as-default.md index c9afba2c38..55362df077 100644 --- a/src/docs/guide/usage/linter/rules/import/no-named-as-default.md +++ b/src/docs/guide/usage/linter/rules/import/no-named-as-default.md @@ -44,4 +44,4 @@ import foo from "./foo.js"; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/no_named_as_default.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/no_named_as_default.rs) diff --git a/src/docs/guide/usage/linter/rules/import/no-named-default.md b/src/docs/guide/usage/linter/rules/import/no-named-default.md index 418a60945c..eb5f1dfed1 100644 --- a/src/docs/guide/usage/linter/rules/import/no-named-default.md +++ b/src/docs/guide/usage/linter/rules/import/no-named-default.md @@ -32,4 +32,4 @@ import foo, { bar } from "./foo.js"; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/no_named_default.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/no_named_default.rs) diff --git a/src/docs/guide/usage/linter/rules/import/no-namespace.md b/src/docs/guide/usage/linter/rules/import/no-namespace.md index aa8f6c9f2b..dfc7274597 100644 --- a/src/docs/guide/usage/linter/rules/import/no-namespace.md +++ b/src/docs/guide/usage/linter/rules/import/no-namespace.md @@ -62,4 +62,4 @@ import defaultExport, { isUser } from "./user"; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/no_namespace.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/no_namespace.rs) diff --git a/src/docs/guide/usage/linter/rules/import/no-self-import.md b/src/docs/guide/usage/linter/rules/import/no-self-import.md index 867469d8a8..a1a9fd133f 100644 --- a/src/docs/guide/usage/linter/rules/import/no-self-import.md +++ b/src/docs/guide/usage/linter/rules/import/no-self-import.md @@ -34,4 +34,4 @@ import bar from "./bar.js"; // Correct: module imports another module ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/no_self_import.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/no_self_import.rs) diff --git a/src/docs/guide/usage/linter/rules/import/no-webpack-loader-syntax.md b/src/docs/guide/usage/linter/rules/import/no-webpack-loader-syntax.md index f3a8da8e69..8fcbe5733a 100644 --- a/src/docs/guide/usage/linter/rules/import/no-webpack-loader-syntax.md +++ b/src/docs/guide/usage/linter/rules/import/no-webpack-loader-syntax.md @@ -38,4 +38,4 @@ var theme = require("./theme.css"); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/no_webpack_loader_syntax.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/no_webpack_loader_syntax.rs) diff --git a/src/docs/guide/usage/linter/rules/import/unambiguous.md b/src/docs/guide/usage/linter/rules/import/unambiguous.md index 535062a16e..a425ad4677 100644 --- a/src/docs/guide/usage/linter/rules/import/unambiguous.md +++ b/src/docs/guide/usage/linter/rules/import/unambiguous.md @@ -45,4 +45,4 @@ export {}; // simple way to mark side-effects-only file as 'module' without any ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/import/unambiguous.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/import/unambiguous.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/consistent-test-it.md b/src/docs/guide/usage/linter/rules/jest/consistent-test-it.md index 38f78aece5..4f1edd8a33 100644 --- a/src/docs/guide/usage/linter/rules/jest/consistent-test-it.md +++ b/src/docs/guide/usage/linter/rules/jest/consistent-test-it.md @@ -91,5 +91,5 @@ to use it, add the following configuration to your `.eslintrc.json`: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/consistent_test_it.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/consistent_test_it.rs) ``` diff --git a/src/docs/guide/usage/linter/rules/jest/expect-expect.md b/src/docs/guide/usage/linter/rules/jest/expect-expect.md index d4c3b9a1f0..b66d85c1e1 100644 --- a/src/docs/guide/usage/linter/rules/jest/expect-expect.md +++ b/src/docs/guide/usage/linter/rules/jest/expect-expect.md @@ -35,4 +35,4 @@ to use it, add the following configuration to your `.eslintrc.json`: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/expect_expect.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/expect_expect.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/max-expects.md b/src/docs/guide/usage/linter/rules/jest/max-expects.md index 2af3f2b580..b8456f0b0e 100644 --- a/src/docs/guide/usage/linter/rules/jest/max-expects.md +++ b/src/docs/guide/usage/linter/rules/jest/max-expects.md @@ -40,4 +40,4 @@ it("should not pass", () => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/max_expects.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/max_expects.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/max-nested-describe.md b/src/docs/guide/usage/linter/rules/jest/max-nested-describe.md index 391f735dfc..18c932693d 100644 --- a/src/docs/guide/usage/linter/rules/jest/max-nested-describe.md +++ b/src/docs/guide/usage/linter/rules/jest/max-nested-describe.md @@ -93,4 +93,4 @@ describe("foo", function () { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/max_nested_describe.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/max_nested_describe.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-alias-methods.md b/src/docs/guide/usage/linter/rules/jest/no-alias-methods.md index 2c41abd55c..7c1684bbb7 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-alias-methods.md +++ b/src/docs/guide/usage/linter/rules/jest/no-alias-methods.md @@ -46,4 +46,4 @@ to use it, add the following configuration to your `.eslintrc.json`: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_alias_methods.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_alias_methods.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-commented-out-tests.md b/src/docs/guide/usage/linter/rules/jest/no-commented-out-tests.md index 8ddddedf46..c61163a655 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-commented-out-tests.md +++ b/src/docs/guide/usage/linter/rules/jest/no-commented-out-tests.md @@ -40,4 +40,4 @@ to use it, add the following configuration to your `.eslintrc.json`: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_commented_out_tests.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_commented_out_tests.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-conditional-expect.md b/src/docs/guide/usage/linter/rules/jest/no-conditional-expect.md index 0b3e54354e..cd975e3a28 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-conditional-expect.md +++ b/src/docs/guide/usage/linter/rules/jest/no-conditional-expect.md @@ -46,4 +46,4 @@ to use it, add the following configuration to your `.eslintrc.json`: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_conditional_expect.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_conditional_expect.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-conditional-in-test.md b/src/docs/guide/usage/linter/rules/jest/no-conditional-in-test.md index 5aadb162b6..aa08248f73 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-conditional-in-test.md +++ b/src/docs/guide/usage/linter/rules/jest/no-conditional-in-test.md @@ -83,4 +83,4 @@ it("baz", async () => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_conditional_in_test.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_conditional_in_test.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-confusing-set-timeout.md b/src/docs/guide/usage/linter/rules/jest/no-confusing-set-timeout.md index 29861e485a..4ca3f405c8 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-confusing-set-timeout.md +++ b/src/docs/guide/usage/linter/rules/jest/no-confusing-set-timeout.md @@ -47,4 +47,4 @@ describe("unit test", () => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_confusing_set_timeout.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_confusing_set_timeout.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-deprecated-functions.md b/src/docs/guide/usage/linter/rules/jest/no-deprecated-functions.md index 3940e445d9..7474e5da05 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-deprecated-functions.md +++ b/src/docs/guide/usage/linter/rules/jest/no-deprecated-functions.md @@ -56,4 +56,4 @@ jest.addMatchers; // since Jest 17 ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_deprecated_functions.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_deprecated_functions.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-disabled-tests.md b/src/docs/guide/usage/linter/rules/jest/no-disabled-tests.md index 16ff3e3f91..d7e00f3c7d 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-disabled-tests.md +++ b/src/docs/guide/usage/linter/rules/jest/no-disabled-tests.md @@ -52,4 +52,4 @@ to use it, add the following configuration to your `.eslintrc.json`: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_disabled_tests.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_disabled_tests.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-done-callback.md b/src/docs/guide/usage/linter/rules/jest/no-done-callback.md index 9754237bb2..9d1e8965aa 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-done-callback.md +++ b/src/docs/guide/usage/linter/rules/jest/no-done-callback.md @@ -49,4 +49,4 @@ test("myFunction()", function (done) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_done_callback.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_done_callback.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-duplicate-hooks.md b/src/docs/guide/usage/linter/rules/jest/no-duplicate-hooks.md index 61a47f06e1..b8f200c853 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-duplicate-hooks.md +++ b/src/docs/guide/usage/linter/rules/jest/no-duplicate-hooks.md @@ -83,4 +83,4 @@ describe("foo", () => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_duplicate_hooks.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_duplicate_hooks.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-export.md b/src/docs/guide/usage/linter/rules/jest/no-export.md index 0a179944f1..60dd904a84 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-export.md +++ b/src/docs/guide/usage/linter/rules/jest/no-export.md @@ -26,4 +26,4 @@ describe("a test", () => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_export.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_export.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-focused-tests.md b/src/docs/guide/usage/linter/rules/jest/no-focused-tests.md index 317dd63a74..4bf142f816 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-focused-tests.md +++ b/src/docs/guide/usage/linter/rules/jest/no-focused-tests.md @@ -50,4 +50,4 @@ to use it, add the following configuration to your `.eslintrc.json`: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_focused_tests.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_focused_tests.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-hooks.md b/src/docs/guide/usage/linter/rules/jest/no-hooks.md index 5b63769ccc..3744f16f45 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-hooks.md +++ b/src/docs/guide/usage/linter/rules/jest/no-hooks.md @@ -60,4 +60,4 @@ describe("foo", () => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_hooks.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_hooks.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-identical-title.md b/src/docs/guide/usage/linter/rules/jest/no-identical-title.md index 9bd3bd1e39..26cb6ac8c2 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-identical-title.md +++ b/src/docs/guide/usage/linter/rules/jest/no-identical-title.md @@ -41,4 +41,4 @@ to use it, add the following configuration to your `.eslintrc.json`: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_identical_title.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_identical_title.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-interpolation-in-snapshots.md b/src/docs/guide/usage/linter/rules/jest/no-interpolation-in-snapshots.md index 0aa40dde30..0876d60018 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-interpolation-in-snapshots.md +++ b/src/docs/guide/usage/linter/rules/jest/no-interpolation-in-snapshots.md @@ -37,4 +37,4 @@ expect(errorThrowingFunction).toThrowErrorMatchingInlineSnapshot(`${interpolated ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_interpolation_in_snapshots.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_interpolation_in_snapshots.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-jasmine-globals.md b/src/docs/guide/usage/linter/rules/jest/no-jasmine-globals.md index d31f2efdf8..6770987060 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-jasmine-globals.md +++ b/src/docs/guide/usage/linter/rules/jest/no-jasmine-globals.md @@ -26,4 +26,4 @@ test("my test", () => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_jasmine_globals.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_jasmine_globals.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-large-snapshots.md b/src/docs/guide/usage/linter/rules/jest/no-large-snapshots.md index c8d1cbe2d4..3b7db97324 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-large-snapshots.md +++ b/src/docs/guide/usage/linter/rules/jest/no-large-snapshots.md @@ -90,4 +90,4 @@ line 4 ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_large_snapshots.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_large_snapshots.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-mocks-import.md b/src/docs/guide/usage/linter/rules/jest/no-mocks-import.md index a2ffdd8379..cd48dabc55 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-mocks-import.md +++ b/src/docs/guide/usage/linter/rules/jest/no-mocks-import.md @@ -31,4 +31,4 @@ require("thing"); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_mocks_import.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_mocks_import.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-restricted-jest-methods.md b/src/docs/guide/usage/linter/rules/jest/no-restricted-jest-methods.md index 1ccbfe6ccd..757241df82 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-restricted-jest-methods.md +++ b/src/docs/guide/usage/linter/rules/jest/no-restricted-jest-methods.md @@ -30,4 +30,4 @@ test("plays video", () => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_restricted_jest_methods.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_restricted_jest_methods.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-restricted-matchers.md b/src/docs/guide/usage/linter/rules/jest/no-restricted-matchers.md index fa818cb632..6d24e33590 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-restricted-matchers.md +++ b/src/docs/guide/usage/linter/rules/jest/no-restricted-matchers.md @@ -32,4 +32,4 @@ describe("when an error happens", () => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_restricted_matchers.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_restricted_matchers.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-standalone-expect.md b/src/docs/guide/usage/linter/rules/jest/no-standalone-expect.md index 8db1072b66..69d3bc7cf2 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-standalone-expect.md +++ b/src/docs/guide/usage/linter/rules/jest/no-standalone-expect.md @@ -24,4 +24,4 @@ describe("a test", () => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_standalone_expect.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_standalone_expect.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-test-prefixes.md b/src/docs/guide/usage/linter/rules/jest/no-test-prefixes.md index 69c8496d38..b3eeffef3e 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-test-prefixes.md +++ b/src/docs/guide/usage/linter/rules/jest/no-test-prefixes.md @@ -45,4 +45,4 @@ to use it, add the following configuration to your `.eslintrc.json`: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_test_prefixes.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_test_prefixes.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-test-return-statement.md b/src/docs/guide/usage/linter/rules/jest/no-test-return-statement.md index b4764c7328..6169135525 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-test-return-statement.md +++ b/src/docs/guide/usage/linter/rules/jest/no-test-return-statement.md @@ -25,4 +25,4 @@ test("one", () => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_test_return_statement.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_test_return_statement.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/no-untyped-mock-factory.md b/src/docs/guide/usage/linter/rules/jest/no-untyped-mock-factory.md index 11ca95e1c1..968ddf2c84 100644 --- a/src/docs/guide/usage/linter/rules/jest/no-untyped-mock-factory.md +++ b/src/docs/guide/usage/linter/rules/jest/no-untyped-mock-factory.md @@ -73,4 +73,4 @@ jest.mock( ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/no_untyped_mock_factory.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/no_untyped_mock_factory.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/prefer-called-with.md b/src/docs/guide/usage/linter/rules/jest/prefer-called-with.md index 3fb22c23cb..d1f73d24bd 100644 --- a/src/docs/guide/usage/linter/rules/jest/prefer-called-with.md +++ b/src/docs/guide/usage/linter/rules/jest/prefer-called-with.md @@ -25,4 +25,4 @@ expect(someFunction).toHaveBeenCalled(); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/prefer_called_with.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/prefer_called_with.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/prefer-comparison-matcher.md b/src/docs/guide/usage/linter/rules/jest/prefer-comparison-matcher.md index d40bb0b06e..c461661069 100644 --- a/src/docs/guide/usage/linter/rules/jest/prefer-comparison-matcher.md +++ b/src/docs/guide/usage/linter/rules/jest/prefer-comparison-matcher.md @@ -38,4 +38,4 @@ expect(x < "Carl").toBe(true); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/prefer_comparison_matcher.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/prefer_comparison_matcher.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/prefer-equality-matcher.md b/src/docs/guide/usage/linter/rules/jest/prefer-equality-matcher.md index 12b3061e2a..a44c720b74 100644 --- a/src/docs/guide/usage/linter/rules/jest/prefer-equality-matcher.md +++ b/src/docs/guide/usage/linter/rules/jest/prefer-equality-matcher.md @@ -26,4 +26,4 @@ expect(myObj).toStrictEqual(thatObj); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/prefer_equality_matcher.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/prefer_equality_matcher.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/prefer-expect-resolves.md b/src/docs/guide/usage/linter/rules/jest/prefer-expect-resolves.md index 18cc494967..50044a35cb 100644 --- a/src/docs/guide/usage/linter/rules/jest/prefer-expect-resolves.md +++ b/src/docs/guide/usage/linter/rules/jest/prefer-expect-resolves.md @@ -54,4 +54,4 @@ it("is true", async () => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/prefer_expect_resolves.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/prefer_expect_resolves.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/prefer-hooks-in-order.md b/src/docs/guide/usage/linter/rules/jest/prefer-hooks-in-order.md index a02c852cb1..2ce51ec84e 100644 --- a/src/docs/guide/usage/linter/rules/jest/prefer-hooks-in-order.md +++ b/src/docs/guide/usage/linter/rules/jest/prefer-hooks-in-order.md @@ -119,5 +119,5 @@ to use it, add the following configuration to your `.eslintrc.json`: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/prefer_hooks_in_order.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/prefer_hooks_in_order.rs) ``` diff --git a/src/docs/guide/usage/linter/rules/jest/prefer-hooks-on-top.md b/src/docs/guide/usage/linter/rules/jest/prefer-hooks-on-top.md index 7acfc6d108..5262fcaabd 100644 --- a/src/docs/guide/usage/linter/rules/jest/prefer-hooks-on-top.md +++ b/src/docs/guide/usage/linter/rules/jest/prefer-hooks-on-top.md @@ -118,4 +118,4 @@ describe("foo", () => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/prefer_hooks_on_top.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/prefer_hooks_on_top.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/prefer-jest-mocked.md b/src/docs/guide/usage/linter/rules/jest/prefer-jest-mocked.md index 57558583f6..bf1a89f0e5 100644 --- a/src/docs/guide/usage/linter/rules/jest/prefer-jest-mocked.md +++ b/src/docs/guide/usage/linter/rules/jest/prefer-jest-mocked.md @@ -40,4 +40,4 @@ jest.mocked([].foo).mockReturnValue(1); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/prefer_jest_mocked.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/prefer_jest_mocked.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/prefer-lowercase-title.md b/src/docs/guide/usage/linter/rules/jest/prefer-lowercase-title.md index 6a9bc4d570..d1229137f7 100644 --- a/src/docs/guide/usage/linter/rules/jest/prefer-lowercase-title.md +++ b/src/docs/guide/usage/linter/rules/jest/prefer-lowercase-title.md @@ -107,4 +107,4 @@ describe("MyClass", () => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/prefer_lowercase_title.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/prefer_lowercase_title.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/prefer-mock-promise-shorthand.md b/src/docs/guide/usage/linter/rules/jest/prefer-mock-promise-shorthand.md index b559d856e4..b789bf0b09 100644 --- a/src/docs/guide/usage/linter/rules/jest/prefer-mock-promise-shorthand.md +++ b/src/docs/guide/usage/linter/rules/jest/prefer-mock-promise-shorthand.md @@ -38,4 +38,4 @@ myFunction.mockResolvedValueOnce(42).mockResolvedValueOnce(42).mockRejectedValue ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/prefer_mock_promise_shorthand.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/prefer_mock_promise_shorthand.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/prefer-spy-on.md b/src/docs/guide/usage/linter/rules/jest/prefer-spy-on.md index 8c5314ccd4..a49569a853 100644 --- a/src/docs/guide/usage/linter/rules/jest/prefer-spy-on.md +++ b/src/docs/guide/usage/linter/rules/jest/prefer-spy-on.md @@ -35,4 +35,4 @@ jest.spyOn(Date, "now").mockImplementation(() => 10); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/prefer_spy_on.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/prefer_spy_on.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/prefer-strict-equal.md b/src/docs/guide/usage/linter/rules/jest/prefer-strict-equal.md index fabc77e85d..93e6ebcc8e 100644 --- a/src/docs/guide/usage/linter/rules/jest/prefer-strict-equal.md +++ b/src/docs/guide/usage/linter/rules/jest/prefer-strict-equal.md @@ -24,4 +24,4 @@ expect({ a: "a", b: undefined }).toStrictEqual({ a: "a" }); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/prefer_strict_equal.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/prefer_strict_equal.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/prefer-to-be.md b/src/docs/guide/usage/linter/rules/jest/prefer-to-be.md index 2c8144b3b9..bdcd5a83c2 100644 --- a/src/docs/guide/usage/linter/rules/jest/prefer-to-be.md +++ b/src/docs/guide/usage/linter/rules/jest/prefer-to-be.md @@ -36,4 +36,4 @@ expect(loadMessage()).resolves.toEqual("hello world"); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/prefer_to_be.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/prefer_to_be.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/prefer-to-contain.md b/src/docs/guide/usage/linter/rules/jest/prefer-to-contain.md index 842705a847..c40633d34b 100644 --- a/src/docs/guide/usage/linter/rules/jest/prefer-to-contain.md +++ b/src/docs/guide/usage/linter/rules/jest/prefer-to-contain.md @@ -32,4 +32,4 @@ expect(a.includes(b)).toStrictEqual(true); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/prefer_to_contain.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/prefer_to_contain.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/prefer-to-have-length.md b/src/docs/guide/usage/linter/rules/jest/prefer-to-have-length.md index db9c70e298..5f252cf76a 100644 --- a/src/docs/guide/usage/linter/rules/jest/prefer-to-have-length.md +++ b/src/docs/guide/usage/linter/rules/jest/prefer-to-have-length.md @@ -35,4 +35,4 @@ expect(files["length"])["not"].toBe(1); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/prefer_to_have_length.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/prefer_to_have_length.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/prefer-todo.md b/src/docs/guide/usage/linter/rules/jest/prefer-todo.md index 7ddeee90c2..6676736c54 100644 --- a/src/docs/guide/usage/linter/rules/jest/prefer-todo.md +++ b/src/docs/guide/usage/linter/rules/jest/prefer-todo.md @@ -29,4 +29,4 @@ test.todo("i need to write this test"); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/prefer_todo.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/prefer_todo.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/require-hook.md b/src/docs/guide/usage/linter/rules/jest/require-hook.md index 12f45c7a26..42a779a00c 100644 --- a/src/docs/guide/usage/linter/rules/jest/require-hook.md +++ b/src/docs/guide/usage/linter/rules/jest/require-hook.md @@ -112,4 +112,4 @@ afterEach(() => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/require_hook.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/require_hook.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/require-to-throw-message.md b/src/docs/guide/usage/linter/rules/jest/require-to-throw-message.md index fa6edf0e26..c8222ca0b5 100644 --- a/src/docs/guide/usage/linter/rules/jest/require-to-throw-message.md +++ b/src/docs/guide/usage/linter/rules/jest/require-to-throw-message.md @@ -31,4 +31,4 @@ test("all the things", async () => { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/require_to_throw_message.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/require_to_throw_message.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/require-top-level-describe.md b/src/docs/guide/usage/linter/rules/jest/require-top-level-describe.md index 37756ea74f..942189e598 100644 --- a/src/docs/guide/usage/linter/rules/jest/require-top-level-describe.md +++ b/src/docs/guide/usage/linter/rules/jest/require-top-level-describe.md @@ -66,4 +66,4 @@ using the `maxNumberOfTopLevelDescribes` option: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/require_top_level_describe.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/require_top_level_describe.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/valid-describe-callback.md b/src/docs/guide/usage/linter/rules/jest/valid-describe-callback.md index 1df425dc07..1d9cb53428 100644 --- a/src/docs/guide/usage/linter/rules/jest/valid-describe-callback.md +++ b/src/docs/guide/usage/linter/rules/jest/valid-describe-callback.md @@ -53,4 +53,4 @@ to use it, add the following configuration to your `.eslintrc.json`: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/valid_describe_callback.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/valid_describe_callback.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/valid-expect.md b/src/docs/guide/usage/linter/rules/jest/valid-expect.md index dab35ccaf5..2913106090 100644 --- a/src/docs/guide/usage/linter/rules/jest/valid-expect.md +++ b/src/docs/guide/usage/linter/rules/jest/valid-expect.md @@ -45,4 +45,4 @@ to use it, add the following configuration to your `.eslintrc.json`: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/valid_expect.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/valid_expect.rs) diff --git a/src/docs/guide/usage/linter/rules/jest/valid-title.md b/src/docs/guide/usage/linter/rules/jest/valid-title.md index b0e9eb4ce0..7c9b09d271 100644 --- a/src/docs/guide/usage/linter/rules/jest/valid-title.md +++ b/src/docs/guide/usage/linter/rules/jest/valid-title.md @@ -48,5 +48,5 @@ test('baz', () => {}); ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jest/valid_title.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jest/valid_title.rs) ``` diff --git a/src/docs/guide/usage/linter/rules/jsdoc/check-access.md b/src/docs/guide/usage/linter/rules/jsdoc/check-access.md index 8f76747544..e491f6d8f6 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/check-access.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/check-access.md @@ -40,4 +40,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/check_access.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/check_access.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/check-property-names.md b/src/docs/guide/usage/linter/rules/jsdoc/check-property-names.md index ffac9ac1f2..4f1e3685f1 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/check-property-names.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/check-property-names.md @@ -47,4 +47,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/check_property_names.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/check_property_names.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/check-tag-names.md b/src/docs/guide/usage/linter/rules/jsdoc/check-tag-names.md index 261f9cd5c3..5ada8089de 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/check-tag-names.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/check-tag-names.md @@ -36,4 +36,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/check_tag_names.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/check_tag_names.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/empty-tags.md b/src/docs/guide/usage/linter/rules/jsdoc/empty-tags.md index be5d863e05..65b5011224 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/empty-tags.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/empty-tags.md @@ -52,4 +52,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/empty_tags.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/empty_tags.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/implements-on-classes.md b/src/docs/guide/usage/linter/rules/jsdoc/implements-on-classes.md index 2625302582..89b313a1b7 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/implements-on-classes.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/implements-on-classes.md @@ -43,4 +43,4 @@ function quux() {} ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/implements_on_classes.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/implements_on_classes.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/no-defaults.md b/src/docs/guide/usage/linter/rules/jsdoc/no-defaults.md index 3d3a8f4f48..34c3c739d1 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/no-defaults.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/no-defaults.md @@ -36,4 +36,4 @@ function quux(foo) {} ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/no_defaults.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/no_defaults.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/require-param-description.md b/src/docs/guide/usage/linter/rules/jsdoc/require-param-description.md index 7822a17912..80c9380096 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/require-param-description.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/require-param-description.md @@ -31,4 +31,4 @@ function quux(foo) {} ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/require_param_description.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/require_param_description.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/require-param-name.md b/src/docs/guide/usage/linter/rules/jsdoc/require-param-name.md index 73c2c7b297..000f362a64 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/require-param-name.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/require-param-name.md @@ -31,4 +31,4 @@ function quux(foo) {} ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/require_param_name.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/require_param_name.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/require-param-type.md b/src/docs/guide/usage/linter/rules/jsdoc/require-param-type.md index 17f7b5321c..df5f29a9f8 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/require-param-type.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/require-param-type.md @@ -31,4 +31,4 @@ function quux(foo) {} ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/require_param_type.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/require_param_type.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/require-param.md b/src/docs/guide/usage/linter/rules/jsdoc/require-param.md index c3cff339f1..a52e716aa5 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/require-param.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/require-param.md @@ -31,4 +31,4 @@ function quux(foo) {} ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/require_param.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/require_param.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/require-property-description.md b/src/docs/guide/usage/linter/rules/jsdoc/require-property-description.md index 300b7bc002..fe783c94eb 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/require-property-description.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/require-property-description.md @@ -35,4 +35,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/require_property_description.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/require_property_description.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/require-property-name.md b/src/docs/guide/usage/linter/rules/jsdoc/require-property-name.md index 48c1b88ec9..7a50e6af05 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/require-property-name.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/require-property-name.md @@ -35,4 +35,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/require_property_name.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/require_property_name.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/require-property-type.md b/src/docs/guide/usage/linter/rules/jsdoc/require-property-type.md index 66db60b3da..2f0524cef5 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/require-property-type.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/require-property-type.md @@ -35,4 +35,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/require_property_type.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/require_property_type.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/require-property.md b/src/docs/guide/usage/linter/rules/jsdoc/require-property.md index 65f3074970..d866eca36c 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/require-property.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/require-property.md @@ -44,4 +44,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/require_property.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/require_property.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/require-returns-description.md b/src/docs/guide/usage/linter/rules/jsdoc/require-returns-description.md index 2583107c79..da6dc73b33 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/require-returns-description.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/require-returns-description.md @@ -32,4 +32,4 @@ function quux(foo) {} ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/require_returns_description.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/require_returns_description.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/require-returns-type.md b/src/docs/guide/usage/linter/rules/jsdoc/require-returns-type.md index 2d743afb61..a35040115c 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/require-returns-type.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/require-returns-type.md @@ -31,4 +31,4 @@ function quux(foo) {} ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/require_returns_type.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/require_returns_type.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/require-returns.md b/src/docs/guide/usage/linter/rules/jsdoc/require-returns.md index 6aeea85d9d..790a7ea5c7 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/require-returns.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/require-returns.md @@ -44,4 +44,4 @@ function quux() { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/require_returns.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/require_returns.rs) diff --git a/src/docs/guide/usage/linter/rules/jsdoc/require-yields.md b/src/docs/guide/usage/linter/rules/jsdoc/require-yields.md index 729e1f446f..336faef81c 100644 --- a/src/docs/guide/usage/linter/rules/jsdoc/require-yields.md +++ b/src/docs/guide/usage/linter/rules/jsdoc/require-yields.md @@ -41,4 +41,4 @@ function* quux(foo) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsdoc/require_yields.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsdoc/require_yields.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/alt-text.md b/src/docs/guide/usage/linter/rules/jsx_a11y/alt-text.md index afa098db0b..ee0f4f50af 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/alt-text.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/alt-text.md @@ -42,4 +42,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/alt_text.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/alt_text.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/anchor-ambiguous-text.md b/src/docs/guide/usage/linter/rules/jsx_a11y/anchor-ambiguous-text.md index 67df50e6c1..1515420beb 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/anchor-ambiguous-text.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/anchor-ambiguous-text.md @@ -39,4 +39,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/anchor_ambiguous_text.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/anchor_ambiguous_text.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/anchor-has-content.md b/src/docs/guide/usage/linter/rules/jsx_a11y/anchor-has-content.md index 9194d1792b..4b6e99a438 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/anchor-has-content.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/anchor-has-content.md @@ -38,4 +38,4 @@ Alternatively, you may use the `title` prop or the `aria-label` prop. ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/anchor_has_content.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/anchor_has_content.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/anchor-is-valid.md b/src/docs/guide/usage/linter/rules/jsx_a11y/anchor-is-valid.md index df9f9b9519..6d09398ee2 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/anchor-is-valid.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/anchor-is-valid.md @@ -82,4 +82,4 @@ There are **many reasons** why an anchor should not have a logic and have a corr ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/anchor_is_valid.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/anchor_is_valid.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/aria-activedescendant-has-tabindex.md b/src/docs/guide/usage/linter/rules/jsx_a11y/aria-activedescendant-has-tabindex.md index b1eaf751d9..1b72111747 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/aria-activedescendant-has-tabindex.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/aria-activedescendant-has-tabindex.md @@ -37,4 +37,4 @@ const Bad =
; ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/aria_activedescendant_has_tabindex.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/aria_activedescendant_has_tabindex.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/aria-props.md b/src/docs/guide/usage/linter/rules/jsx_a11y/aria-props.md index 553a66d3cd..29b5c1423c 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/aria-props.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/aria-props.md @@ -36,4 +36,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/aria_props.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/aria_props.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/aria-role.md b/src/docs/guide/usage/linter/rules/jsx_a11y/aria-role.md index 6e7ef5a76a..abb4ea3473 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/aria-role.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/aria-role.md @@ -83,4 +83,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/aria_role.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/aria_role.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/aria-unsupported-elements.md b/src/docs/guide/usage/linter/rules/jsx_a11y/aria-unsupported-elements.md index 8a04b1b00d..c5eea9d823 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/aria-unsupported-elements.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/aria-unsupported-elements.md @@ -31,4 +31,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/aria_unsupported_elements.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/aria_unsupported_elements.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/autocomplete-valid.md b/src/docs/guide/usage/linter/rules/jsx_a11y/autocomplete-valid.md index b3802d050d..db5eb8bcdb 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/autocomplete-valid.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/autocomplete-valid.md @@ -29,4 +29,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/autocomplete_valid.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/autocomplete_valid.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/click-events-have-key-events.md b/src/docs/guide/usage/linter/rules/jsx_a11y/click-events-have-key-events.md index fbb1f512e7..666bbc2d06 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/click-events-have-key-events.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/click-events-have-key-events.md @@ -30,4 +30,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/click_events_have_key_events.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/click_events_have_key_events.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/heading-has-content.md b/src/docs/guide/usage/linter/rules/jsx_a11y/heading-has-content.md index 6c37cd90e1..60bf8930ee 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/heading-has-content.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/heading-has-content.md @@ -34,4 +34,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/heading_has_content.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/heading_has_content.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/html-has-lang.md b/src/docs/guide/usage/linter/rules/jsx_a11y/html-has-lang.md index 29e411a813..0db58a021d 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/html-has-lang.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/html-has-lang.md @@ -32,4 +32,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/html_has_lang.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/html_has_lang.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/iframe-has-title.md b/src/docs/guide/usage/linter/rules/jsx_a11y/iframe-has-title.md index bdb05a1ee6..652377bd6b 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/iframe-has-title.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/iframe-has-title.md @@ -43,4 +43,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/iframe_has_title.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/iframe_has_title.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/img-redundant-alt.md b/src/docs/guide/usage/linter/rules/jsx_a11y/img-redundant-alt.md index cc1e89c580..f14669eb24 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/img-redundant-alt.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/img-redundant-alt.md @@ -41,4 +41,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/img_redundant_alt.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/img_redundant_alt.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/label-has-associated-control.md b/src/docs/guide/usage/linter/rules/jsx_a11y/label-has-associated-control.md index 97a58a0a9f..962af7132c 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/label-has-associated-control.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/label-has-associated-control.md @@ -43,4 +43,4 @@ function Foo(props) { ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/label_has_associated_control.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/label_has_associated_control.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/lang.md b/src/docs/guide/usage/linter/rules/jsx_a11y/lang.md index 5b08b06f8e..161a9122a3 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/lang.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/lang.md @@ -39,4 +39,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/lang.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/lang.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/media-has-caption.md b/src/docs/guide/usage/linter/rules/jsx_a11y/media-has-caption.md index af0ffb81a3..f8f11322b6 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/media-has-caption.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/media-has-caption.md @@ -33,4 +33,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/media_has_caption.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/media_has_caption.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/mouse-events-have-key-events.md b/src/docs/guide/usage/linter/rules/jsx_a11y/mouse-events-have-key-events.md index 657d56b08a..f61f532d99 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/mouse-events-have-key-events.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/mouse-events-have-key-events.md @@ -30,4 +30,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/mouse_events_have_key_events.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/mouse_events_have_key_events.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/no-access-key.md b/src/docs/guide/usage/linter/rules/jsx_a11y/no-access-key.md index c50d42d0f6..a328784862 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/no-access-key.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/no-access-key.md @@ -33,4 +33,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/no_access_key.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/no_access_key.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/no-aria-hidden-on-focusable.md b/src/docs/guide/usage/linter/rules/jsx_a11y/no-aria-hidden-on-focusable.md index f037416851..61a40627ad 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/no-aria-hidden-on-focusable.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/no-aria-hidden-on-focusable.md @@ -32,4 +32,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/no_aria_hidden_on_focusable.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/no_aria_hidden_on_focusable.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/no-autofocus.md b/src/docs/guide/usage/linter/rules/jsx_a11y/no-autofocus.md index 656602bade..c0830d987c 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/no-autofocus.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/no-autofocus.md @@ -53,4 +53,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/no_autofocus.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/no_autofocus.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/no-distracting-elements.md b/src/docs/guide/usage/linter/rules/jsx_a11y/no-distracting-elements.md index 1349e18364..12463c2853 100644 --- a/src/docs/guide/usage/linter/rules/jsx_a11y/no-distracting-elements.md +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/no-distracting-elements.md @@ -43,4 +43,4 @@ Examples of **correct** code for this rule: ## References -- [Rule Source](https://github.com/oxc-project/oxc/blob/25ddb3519289dfe2a51e53b9b0c355d8ad950bbc/crates/oxc_linter/src/rules/jsx_a11y/no_distracting_elements.rs) +- [Rule Source](https://github.com/oxc-project/oxc/blob/55744fd9775a032ea83215dadc77a6bff3e2a87d/crates/oxc_linter/src/rules/jsx_a11y/no_distracting_elements.rs) diff --git a/src/docs/guide/usage/linter/rules/jsx_a11y/no-noninteractive-tabindex.md b/src/docs/guide/usage/linter/rules/jsx_a11y/no-noninteractive-tabindex.md new file mode 100644 index 0000000000..e85e92548d --- /dev/null +++ b/src/docs/guide/usage/linter/rules/jsx_a11y/no-noninteractive-tabindex.md @@ -0,0 +1,49 @@ + + +# jsx_a11y/no-noninteractive-tabindex + +
+
+ +### What it does + +This rule checks that non-interactive elements don't have a tabIndex which would make them interactive via keyboard navigation. + +### Why is this bad? + +Tab key navigation should be limited to elements on the page that can be interacted with. +Thus it is not necessary to add a tabindex to items in an unordered list, for example, +to make them navigable through assistive technology. + +These applications already afford page traversal mechanisms based on the HTML of the page. +Generally, we should try to reduce the size of the page's tab ring rather than increasing it. + +### Examples + +Examples of **incorrect** code for this rule: + +```jsx +
+
+
+
+``` + +Examples of **correct** code for this rule: + +```jsx +
+ +