From dd2be9d56b5cbcfc74eec05f73459712eeb41eb4 Mon Sep 17 00:00:00 2001 From: oxc-bot Date: Sat, 7 Sep 2024 13:01:13 +0800 Subject: [PATCH] release: v0.9.3 (#152) Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Co-authored-by: Boshen --- package.json | 2 +- src/rules-by-category.ts | 9 ++++++++- src/rules-by-scope.ts | 11 +++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c10ed13..842306c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-oxlint", - "version": "0.9.2", + "version": "0.9.3", "description": "Turn off all rules already supported by oxlint", "type": "module", "packageManager": "pnpm@9.9.0", diff --git a/src/rules-by-category.ts b/src/rules-by-category.ts index a32010b..e3c25bd 100644 --- a/src/rules-by-category.ts +++ b/src/rules-by-category.ts @@ -78,10 +78,13 @@ const restrictionRules = { 'import/no-amd': 'off', 'import/no-cycle': 'off', 'import/no-default-export': 'off', + 'import/no-dynamic-require': 'off', 'import/no-webpack-loader-syntax': 'off', 'jsdoc/check-access': 'off', 'jsdoc/empty-tags': 'off', 'promise/avoid-new': 'off', + 'promise/catch-or-return': 'off', + 'promise/spec-only': 'off', 'react/button-has-type': 'off', 'react/no-danger': 'off', 'react/no-unknown-property': 'off', @@ -109,6 +112,7 @@ const styleRules = { 'no-continue': 'off', 'no-label-var': 'off', 'no-multi-str': 'off', + 'no-new-func': 'off', 'no-script-url': 'off', 'no-template-curly-in-string': 'off', 'no-ternary': 'off', @@ -357,6 +361,7 @@ const fixRules = { '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', @@ -393,12 +398,14 @@ const fixRules = { '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', }; @@ -414,11 +421,11 @@ const pendingRules = { 'no-extra-boolean-cast': 'off', 'no-fallthrough': 'off', 'jsx-a11y/tabindex-no-positive': 'off', + 'react/self-closing-comp': 'off', 'unicorn/consistent-function-scoping': 'off', 'unicorn/prefer-modern-math-apis': 'off', 'unicorn/prefer-native-coercion-functions': 'off', 'unicorn/prefer-structured-clone': 'off', - 'unicorn/prefer-type-error': 'off', }; const suspiciousRules = { diff --git a/src/rules-by-scope.ts b/src/rules-by-scope.ts index cccffbf..c90b245 100644 --- a/src/rules-by-scope.ts +++ b/src/rules-by-scope.ts @@ -57,6 +57,7 @@ const eslintRules = { 'no-loss-of-precision': 'off', 'no-multi-str': 'off', 'no-new': 'off', + 'no-new-func': 'off', 'no-new-native-nonconstructor': 'off', 'no-new-wrappers': 'off', 'no-nonoctal-decimal-escape': 'off', @@ -115,6 +116,7 @@ const importRules = { 'import/no-default-export': 'off', 'import/no-deprecated': 'off', 'import/no-duplicates': 'off', + 'import/no-dynamic-require': 'off', 'import/no-named-as-default': 'off', 'import/no-named-as-default-member': 'off', 'import/no-self-import': 'off', @@ -247,12 +249,18 @@ const nextjsRules = { 'nextjs/no-unwanted-polyfillio': 'off', }; +const nodeRules = { + 'node/no-exports-assign': 'off', +}; + const promiseRules = { 'promise/avoid-new': 'off', + 'promise/catch-or-return': 'off', 'promise/no-new-statics': 'off', 'promise/no-return-in-finally': 'off', 'promise/param-names': 'off', 'promise/prefer-await-to-then': 'off', + 'promise/spec-only': 'off', 'promise/valid-params': 'off', }; @@ -282,6 +290,7 @@ const reactRules = { 'react/react-in-jsx-scope': 'off', 'react/require-render-return': 'off', 'react/rules-of-hooks': 'off', + 'react/self-closing-comp': 'off', 'react/void-dom-elements-no-children': 'off', }; @@ -429,6 +438,7 @@ const vitestRules = { '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', 'vitest/require-local-test-context-for-concurrent-snapshots': 'off', }; @@ -440,6 +450,7 @@ export { jsdocRules, jsxA11yRules, nextjsRules, + nodeRules, promiseRules, reactRules, reactPerfRules,