From c61716f3e04c94538eaf44a3c582a40f71889c53 Mon Sep 17 00:00:00 2001 From: oxc-bot Date: Mon, 21 Oct 2024 13:03:58 +0800 Subject: [PATCH] release: v0.10.1 (#193) Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Co-authored-by: Boshen --- package.json | 4 +- pnpm-lock.yaml | 74 +++++++++---------- src/__snapshots__/rules-by-scope.spec.ts.snap | 6 ++ src/configs-by-category.ts | 20 +---- src/rules-by-category.ts | 24 +++--- src/rules-by-scope.ts | 2 + 6 files changed, 60 insertions(+), 70 deletions(-) diff --git a/package.json b/package.json index c4a458a..4b55784 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-oxlint", - "version": "0.10.0", + "version": "0.10.1", "description": "Turn off all rules already supported by oxlint", "type": "module", "packageManager": "pnpm@9.12.2", @@ -66,7 +66,7 @@ "jiti": "^2.3.3", "lint-staged": "^15.2.10", "memfs": "^4.14.0", - "oxlint": "^0.10.0", + "oxlint": "^0.10.1", "prettier": "^3.3.3", "scule": "^1.3.0", "shelljs": "^0.8.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6b7be97..efc635b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,8 +51,8 @@ importers: specifier: ^4.14.0 version: 4.14.0 oxlint: - specifier: ^0.10.0 - version: 0.10.0 + specifier: ^0.10.1 + version: 0.10.1 prettier: specifier: ^3.3.3 version: 3.3.3 @@ -468,43 +468,43 @@ packages: '@oxc-node/core@0.0.15': resolution: {integrity: sha512-g8ip2dUKtxfZ5IqROmZbHz7OY/+GOG4dnhqgQezlYXCufUcWA+0GM+FqI0ZzA50njUFKCTAHXRiN+BqJPy4trA==} - '@oxlint/darwin-arm64@0.10.0': - resolution: {integrity: sha512-9tYzOyo0C8h4QNRQXlpZTRTF0RxXBiwo6YisM6D17UEKa/EkyxgWXN+i9YJmvx2yT0l7htkwGzPBSo+YdCBTtg==} + '@oxlint/darwin-arm64@0.10.1': + resolution: {integrity: sha512-C2g5Hq2Ev6BU7zpGmfSNsl7r6UH7vUi2pYm56VMtq1/6N/dnuaU8+sKJfKWq66EG+rz3Q2pW0+YUhTsepnLwjw==} cpu: [arm64] os: [darwin] - '@oxlint/darwin-x64@0.10.0': - resolution: {integrity: sha512-rX8Fe9Q/x+MCmz18mhNu0TLVxdwbHsGk4AmjP48CQdfg0bfdSgIDFRpa5AAIRJ7ZbOTxAr9E34vBQkwIks54kQ==} + '@oxlint/darwin-x64@0.10.1': + resolution: {integrity: sha512-mN/1WnajvV2TOaVPB91ohzLURceDsjB0oR+4JcgDKfsdrru90JRvcBpFbvwKCPzneGc/V7foYBkaBXr6/j2VSQ==} cpu: [x64] os: [darwin] - '@oxlint/linux-arm64-gnu@0.10.0': - resolution: {integrity: sha512-p7zCFGox/sj+eN3wVTm9pmHDGLBY2qQgVkQ6Ua7P907KN7D1PPoiRne8t3Z8zUZjGrVxdDfsLBYmdo0Da3t2/A==} + '@oxlint/linux-arm64-gnu@0.10.1': + resolution: {integrity: sha512-uIjJf9i3cPOSAa3jcjzl7ZqWTGitEhGiFp84nFG/O123HPv/E+gP1dlXqf7512CQDciVzrVoBZTf15Ynpy3S9g==} cpu: [arm64] os: [linux] - '@oxlint/linux-arm64-musl@0.10.0': - resolution: {integrity: sha512-N4kvv8K69vZ1L7b7Ij1ldD9i5j7SrfM8mWJqvtg8yVFrHnHszpZlZkcyJtK22eBlx8bOuf0NSmH6+x8gTHfgkw==} + '@oxlint/linux-arm64-musl@0.10.1': + resolution: {integrity: sha512-OV9iMyXIwrH3Kp+AQhCgW02rwvzFlo1CNZ0IDNz9vEbGy7mwI8Tnyg2lWot3pD7Pv59JV9P6b7Czal8N8TszGQ==} cpu: [arm64] os: [linux] - '@oxlint/linux-x64-gnu@0.10.0': - resolution: {integrity: sha512-2BA/9+/YvbPWarfno7pVeSUfqyMBNH0ySnJ++Hy1XWaEA5qL3jKRvFqHygBVh2CneOe3kglKT+4xtrQ/ZOHa8g==} + '@oxlint/linux-x64-gnu@0.10.1': + resolution: {integrity: sha512-kOvWuA9iiN6QaSncxIRRxSNNJaOOtSsVkvJJL5GMhFczl4Uv6HHqLw8x1R89YTUwkQa96ycQ/TNSdN8K8ARIEw==} cpu: [x64] os: [linux] - '@oxlint/linux-x64-musl@0.10.0': - resolution: {integrity: sha512-iSnYonDTTKv5DC5G9kUAQsjXL4QqW6sjypYCv3l+xql8gJ+N7KemtOH9QXz5YpZCqAY5xulJXqgaynzkFEVFkA==} + '@oxlint/linux-x64-musl@0.10.1': + resolution: {integrity: sha512-p2MEr8ipWlmnVuvjc8xRBs/PHR3uMzHLp70J/PInHD+ULPf40MW/D7yBtjXQVlCcSOlFLCmvJdHjiGaaWKfcEA==} cpu: [x64] os: [linux] - '@oxlint/win32-arm64@0.10.0': - resolution: {integrity: sha512-Cym4by/vfOpzwHzAl0TSxLsL80AkGc428Gb2M1aty+xeUuZYFN6jRukqGbjFjRPNktVGl1qJ/rqeZiW4nbx9fg==} + '@oxlint/win32-arm64@0.10.1': + resolution: {integrity: sha512-f6grRxe0zeMwpM45+in9DEdzH4Xu9magB3YFsXhGGZ7ki511ULlWhCXsSPfuv1EIbVc0GDzacFUK7CCdhIXQpg==} cpu: [arm64] os: [win32] - '@oxlint/win32-x64@0.10.0': - resolution: {integrity: sha512-Msayt3ofWlWh1NC3sUIOyiEyNpHwfuXDCnO0Uhf8iIeLtv7qFMoor9CNDls3hqKWQXmZZtA4tpml3OxaZ3wGdw==} + '@oxlint/win32-x64@0.10.1': + resolution: {integrity: sha512-ocytlmlmDjkHi1BXGdnCGH0/jS3m+1RWFjWQz0bvVDmA60DEN8PyfvShQ3H5ks3k3CVpy1nVcM/E7T6i9xDHFg==} cpu: [x64] os: [win32] @@ -1608,8 +1608,8 @@ packages: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} - oxlint@0.10.0: - resolution: {integrity: sha512-lHxy9oaghb2t/1JYd3uixJqi2/o/tQ1rcCSNoYUCH7Z+OVguEmTKp/lms17lgOS44o5u5cl7K5+t4fV8/GqESA==} + oxlint@0.10.1: + resolution: {integrity: sha512-b7/cFNeY6A28fKMGokcunbZ/9EN6msunYeuPDWZIvxm2jRwitxX4+Zpw4kx1wt8vFxihf72v15kNNDWG5KZ09A==} engines: {node: '>=14.*'} hasBin: true @@ -2484,28 +2484,28 @@ snapshots: '@oxc-node/core-win32-ia32-msvc': 0.0.15 '@oxc-node/core-win32-x64-msvc': 0.0.15 - '@oxlint/darwin-arm64@0.10.0': + '@oxlint/darwin-arm64@0.10.1': optional: true - '@oxlint/darwin-x64@0.10.0': + '@oxlint/darwin-x64@0.10.1': optional: true - '@oxlint/linux-arm64-gnu@0.10.0': + '@oxlint/linux-arm64-gnu@0.10.1': optional: true - '@oxlint/linux-arm64-musl@0.10.0': + '@oxlint/linux-arm64-musl@0.10.1': optional: true - '@oxlint/linux-x64-gnu@0.10.0': + '@oxlint/linux-x64-gnu@0.10.1': optional: true - '@oxlint/linux-x64-musl@0.10.0': + '@oxlint/linux-x64-musl@0.10.1': optional: true - '@oxlint/win32-arm64@0.10.0': + '@oxlint/win32-arm64@0.10.1': optional: true - '@oxlint/win32-x64@0.10.0': + '@oxlint/win32-x64@0.10.1': optional: true '@pkgjs/parseargs@0.11.0': @@ -3668,16 +3668,16 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 - oxlint@0.10.0: + oxlint@0.10.1: optionalDependencies: - '@oxlint/darwin-arm64': 0.10.0 - '@oxlint/darwin-x64': 0.10.0 - '@oxlint/linux-arm64-gnu': 0.10.0 - '@oxlint/linux-arm64-musl': 0.10.0 - '@oxlint/linux-x64-gnu': 0.10.0 - '@oxlint/linux-x64-musl': 0.10.0 - '@oxlint/win32-arm64': 0.10.0 - '@oxlint/win32-x64': 0.10.0 + '@oxlint/darwin-arm64': 0.10.1 + '@oxlint/darwin-x64': 0.10.1 + '@oxlint/linux-arm64-gnu': 0.10.1 + '@oxlint/linux-arm64-musl': 0.10.1 + '@oxlint/linux-x64-gnu': 0.10.1 + '@oxlint/linux-x64-musl': 0.10.1 + '@oxlint/win32-arm64': 0.10.1 + '@oxlint/win32-x64': 0.10.1 p-limit@2.3.0: dependencies: diff --git a/src/__snapshots__/rules-by-scope.spec.ts.snap b/src/__snapshots__/rules-by-scope.spec.ts.snap index 942ab81..ca7fe99 100644 --- a/src/__snapshots__/rules-by-scope.spec.ts.snap +++ b/src/__snapshots__/rules-by-scope.spec.ts.snap @@ -1151,6 +1151,9 @@ exports[`contains all the oxlint rules 1`] = ` "promise/catch-or-return": [ 0, ], + "promise/no-callback-in-promise": [ + 0, + ], "promise/no-new-statics": [ 0, ], @@ -1199,6 +1202,9 @@ exports[`contains all the oxlint rules 1`] = ` "react/checked-requires-onchange-or-readonly": [ 0, ], + "react/iframe-missing-sandbox": [ + 0, + ], "react/jsx-boolean-value": [ 0, ], diff --git a/src/configs-by-category.ts b/src/configs-by-category.ts index 8c8074d..c16aef1 100644 --- a/src/configs-by-category.ts +++ b/src/configs-by-category.ts @@ -27,9 +27,9 @@ const conditionalFixConfig = { rules: rules.conditionalFixRules, }; -const dangerousFixConfig = { - name: 'oxlint/dangerous-fix', - rules: rules.dangerousFixRules, +const fixDangerousConfig = { + name: 'oxlint/fix-dangerous', + rules: rules.fixDangerousRules, }; const conditionalFixSuggestionConfig = { @@ -52,11 +52,6 @@ const perfConfig = { rules: rules.perfRules, }; -const conditionalSuggestionFixConfig = { - name: 'oxlint/conditional-suggestion-fix', - rules: rules.conditionalSuggestionFixRules, -}; - const fixConfig = { name: 'oxlint/fix', rules: rules.fixRules, @@ -67,11 +62,6 @@ const suggestionConfig = { rules: rules.suggestionRules, }; -const fixDangerousConfig = { - name: 'oxlint/fix-dangerous', - rules: rules.fixDangerousRules, -}; - const suspiciousConfig = { name: 'oxlint/suspicious', rules: rules.suspiciousRules, @@ -93,15 +83,13 @@ const configByCategory = { 'flat/restriction': restrictionConfig, 'flat/style': styleConfig, 'flat/conditional-fix': conditionalFixConfig, - 'flat/dangerous-fix': dangerousFixConfig, + 'flat/fix-dangerous': fixDangerousConfig, 'flat/conditional-fix-suggestion': conditionalFixSuggestionConfig, 'flat/pending': pendingConfig, 'flat/correctness': correctnessConfig, 'flat/perf': perfConfig, - 'flat/conditional-suggestion-fix': conditionalSuggestionFixConfig, 'flat/fix': fixConfig, 'flat/suggestion': suggestionConfig, - 'flat/fix-dangerous': fixDangerousConfig, 'flat/suspicious': suspiciousConfig, 'flat/conditional-suggestion': conditionalSuggestionConfig, 'flat/dangerous-suggestion': dangerousSuggestionConfig, diff --git a/src/rules-by-category.ts b/src/rules-by-category.ts index aa1b203..9aa63b0 100644 --- a/src/rules-by-category.ts +++ b/src/rules-by-category.ts @@ -59,7 +59,6 @@ const restrictionRules = { 'no-eval': 'off', 'no-restricted-globals': 'off', 'no-undefined': 'off', - 'no-unsafe-optional-chaining': 'off', 'import/no-amd': 'off', 'import/no-cycle': 'off', 'import/no-default-export': 'off', @@ -166,12 +165,15 @@ const conditionalFixRules = { 'unicorn/require-array-join-separator': 'off', } as const; -const dangerousFixRules = { +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 = { @@ -185,7 +187,6 @@ const pendingRules = { '@typescript-eslint/no-magic-numbers': 'off', 'no-new-wrappers': 'off', 'no-nonoctal-decimal-escape': 'off', - 'no-plusplus': 'off', 'no-proto': 'off', 'no-regex-spaces': 'off', 'no-return-assign': 'off', @@ -195,6 +196,7 @@ const pendingRules = { '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', @@ -261,6 +263,7 @@ const correctnessRules = { 'no-sparse-arrays': 'off', 'no-this-before-super': 'off', 'no-unsafe-finally': 'off', + 'no-unsafe-optional-chaining': 'off', 'no-unused-private-class-members': 'off', 'no-useless-catch': 'off', 'no-useless-rename': 'off', @@ -325,6 +328,7 @@ const correctnessRules = { 'nextjs/no-sync-scripts': 'off', 'nextjs/no-title-in-document-head': 'off', 'nextjs/no-unwanted-polyfillio': 'off', + 'promise/no-callback-in-promise': 'off', 'promise/valid-params': 'off', 'react/jsx-key': 'off', 'react/jsx-no-duplicate-props': 'off', @@ -361,10 +365,6 @@ const perfRules = { 'react-perf/jsx-no-new-object-as-prop': 'off', } as const; -const conditionalSuggestionFixRules = { - 'no-compare-neg-zero': 'off', -} as const; - const fixRules = { 'no-debugger': 'off', 'no-div-regex': 'off', @@ -445,11 +445,6 @@ const suggestionRules = { 'no-empty': 'off', } as const; -const fixDangerousRules = { - 'no-eq-null': 'off', - 'no-unexpected-multiline': 'off', -} as const; - const suspiciousRules = { 'no-extend-native': 'off', 'no-new': 'off', @@ -466,6 +461,7 @@ const suspiciousRules = { } as const; const conditionalSuggestionRules = { + 'no-plusplus': 'off', 'no-throw-literal': 'off', 'jsx-a11y/anchor-has-content': 'off', } as const; @@ -481,15 +477,13 @@ export { restrictionRules, styleRules, conditionalFixRules, - dangerousFixRules, + fixDangerousRules, conditionalFixSuggestionRules, pendingRules, correctnessRules, perfRules, - conditionalSuggestionFixRules, fixRules, suggestionRules, - fixDangerousRules, suspiciousRules, conditionalSuggestionRules, dangerousSuggestionRules, diff --git a/src/rules-by-scope.ts b/src/rules-by-scope.ts index 4111170..c73269f 100644 --- a/src/rules-by-scope.ts +++ b/src/rules-by-scope.ts @@ -316,6 +316,7 @@ const nodeRules = { const promiseRules = { 'promise/avoid-new': 'off', 'promise/catch-or-return': 'off', + 'promise/no-callback-in-promise': 'off', 'promise/no-new-statics': 'off', 'promise/no-return-in-finally': 'off', 'promise/param-names': 'off', @@ -328,6 +329,7 @@ const promiseRules = { const reactRules = { 'react/button-has-type': 'off', 'react/checked-requires-onchange-or-readonly': 'off', + 'react/iframe-missing-sandbox': 'off', 'react/jsx-boolean-value': 'off', 'react/jsx-curly-brace-presence': 'off', 'react/jsx-key': 'off',