diff --git a/src/__snapshots__/rules-by-scope.spec.ts.snap b/src/__snapshots__/rules-by-scope.spec.ts.snap index ca7fe997..265e3613 100644 --- a/src/__snapshots__/rules-by-scope.spec.ts.snap +++ b/src/__snapshots__/rules-by-scope.spec.ts.snap @@ -1118,6 +1118,9 @@ exports[`contains all the oxlint rules 1`] = ` "node/no-exports-assign": [ 0, ], + "node/no-new-require": [ + 0, + ], "nonblock-statement-body-position": [ 0, ], @@ -1431,7 +1434,7 @@ exports[`contains all the oxlint rules 1`] = ` 0, ], "unicorn/consistent-empty-array-spread": [ - 2, + 0, ], "unicorn/consistent-existence-index-check": [ 2, @@ -1677,7 +1680,7 @@ exports[`contains all the oxlint rules 1`] = ` 0, ], "unicorn/prefer-math-min-max": [ - 2, + 0, ], "unicorn/prefer-math-trunc": [ 0, diff --git a/src/configs-by-category.ts b/src/configs-by-category.ts index c16aef1f..749eda95 100644 --- a/src/configs-by-category.ts +++ b/src/configs-by-category.ts @@ -22,26 +22,6 @@ const styleConfig = { rules: rules.styleRules, }; -const conditionalFixConfig = { - name: 'oxlint/conditional-fix', - rules: rules.conditionalFixRules, -}; - -const fixDangerousConfig = { - name: 'oxlint/fix-dangerous', - rules: rules.fixDangerousRules, -}; - -const conditionalFixSuggestionConfig = { - name: 'oxlint/conditional-fix-suggestion', - rules: rules.conditionalFixSuggestionRules, -}; - -const pendingConfig = { - name: 'oxlint/pending', - rules: rules.pendingRules, -}; - const correctnessConfig = { name: 'oxlint/correctness', rules: rules.correctnessRules, @@ -52,47 +32,19 @@ const perfConfig = { rules: rules.perfRules, }; -const fixConfig = { - name: 'oxlint/fix', - rules: rules.fixRules, -}; - -const suggestionConfig = { - name: 'oxlint/suggestion', - rules: rules.suggestionRules, -}; - const suspiciousConfig = { name: 'oxlint/suspicious', rules: rules.suspiciousRules, }; -const conditionalSuggestionConfig = { - name: 'oxlint/conditional-suggestion', - rules: rules.conditionalSuggestionRules, -}; - -const dangerousSuggestionConfig = { - name: 'oxlint/dangerous-suggestion', - rules: rules.dangerousSuggestionRules, -}; - const configByCategory = { 'flat/pedantic': pedanticConfig, 'flat/nursery': nurseryConfig, 'flat/restriction': restrictionConfig, 'flat/style': styleConfig, - 'flat/conditional-fix': conditionalFixConfig, - 'flat/fix-dangerous': fixDangerousConfig, - 'flat/conditional-fix-suggestion': conditionalFixSuggestionConfig, - 'flat/pending': pendingConfig, 'flat/correctness': correctnessConfig, 'flat/perf': perfConfig, - 'flat/fix': fixConfig, - 'flat/suggestion': suggestionConfig, 'flat/suspicious': suspiciousConfig, - 'flat/conditional-suggestion': conditionalSuggestionConfig, - 'flat/dangerous-suggestion': dangerousSuggestionConfig, }; export default configByCategory; diff --git a/src/rules-by-category.ts b/src/rules-by-category.ts index 9aa63b0d..51203341 100644 --- a/src/rules-by-category.ts +++ b/src/rules-by-category.ts @@ -2,17 +2,25 @@ const pedanticRules = { 'array-callback-return': 'off', + eqeqeq: 'off', 'max-classes-per-file': 'off', 'max-lines': 'off', + 'no-array-constructor': 'off', + '@typescript-eslint/no-array-constructor': 'off', 'no-case-declarations': 'off', 'no-constructor-return': 'off', + 'no-else-return': 'off', + 'no-fallthrough': 'off', 'no-inner-declarations': 'off', + 'no-new-wrappers': 'off', 'no-prototype-builtins': 'off', 'no-redeclare': 'off', '@typescript-eslint/no-redeclare': 'off', 'no-self-compare': 'off', + 'no-throw-literal': 'off', radix: 'off', 'require-await': 'off', + 'sort-vars': 'off', 'symbol-description': 'off', 'import/max-dependencies': 'off', 'jest/no-conditional-in-test': 'off', @@ -26,13 +34,47 @@ const pedanticRules = { 'react/checked-requires-onchange-or-readonly': 'off', 'react/jsx-no-useless-fragment': 'off', 'react/no-unescaped-entities': 'off', + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/ban-types': 'off', + '@typescript-eslint/prefer-enum-initializers': 'off', + '@typescript-eslint/prefer-ts-expect-error': 'off', + 'unicorn/consistent-empty-array-spread': 'off', + 'unicorn/escape-case': 'off', + 'unicorn/explicit-length-check': 'off', 'unicorn/new-for-builtins': 'off', + 'unicorn/no-hex-escape': 'off', + 'unicorn/no-instanceof-array': 'off', 'unicorn/no-lonely-if': 'off', + 'unicorn/no-negated-condition': 'off', + 'unicorn/no-negation-in-equality-check': 'off', + 'unicorn/no-new-buffer': 'off', 'unicorn/no-object-as-default-parameter': 'off', + 'unicorn/no-static-only-class': 'off', 'unicorn/no-this-assignment': 'off', + 'unicorn/no-typeof-undefined': 'off', 'unicorn/no-unreadable-iife': 'off', + 'unicorn/no-useless-promise-resolve-reject': 'off', + 'unicorn/no-useless-switch-case': 'off', + 'unicorn/no-useless-undefined': 'off', + 'unicorn/prefer-array-flat': 'off', + 'unicorn/prefer-array-some': 'off', + 'unicorn/prefer-blob-reading-methods': 'off', + 'unicorn/prefer-code-point': 'off', + 'unicorn/prefer-date-now': 'off', + 'unicorn/prefer-dom-node-append': 'off', + 'unicorn/prefer-dom-node-dataset': 'off', 'unicorn/prefer-dom-node-remove': 'off', 'unicorn/prefer-event-target': 'off', + 'unicorn/prefer-math-min-max': 'off', + 'unicorn/prefer-math-trunc': 'off', + 'unicorn/prefer-native-coercion-functions': 'off', + 'unicorn/prefer-prototype-methods': 'off', + 'unicorn/prefer-query-selector': 'off', + 'unicorn/prefer-regexp-test': 'off', + 'unicorn/prefer-string-replace-all': 'off', + 'unicorn/prefer-string-slice': 'off', + 'unicorn/prefer-type-error': 'off', + 'unicorn/require-number-to-fixed-digits-argument': 'off', } as const; const nurseryRules = { @@ -47,6 +89,7 @@ const nurseryRules = { 'react/require-render-return': 'off', 'react/rules-of-hooks': 'off', 'tree-shaking/no-side-effects-in-initialization': 'off', + '@typescript-eslint/consistent-type-imports': 'off', } as const; const restrictionRules = { @@ -54,11 +97,21 @@ const restrictionRules = { 'no-alert': 'off', 'no-bitwise': 'off', 'no-console': 'off', + 'no-div-regex': 'off', + 'no-empty': 'off', 'no-empty-function': 'off', '@typescript-eslint/no-empty-function': 'off', + 'no-eq-null': 'off', 'no-eval': 'off', + 'no-iterator': 'off', + 'no-plusplus': 'off', + 'no-proto': 'off', + 'no-regex-spaces': 'off', 'no-restricted-globals': 'off', 'no-undefined': 'off', + 'no-var': 'off', + 'no-void': 'off', + 'unicode-bom': 'off', 'import/no-amd': 'off', 'import/no-cycle': 'off', 'import/no-default-export': 'off', @@ -66,12 +119,16 @@ const restrictionRules = { 'import/no-webpack-loader-syntax': 'off', 'jsdoc/check-access': 'off', 'jsdoc/empty-tags': 'off', + 'node/no-new-require': 'off', 'promise/catch-or-return': 'off', 'promise/spec-only': 'off', 'react/button-has-type': 'off', 'react/no-danger': 'off', + 'react/no-unknown-property': 'off', '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/no-dynamic-delete': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-import-type-side-effects': 'off', '@typescript-eslint/no-namespace': 'off', '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'off', '@typescript-eslint/no-non-null-assertion': 'off', @@ -79,166 +136,138 @@ const restrictionRules = { '@typescript-eslint/prefer-literal-enum-member': 'off', 'unicorn/no-abusive-eslint-disable': 'off', 'unicorn/no-anonymous-default-export': 'off', + 'unicorn/no-array-for-each': 'off', 'unicorn/no-array-reduce': 'off', + 'unicorn/no-length-as-slice-end': 'off', 'unicorn/no-magic-array-flat-depth': 'off', + 'unicorn/no-nested-ternary': 'off', + 'unicorn/no-process-exit': 'off', + 'unicorn/prefer-modern-math-apis': 'off', + 'unicorn/prefer-node-protocol': 'off', + 'unicorn/prefer-number-properties': 'off', } as const; const styleRules = { 'default-case-last': 'off', 'default-param-last': 'off', '@typescript-eslint/default-param-last': 'off', + 'func-names': 'off', 'guard-for-in': 'off', 'max-params': 'off', '@typescript-eslint/max-params': 'off', 'no-continue': 'off', 'no-label-var': 'off', + 'no-magic-numbers': 'off', + '@typescript-eslint/no-magic-numbers': 'off', 'no-multi-str': 'off', 'no-new-func': 'off', + 'no-return-assign': 'off', 'no-script-url': 'off', + 'no-template-curly-in-string': 'off', 'no-ternary': 'off', 'prefer-exponentiation-operator': 'off', + 'prefer-numeric-literals': 'off', + 'sort-imports': 'off', + 'sort-keys': 'off', + 'jest/consistent-test-it': 'off', 'jest/max-expects': 'off', 'jest/max-nested-describe': 'off', + 'jest/no-alias-methods': 'off', 'jest/no-confusing-set-timeout': 'off', + 'jest/no-deprecated-functions': 'off', 'jest/no-done-callback': 'off', 'jest/no-duplicate-hooks': 'off', 'jest/no-hooks': 'off', 'jest/no-identical-title': 'off', 'jest/no-interpolation-in-snapshots': 'off', + 'jest/no-jasmine-globals': 'off', 'jest/no-large-snapshots': 'off', 'jest/no-mocks-import': 'off', 'jest/no-restricted-jest-methods': 'off', 'jest/no-restricted-matchers': 'off', + 'jest/no-test-prefixes': 'off', 'jest/no-test-return-statement': 'off', + 'jest/no-untyped-mock-factory': 'off', 'jest/prefer-called-with': 'off', + 'jest/prefer-comparison-matcher': 'off', 'jest/prefer-equality-matcher': 'off', + 'jest/prefer-expect-resolves': 'off', 'jest/prefer-hooks-in-order': 'off', 'jest/prefer-hooks-on-top': 'off', + 'jest/prefer-jest-mocked': 'off', + 'jest/prefer-lowercase-title': 'off', + 'jest/prefer-mock-promise-shorthand': 'off', + 'jest/prefer-spy-on': 'off', + 'jest/prefer-strict-equal': 'off', + 'jest/prefer-to-be': 'off', 'jest/prefer-to-contain': 'off', + 'jest/prefer-to-have-length': 'off', + 'jest/prefer-todo': 'off', 'jest/require-hook': 'off', 'jest/require-top-level-describe': 'off', + 'node/no-exports-assign': 'off', 'promise/avoid-new': 'off', 'promise/param-names': 'off', 'promise/prefer-await-to-callbacks': 'off', 'promise/prefer-await-to-then': 'off', + 'react/jsx-boolean-value': 'off', 'react/jsx-curly-brace-presence': 'off', 'react/no-set-state': 'off', 'react/prefer-es6-class': 'off', + 'react/self-closing-comp': 'off', '@typescript-eslint/adjacent-overload-signatures': 'off', + '@typescript-eslint/array-type': 'off', + '@typescript-eslint/ban-tslint-comment': 'off', + '@typescript-eslint/consistent-indexed-object-style': 'off', + '@typescript-eslint/consistent-type-definitions': 'off', '@typescript-eslint/no-empty-interface': 'off', + '@typescript-eslint/prefer-for-of': 'off', + '@typescript-eslint/prefer-function-type': 'off', + '@typescript-eslint/prefer-namespace-keyword': 'off', + 'unicorn/catch-error-name': 'off', + 'unicorn/empty-brace-spaces': 'off', 'unicorn/error-message': 'off', 'unicorn/filename-case': 'off', - 'unicorn/no-unreadable-array-destructuring': 'off', - 'unicorn/prefer-reflect-apply': 'off', - 'vitest/prefer-each': 'off', -} as const; - -const conditionalFixRules = { - eqeqeq: 'off', - 'no-else-return': 'off', - 'prefer-numeric-literals': 'off', - 'sort-imports': 'off', - 'use-isnan': 'off', - 'valid-typeof': 'off', - 'jest/no-jasmine-globals': 'off', - 'jest/no-untyped-mock-factory': 'off', - 'jest/prefer-jest-mocked': 'off', - 'jest/prefer-mock-promise-shorthand': 'off', - 'jsx-a11y/aria-props': 'off', - '@typescript-eslint/ban-ts-comment': 'off', - '@typescript-eslint/consistent-indexed-object-style': 'off', - '@typescript-eslint/consistent-type-imports': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/prefer-as-const': 'off', - '@typescript-eslint/prefer-function-type': 'off', - 'unicorn/explicit-length-check': 'off', - 'unicorn/no-nested-ternary': 'off', + 'unicorn/no-await-expression-member': 'off', + 'unicorn/no-console-spaces': 'off', 'unicorn/no-null': 'off', - 'unicorn/no-single-promise-in-promise-methods': 'off', - 'unicorn/no-unnecessary-await': 'off', - 'unicorn/no-useless-fallback-in-spread': 'off', - 'unicorn/no-useless-spread': 'off', - 'unicorn/prefer-array-flat': 'off', + 'unicorn/no-unreadable-array-destructuring': 'off', + 'unicorn/no-zero-fractions': 'off', + 'unicorn/number-literal-case': 'off', + 'unicorn/numeric-separators-style': 'off', + 'unicorn/prefer-array-flat-map': 'off', 'unicorn/prefer-dom-node-text-content': 'off', - 'unicorn/prefer-query-selector': 'off', - 'unicorn/prefer-spread': 'off', - 'unicorn/require-array-join-separator': 'off', -} as const; - -const fixDangerousRules = { - 'for-direction': 'off', - 'no-eq-null': 'off', - 'no-unexpected-multiline': 'off', -} as const; - -const conditionalFixSuggestionRules = { - 'func-names': 'off', - 'no-compare-neg-zero': 'off', -} as const; - -const pendingRules = { - 'no-array-constructor': 'off', - '@typescript-eslint/no-array-constructor': 'off', - 'no-empty-static-block': 'off', - 'no-extra-boolean-cast': 'off', - 'no-fallthrough': 'off', - 'no-iterator': 'off', - 'no-magic-numbers': 'off', - '@typescript-eslint/no-magic-numbers': 'off', - 'no-new-wrappers': 'off', - 'no-nonoctal-decimal-escape': 'off', - 'no-proto': 'off', - 'no-regex-spaces': 'off', - 'no-return-assign': 'off', - 'no-template-curly-in-string': 'off', - 'no-void': 'off', - 'sort-keys': 'off', - 'sort-vars': 'off', - 'jsx-a11y/tabindex-no-positive': 'off', - 'nextjs/no-typos': 'off', - 'react/iframe-missing-sandbox': 'off', - 'react/no-unknown-property': 'off', - 'react/self-closing-comp': 'off', - '@typescript-eslint/ban-types': 'off', - '@typescript-eslint/no-confusing-non-null-assertion': 'off', - '@typescript-eslint/prefer-enum-initializers': 'off', - '@typescript-eslint/prefer-for-of': 'off', - 'unicorn/catch-error-name': 'off', - 'unicorn/consistent-function-scoping': 'off', - 'unicorn/no-array-for-each': 'off', - 'unicorn/no-await-expression-member': 'off', - 'unicorn/no-negated-condition': 'off', - 'unicorn/no-negation-in-equality-check': 'off', - 'unicorn/no-new-array': 'off', - 'unicorn/no-new-buffer': 'off', - 'unicorn/no-process-exit': 'off', - 'unicorn/no-static-only-class': 'off', - 'unicorn/no-typeof-undefined': 'off', - 'unicorn/no-useless-length-check': 'off', - 'unicorn/no-useless-switch-case': 'off', - 'unicorn/prefer-add-event-listener': 'off', - 'unicorn/prefer-blob-reading-methods': 'off', - 'unicorn/prefer-dom-node-dataset': 'off', 'unicorn/prefer-includes': 'off', 'unicorn/prefer-logical-operator-over-ternary': 'off', - 'unicorn/prefer-math-trunc': 'off', 'unicorn/prefer-modern-dom-apis': 'off', - 'unicorn/prefer-modern-math-apis': 'off', - 'unicorn/prefer-native-coercion-functions': 'off', - 'unicorn/prefer-number-properties': 'off', + 'unicorn/prefer-optional-catch-binding': 'off', + 'unicorn/prefer-reflect-apply': 'off', + 'unicorn/prefer-spread': 'off', + 'unicorn/prefer-string-trim-start-end': 'off', 'unicorn/prefer-structured-clone': 'off', - 'vitest/require-local-test-context-for-concurrent-snapshots': 'off', + 'unicorn/require-array-join-separator': 'off', + 'unicorn/switch-case-braces': 'off', + 'unicorn/text-encoding-identifier-case': 'off', + 'unicorn/throw-new-error': 'off', + 'vitest/no-import-node-test': 'off', + 'vitest/prefer-each': 'off', + 'vitest/prefer-to-be-falsy': 'off', + 'vitest/prefer-to-be-object': 'off', + 'vitest/prefer-to-be-truthy': 'off', } as const; const correctnessRules = { + 'for-direction': 'off', 'no-async-promise-executor': 'off', 'no-caller': 'off', 'no-class-assign': 'off', + 'no-compare-neg-zero': 'off', 'no-cond-assign': 'off', 'no-const-assign': 'off', 'no-constant-binary-expression': 'off', 'no-constant-condition': 'off', 'no-control-regex': 'off', + 'no-debugger': 'off', 'no-delete-var': 'off', 'no-dupe-class-members': 'off', '@typescript-eslint/no-dupe-class-members': 'off', @@ -247,7 +276,9 @@ const correctnessRules = { 'no-duplicate-case': 'off', 'no-empty-character-class': 'off', 'no-empty-pattern': 'off', + 'no-empty-static-block': 'off', 'no-ex-assign': 'off', + 'no-extra-boolean-cast': 'off', 'no-func-assign': 'off', 'no-global-assign': 'off', 'no-import-assign': 'off', @@ -256,6 +287,7 @@ const correctnessRules = { 'no-loss-of-precision': 'off', '@typescript-eslint/no-loss-of-precision': 'off', 'no-new-native-nonconstructor': 'off', + 'no-nonoctal-decimal-escape': 'off', 'no-obj-calls': 'off', 'no-self-assign': 'off', 'no-setter-return': 'off', @@ -263,12 +295,19 @@ const correctnessRules = { 'no-sparse-arrays': 'off', 'no-this-before-super': 'off', 'no-unsafe-finally': 'off', + 'no-unsafe-negation': 'off', 'no-unsafe-optional-chaining': 'off', + 'no-unused-labels': 'off', 'no-unused-private-class-members': 'off', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'off', 'no-useless-catch': 'off', + 'no-useless-escape': 'off', 'no-useless-rename': 'off', 'no-with': 'off', 'require-yield': 'off', + 'use-isnan': 'off', + 'valid-typeof': 'off', 'import/default': 'off', 'import/named': 'off', 'import/namespace': 'off', @@ -276,6 +315,7 @@ const correctnessRules = { 'jest/no-conditional-expect': 'off', 'jest/no-disabled-tests': 'off', 'jest/no-export': 'off', + 'jest/no-focused-tests': 'off', 'jest/no-standalone-expect': 'off', 'jest/require-to-throw-message': 'off', 'jest/valid-describe-callback': 'off', @@ -291,9 +331,12 @@ const correctnessRules = { 'jsdoc/require-property-type': 'off', 'jsdoc/require-yields': 'off', 'jsx-a11y/alt-text': 'off', + 'jsx-a11y/anchor-has-content': 'off', 'jsx-a11y/anchor-is-valid': 'off', 'jsx-a11y/aria-activedescendant-has-tabindex': 'off', + 'jsx-a11y/aria-props': 'off', 'jsx-a11y/aria-role': 'off', + 'jsx-a11y/aria-unsupported-elements': 'off', 'jsx-a11y/autocomplete-valid': 'off', 'jsx-a11y/click-events-have-key-events': 'off', 'jsx-a11y/heading-has-content': 'off', @@ -305,10 +348,15 @@ const correctnessRules = { 'jsx-a11y/media-has-caption': 'off', 'jsx-a11y/mouse-events-have-key-events': 'off', 'jsx-a11y/no-access-key': 'off', + 'jsx-a11y/no-aria-hidden-on-focusable': 'off', + 'jsx-a11y/no-autofocus': 'off', 'jsx-a11y/no-distracting-elements': 'off', + 'jsx-a11y/no-redundant-roles': 'off', 'jsx-a11y/prefer-tag-over-role': 'off', 'jsx-a11y/role-has-required-aria-props': 'off', 'jsx-a11y/role-supports-aria-props': 'off', + 'jsx-a11y/scope': 'off', + 'jsx-a11y/tabindex-no-positive': 'off', 'nextjs/google-font-display': 'off', 'nextjs/google-font-preconnect': 'off', 'nextjs/inline-script-id': 'off', @@ -327,13 +375,16 @@ const correctnessRules = { 'nextjs/no-styled-jsx-in-document': 'off', 'nextjs/no-sync-scripts': 'off', 'nextjs/no-title-in-document-head': 'off', + 'nextjs/no-typos': 'off', 'nextjs/no-unwanted-polyfillio': 'off', 'promise/no-callback-in-promise': 'off', + 'promise/no-new-statics': 'off', 'promise/valid-params': 'off', 'react/jsx-key': 'off', 'react/jsx-no-duplicate-props': 'off', 'react/jsx-no-target-blank': 'off', 'react/jsx-no-undef': 'off', + 'react/jsx-props-no-spread-multi': 'off', 'react/no-children-prop': 'off', 'react/no-danger-with-children': 'off', 'react/no-direct-mutation-state': 'off', @@ -348,13 +399,25 @@ const correctnessRules = { '@typescript-eslint/no-non-null-asserted-optional-chain': 'off', '@typescript-eslint/no-this-alias': 'off', '@typescript-eslint/no-unsafe-declaration-merging': 'off', + '@typescript-eslint/no-useless-empty-export': 'off', + '@typescript-eslint/no-wrapper-object-types': 'off', + '@typescript-eslint/prefer-as-const': 'off', '@typescript-eslint/triple-slash-reference': 'off', 'unicorn/no-await-in-promise-methods': 'off', 'unicorn/no-document-cookie': 'off', 'unicorn/no-empty-file': 'off', 'unicorn/no-invalid-remove-event-listener': 'off', + 'unicorn/no-new-array': 'off', + 'unicorn/no-single-promise-in-promise-methods': 'off', 'unicorn/no-thenable': 'off', + 'unicorn/no-unnecessary-await': 'off', + 'unicorn/no-useless-fallback-in-spread': 'off', + 'unicorn/no-useless-length-check': 'off', + 'unicorn/no-useless-spread': 'off', + 'unicorn/prefer-set-size': 'off', + 'unicorn/prefer-string-starts-ends-with': 'off', 'vitest/no-conditional-tests': 'off', + 'vitest/require-local-test-context-for-concurrent-snapshots': 'off', } as const; const perfRules = { @@ -365,110 +428,26 @@ const perfRules = { 'react-perf/jsx-no-new-object-as-prop': 'off', } as const; -const fixRules = { - 'no-debugger': 'off', - 'no-div-regex': 'off', - 'no-unsafe-negation': 'off', - 'no-unused-labels': 'off', - 'no-useless-constructor': 'off', - '@typescript-eslint/no-useless-constructor': 'off', - 'no-useless-escape': 'off', - 'no-var': 'off', - 'unicode-bom': 'off', - 'jest/consistent-test-it': 'off', - 'jest/no-alias-methods': 'off', - 'jest/no-deprecated-functions': 'off', - 'jest/no-focused-tests': 'off', - 'jest/no-test-prefixes': 'off', - 'jest/prefer-comparison-matcher': 'off', - 'jest/prefer-expect-resolves': 'off', - 'jest/prefer-lowercase-title': 'off', - 'jest/prefer-spy-on': 'off', - 'jest/prefer-strict-equal': 'off', - 'jest/prefer-to-be': 'off', - 'jest/prefer-to-have-length': 'off', - 'jest/prefer-todo': 'off', - 'jsx-a11y/aria-unsupported-elements': 'off', - 'jsx-a11y/no-aria-hidden-on-focusable': 'off', - 'jsx-a11y/no-autofocus': 'off', - 'jsx-a11y/no-redundant-roles': 'off', - 'jsx-a11y/scope': 'off', - 'node/no-exports-assign': 'off', - 'promise/no-new-statics': 'off', - 'react/jsx-boolean-value': 'off', - 'react/jsx-props-no-spread-multi': 'off', - '@typescript-eslint/array-type': 'off', - '@typescript-eslint/ban-tslint-comment': 'off', - '@typescript-eslint/consistent-type-definitions': 'off', - '@typescript-eslint/no-import-type-side-effects': 'off', - '@typescript-eslint/no-useless-empty-export': 'off', - '@typescript-eslint/no-wrapper-object-types': 'off', - '@typescript-eslint/prefer-namespace-keyword': 'off', - '@typescript-eslint/prefer-ts-expect-error': 'off', - 'unicorn/empty-brace-spaces': 'off', - 'unicorn/escape-case': 'off', - 'unicorn/no-console-spaces': 'off', - 'unicorn/no-hex-escape': 'off', - 'unicorn/no-instanceof-array': 'off', - 'unicorn/no-length-as-slice-end': 'off', - 'unicorn/no-useless-promise-resolve-reject': 'off', - 'unicorn/no-useless-undefined': 'off', - 'unicorn/no-zero-fractions': 'off', - 'unicorn/number-literal-case': 'off', - 'unicorn/numeric-separators-style': 'off', - 'unicorn/prefer-array-flat-map': 'off', - 'unicorn/prefer-array-some': 'off', - 'unicorn/prefer-code-point': 'off', - 'unicorn/prefer-date-now': 'off', - 'unicorn/prefer-dom-node-append': 'off', - 'unicorn/prefer-node-protocol': 'off', - 'unicorn/prefer-optional-catch-binding': 'off', - 'unicorn/prefer-prototype-methods': 'off', - 'unicorn/prefer-regexp-test': 'off', - 'unicorn/prefer-set-size': 'off', - 'unicorn/prefer-string-replace-all': 'off', - 'unicorn/prefer-string-slice': 'off', - 'unicorn/prefer-string-starts-ends-with': 'off', - 'unicorn/prefer-string-trim-start-end': 'off', - 'unicorn/prefer-type-error': 'off', - 'unicorn/require-number-to-fixed-digits-argument': 'off', - 'unicorn/switch-case-braces': 'off', - 'unicorn/text-encoding-identifier-case': 'off', - 'unicorn/throw-new-error': 'off', - 'vitest/no-import-node-test': 'off', - 'vitest/prefer-to-be-falsy': 'off', - 'vitest/prefer-to-be-object': 'off', - 'vitest/prefer-to-be-truthy': 'off', -} as const; - -const suggestionRules = { - 'no-empty': 'off', -} as const; - const suspiciousRules = { 'no-extend-native': 'off', 'no-new': 'off', + 'no-unexpected-multiline': 'off', 'no-useless-concat': 'off', + 'no-useless-constructor': 'off', + '@typescript-eslint/no-useless-constructor': 'off', 'import/no-duplicates': 'off', 'import/no-named-as-default': 'off', 'import/no-named-as-default-member': 'off', 'import/no-self-import': 'off', 'jest/no-commented-out-tests': 'off', + 'react/iframe-missing-sandbox': 'off', 'react/jsx-no-comment-textnodes': 'off', 'react/react-in-jsx-scope': 'off', + '@typescript-eslint/no-confusing-non-null-assertion': 'off', '@typescript-eslint/no-extraneous-class': 'off', '@typescript-eslint/no-unnecessary-type-constraint': 'off', -} as const; - -const conditionalSuggestionRules = { - 'no-plusplus': 'off', - 'no-throw-literal': 'off', - 'jsx-a11y/anchor-has-content': 'off', -} as const; - -const dangerousSuggestionRules = { - 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': 'off', + 'unicorn/consistent-function-scoping': 'off', + 'unicorn/prefer-add-event-listener': 'off', } as const; export { @@ -476,15 +455,7 @@ export { nurseryRules, restrictionRules, styleRules, - conditionalFixRules, - fixDangerousRules, - conditionalFixSuggestionRules, - pendingRules, correctnessRules, perfRules, - fixRules, - suggestionRules, suspiciousRules, - conditionalSuggestionRules, - dangerousSuggestionRules, }; diff --git a/src/rules-by-scope.ts b/src/rules-by-scope.ts index c73269f0..fd37e4a2 100644 --- a/src/rules-by-scope.ts +++ b/src/rules-by-scope.ts @@ -311,6 +311,7 @@ const nextjsRules = { const nodeRules = { 'node/no-exports-assign': 'off', + 'node/no-new-require': 'off', } as const; const promiseRules = { @@ -371,6 +372,7 @@ const treeShakingRules = { const unicornRules = { 'unicorn/catch-error-name': 'off', + 'unicorn/consistent-empty-array-spread': 'off', 'unicorn/consistent-function-scoping': 'off', 'unicorn/empty-brace-spaces': 'off', 'unicorn/error-message': 'off', @@ -432,6 +434,7 @@ const unicornRules = { 'unicorn/prefer-event-target': 'off', 'unicorn/prefer-includes': 'off', 'unicorn/prefer-logical-operator-over-ternary': 'off', + 'unicorn/prefer-math-min-max': 'off', 'unicorn/prefer-math-trunc': 'off', 'unicorn/prefer-modern-dom-apis': 'off', 'unicorn/prefer-modern-math-apis': 'off',