Ver Fonte

chore(style): migrate linting to oxlint (#13326)

Cameron há 3 meses atrás
pai
commit
08598a6bed
35 ficheiros alterados com 300 adições e 834 exclusões
  1. 1 1
      .github/contributing.md
  2. 1 2
      .github/renovate.json5
  3. 1 1
      .github/workflows/autofix.yml
  4. 1 1
      .github/workflows/test.yml
  5. 153 0
      .oxlintrc.json
  6. 0 188
      eslint.config.js
  7. 5 8
      package.json
  8. 3 4
      packages-private/benchmark/client/profiling.ts
  9. 9 9
      packages-private/dts-test/component.test-d.ts
  10. 0 2
      packages/compiler-core/src/babelUtils.ts
  11. 1 1
      packages/compiler-dom/src/decodeHtmlBrowser.ts
  12. 2 2
      packages/compiler-sfc/__tests__/compileTemplate.spec.ts
  13. 1 1
      packages/compiler-ssr/__tests__/utils.ts
  14. 0 1
      packages/reactivity/src/system.ts
  15. 1 0
      packages/runtime-core/__tests__/apiWatch.spec.ts
  16. 1 1
      packages/runtime-core/__tests__/helpers/useId.spec.ts
  17. 1 0
      packages/runtime-core/__tests__/hydration.spec.ts
  18. 1 1
      packages/runtime-core/__tests__/rendererAttrsFallthrough.spec.ts
  19. 2 2
      packages/runtime-core/src/compat/global.ts
  20. 2 2
      packages/runtime-core/src/components/Suspense.ts
  21. 1 1
      packages/runtime-core/src/customFormatter.ts
  22. 1 2
      packages/runtime-core/src/devtools.ts
  23. 1 1
      packages/runtime-core/src/hmr.ts
  24. 1 1
      packages/runtime-core/src/hydrationStrategies.ts
  25. 1 1
      packages/runtime-core/src/profiling.ts
  26. 0 1
      packages/runtime-core/src/warning.ts
  27. 1 1
      packages/runtime-dom/__tests__/customElement.spec.ts
  28. 1 1
      packages/runtime-vapor/__tests__/componentAttrs.spec.ts
  29. 1 1
      packages/runtime-vapor/__tests__/componentSlots.spec.ts
  30. 1 1
      packages/server-renderer/src/renderToStream.ts
  31. 1 2
      packages/vue/jsx-runtime/index.d.ts
  32. 0 2
      packages/vue/jsx.d.ts
  33. 104 571
      pnpm-lock.yaml
  34. 0 8
      pnpm-workspace.yaml
  35. 0 13
      scripts/release.js

+ 1 - 1
.github/contributing.md

@@ -93,7 +93,7 @@ A high level overview of tools used:
 - [Rollup](https://rollupjs.org) for production bundling
 - [Vitest](https://vitest.dev/) for unit testing
 - [Prettier](https://prettier.io/) for code formatting
-- [ESLint](https://eslint.org/) for static error prevention (outside of types)
+- [oxlint](https://oxc.rs/docs/guide/usage/linter.html) for static error prevention (outside of types)
 
 ## Git Hooks
 

+ 1 - 2
.github/renovate.json5

@@ -40,8 +40,7 @@
       matchPackageNames: [
         'simple-git-hooks',
         'lint-staged',
-        'typescript-eslint{/,}**',
-        'eslint{/,}**',
+        'oxlint',
         'prettier{/,}**',
       ],
     },

+ 1 - 1
.github/workflows/autofix.yml

@@ -25,7 +25,7 @@ jobs:
 
       - run: pnpm install
 
-      - name: Run eslint
+      - name: Run oxlint
         run: pnpm run lint --fix
 
       - name: Run prettier

+ 1 - 1
.github/workflows/test.yml

@@ -124,7 +124,7 @@ jobs:
 
       - run: pnpm install
 
-      - name: Run eslint
+      - name: Run oxlint
         run: pnpm run lint
 
       - name: Run prettier

+ 153 - 0
.oxlintrc.json

@@ -0,0 +1,153 @@
+{
+  "$schema": "./node_modules/oxlint/configuration_schema.json",
+  "plugins": [],
+  "categories": {
+    "correctness": "off"
+  },
+  "env": {
+    "builtin": true
+  },
+  "ignorePatterns": [
+    "**/dist/",
+    "**/temp/",
+    "**/coverage/",
+    "dts-build/packages"
+  ],
+  "overrides": [
+    {
+      "files": ["**/*.js", "**/*.ts", "**/*.tsx"],
+      "rules": {
+        "no-debugger": "error",
+        "no-console": [
+          "error",
+          {
+            "allow": ["warn", "error", "info"]
+          }
+        ],
+        "no-restricted-globals": [
+          "error",
+          "window",
+          "document",
+          "module",
+          "require"
+        ],
+        "oxc/no-const-enum": "error",
+        "oxc/no-rest-spread-properties": "error",
+        "oxc/no-async-await": "error",
+        "oxc/no-optional-chaining": "error",
+        "sort-imports": [
+          "error",
+          {
+            "ignoreDeclarationSort": true
+          }
+        ],
+        "@typescript-eslint/prefer-ts-expect-error": "error",
+        "@typescript-eslint/consistent-type-imports": [
+          "error",
+          {
+            "fixStyle": "inline-type-imports",
+            "disallowTypeAnnotations": false
+          }
+        ],
+        "@typescript-eslint/no-import-type-side-effects": "error"
+      },
+      "plugins": ["typescript"]
+    },
+    {
+      "files": [
+        "**/__tests__/**",
+        "packages-private/dts-test/**",
+        "packages-private/dts-build-test/**"
+      ],
+      "rules": {
+        "no-console": "off",
+        "no-restricted-globals": "off",
+        "no-unused-expressions": "off",
+        "no-unused-vars": "off",
+        "no-unsafe-optional-chaining": "off",
+        "no-constant-condition": "off",
+        "vitest/no-conditional-tests": "off",
+        "typescript/no-this-alias": "off",
+        "typescript/no-non-null-asserted-optional-chain": "off"
+      },
+      "globals": {
+        "suite": "writeable",
+        "test": "writeable",
+        "describe": "writeable",
+        "it": "writeable",
+        "expectTypeOf": "writeable",
+        "assertType": "writeable",
+        "expect": "writeable",
+        "assert": "writeable",
+        "chai": "writeable",
+        "vitest": "writeable",
+        "vi": "writeable",
+        "beforeAll": "writeable",
+        "afterAll": "writeable",
+        "beforeEach": "writeable",
+        "afterEach": "writeable",
+        "onTestFailed": "writeable",
+        "onTestFinished": "writeable"
+      },
+      "plugins": ["vitest", "typescript"]
+    },
+    {
+      "files": ["packages/shared/**"],
+      "rules": {
+        "no-restricted-globals": "off"
+      }
+    },
+    {
+      "files": ["packages/{vue,vue-compat,runtime-dom,runtime-vapor}/**"],
+      "rules": {
+        "no-restricted-globals": ["error", "module", "require"]
+      }
+    },
+    {
+      "files": ["packages/{compiler-sfc,compiler-ssr,server-renderer}/**"],
+      "rules": {
+        "no-restricted-globals": ["error", "window", "document"],
+        "oxc/no-const-enum": "error"
+      }
+    },
+    {
+      "files": [
+        "packages-private/template-explorer/**",
+        "packages-private/sfc-playground/**"
+      ],
+      "rules": {
+        "no-restricted-globals": ["error", "module", "require"],
+        "oxc/no-const-enum": "error",
+        "no-console": "off"
+      }
+    },
+    {
+      "files": ["*.js"],
+      "rules": {
+        "no-unused-vars": [
+          "error",
+          {
+            "vars": "all",
+            "args": "none"
+          }
+        ]
+      }
+    },
+    {
+      "files": [
+        "rollup*.config.js",
+        "scripts/**",
+        "./*.{js,ts}",
+        "packages/*/*.js",
+        "packages/vue/*/*.js",
+        "packages-private/benchmark/*",
+        "packages-private/e2e-utils/*"
+      ],
+      "rules": {
+        "no-restricted-globals": "off",
+        "oxc/no-const-enum": "error",
+        "no-console": "off"
+      }
+    }
+  ]
+}

+ 0 - 188
eslint.config.js

@@ -1,188 +0,0 @@
-import importX from 'eslint-plugin-import-x'
-import tseslint from 'typescript-eslint'
-import { defineConfig } from 'eslint/config'
-import vitest from '@vitest/eslint-plugin'
-import { builtinModules } from 'node:module'
-
-const DOMGlobals = ['window', 'document']
-const NodeGlobals = ['module', 'require']
-
-const banConstEnum = {
-  selector: 'TSEnumDeclaration[const=true]',
-  message:
-    'Please use non-const enums. This project automatically inlines enums.',
-}
-
-export default defineConfig(
-  {
-    files: ['**/*.js', '**/*.ts', '**/*.tsx'],
-    extends: [tseslint.configs.base],
-    plugins: {
-      'import-x': importX,
-    },
-    rules: {
-      'no-debugger': 'error',
-      'no-console': ['error', { allow: ['warn', 'error', 'info'] }],
-      // most of the codebase are expected to be env agnostic
-      'no-restricted-globals': ['error', ...DOMGlobals, ...NodeGlobals],
-
-      'no-restricted-syntax': [
-        'error',
-        banConstEnum,
-        {
-          selector: 'ObjectPattern > RestElement',
-          message:
-            'Our output target is ES2016, and object rest spread results in ' +
-            'verbose helpers and should be avoided.',
-        },
-        {
-          selector: 'ObjectExpression > SpreadElement',
-          message:
-            'esbuild transpiles object spread into very verbose inline helpers.\n' +
-            'Please use the `extend` helper from @vue/shared instead.',
-        },
-        {
-          selector: 'AwaitExpression',
-          message:
-            'Our output target is ES2016, so async/await syntax should be avoided.',
-        },
-        {
-          selector: 'ChainExpression',
-          message:
-            'Our output target is ES2016, and optional chaining results in ' +
-            'verbose helpers and should be avoided.',
-        },
-      ],
-      'sort-imports': ['error', { ignoreDeclarationSort: true }],
-
-      'import-x/no-nodejs-modules': [
-        'error',
-        { allow: builtinModules.map(mod => `node:${mod}`) },
-      ],
-      // This rule enforces the preference for using '@ts-expect-error' comments in TypeScript
-      // code to indicate intentional type errors, improving code clarity and maintainability.
-      '@typescript-eslint/ban-ts-comment': [
-        'error',
-        { minimumDescriptionLength: 0 },
-      ],
-      // Enforce the use of 'import type' for importing types
-      '@typescript-eslint/consistent-type-imports': [
-        'error',
-        {
-          fixStyle: 'inline-type-imports',
-          disallowTypeAnnotations: false,
-        },
-      ],
-      // Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers
-      '@typescript-eslint/no-import-type-side-effects': 'error',
-    },
-  },
-
-  // tests, no restrictions (runs in Node / Vitest with jsdom)
-  {
-    files: [
-      '**/__tests__/**',
-      'packages-private/dts-test/**',
-      'packages-private/dts-build-test/**',
-    ],
-    plugins: { vitest },
-    languageOptions: {
-      globals: {
-        ...vitest.environments.env.globals,
-      },
-    },
-    rules: {
-      'no-console': 'off',
-      'no-restricted-globals': 'off',
-      'no-restricted-syntax': 'off',
-      'vitest/no-disabled-tests': 'error',
-      'vitest/no-focused-tests': 'error',
-    },
-  },
-
-  // shared, may be used in any env
-  {
-    files: ['packages/shared/**', 'eslint.config.js'],
-    rules: {
-      'no-restricted-globals': 'off',
-    },
-  },
-
-  // Packages targeting DOM
-  {
-    files: ['packages/{vue,vue-compat,runtime-dom,runtime-vapor}/**'],
-    rules: {
-      'no-restricted-globals': ['error', ...NodeGlobals],
-    },
-  },
-
-  // Packages targeting Node
-  {
-    files: ['packages/{compiler-sfc,compiler-ssr,server-renderer}/**'],
-    rules: {
-      'no-restricted-globals': ['error', ...DOMGlobals],
-      'no-restricted-syntax': ['error', banConstEnum],
-    },
-  },
-
-  // Private package, browser only + no syntax restrictions
-  {
-    files: [
-      'packages-private/template-explorer/**',
-      'packages-private/sfc-playground/**',
-      'packages-private/local-playground/**',
-    ],
-    rules: {
-      'no-restricted-globals': ['error', ...NodeGlobals],
-      'no-restricted-syntax': ['error', banConstEnum],
-      'no-console': 'off',
-    },
-  },
-
-  // JavaScript files
-  {
-    files: ['*.js'],
-    rules: {
-      // We only do `no-unused-vars` checks for js files, TS files are checked by TypeScript itself.
-      'no-unused-vars': ['error', { vars: 'all', args: 'none' }],
-    },
-  },
-
-  // Node scripts
-  {
-    files: [
-      'eslint.config.js',
-      'rollup*.config.js',
-      'scripts/**',
-      './*.{js,ts}',
-      'packages/*/*.js',
-      'packages/vue/*/*.js',
-      'packages-private/benchmark/*',
-      'packages-private/e2e-utils/*',
-    ],
-    rules: {
-      'no-restricted-globals': 'off',
-      'no-restricted-syntax': ['error', banConstEnum],
-      'no-console': 'off',
-    },
-  },
-
-  // Import nodejs modules in compiler-sfc
-  {
-    files: ['packages/compiler-sfc/src/**'],
-    rules: {
-      'import-x/no-nodejs-modules': ['error', { allow: builtinModules }],
-    },
-  },
-
-  {
-    ignores: [
-      '**/dist/',
-      '**/temp/',
-      '**/coverage/',
-      '.idea/',
-      'explorations/',
-      'dts-build/packages',
-    ],
-  },
-)

+ 5 - 8
package.json

@@ -7,13 +7,13 @@
     "dev": "node scripts/dev.js",
     "build": "node scripts/build.js",
     "build-dts": "tsc -p tsconfig.build.json --noCheck && rollup -c rollup.dts.config.js",
-    "clean": "rimraf --glob packages/*/dist temp .eslintcache",
+    "clean": "rimraf --glob packages/*/dist temp",
     "size": "run-s \"size-*\" && node scripts/usage-size.js",
     "size-global": "node scripts/build.js vue runtime-dom compiler-dom -f global -p --size",
     "size-esm-runtime": "node scripts/build.js vue -f esm-bundler-runtime",
     "size-esm": "node scripts/build.js runtime-shared runtime-dom runtime-core reactivity shared runtime-vapor -f esm-bundler",
     "check": "tsc --incremental --noEmit",
-    "lint": "eslint --cache .",
+    "lint": "oxlint",
     "format": "prettier --write --cache .",
     "format-check": "prettier --check --cache .",
     "test": "vitest",
@@ -54,7 +54,7 @@
       "prettier --write"
     ],
     "*.ts?(x)": [
-      "eslint --fix",
+      "oxlint --fix",
       "prettier --parser=typescript --write"
     ]
   },
@@ -74,16 +74,13 @@
     "@types/node": "^24.10.4",
     "@types/semver": "^7.7.1",
     "@types/serve-handler": "^6.1.4",
-    "@vitest/ui": "^3.0.2",
     "@vitest/coverage-v8": "^3.2.4",
-    "@vitest/eslint-plugin": "^1.5.2",
+    "@vitest/ui": "^3.0.2",
     "@vue/consolidate": "1.0.0",
     "conventional-changelog-cli": "^5.0.0",
     "enquirer": "^2.4.1",
     "esbuild": "^0.27.1",
     "esbuild-plugin-polyfill-node": "^0.3.0",
-    "eslint": "^9.39.2",
-    "eslint-plugin-import-x": "^4.16.1",
     "estree-walker": "catalog:",
     "jsdom": "^27.3.0",
     "lint-staged": "^16.2.7",
@@ -91,6 +88,7 @@
     "magic-string": "^0.30.21",
     "markdown-table": "^3.0.4",
     "marked": "13.0.3",
+    "oxlint": "^1.24.0",
     "npm-run-all2": "^8.0.4",
     "picocolors": "^1.1.1",
     "prettier": "^3.7.4",
@@ -109,7 +107,6 @@
     "todomvc-app-css": "^2.4.3",
     "tslib": "^2.8.1",
     "typescript": "~5.6.2",
-    "typescript-eslint": "^8.49.0",
     "vite": "catalog:",
     "vitest": "^3.2.4"
   }

+ 3 - 4
packages-private/benchmark/client/profiling.ts

@@ -1,7 +1,6 @@
-/* eslint-disable no-console */
-/* eslint-disable no-restricted-syntax */
-/* eslint-disable no-restricted-globals */
-
+/* oxlint-disable no-console */
+/* oxlint-disable no-restricted-syntax */
+/* oxlint-disable no-restricted-globals */
 import { nextTick } from 'vue'
 
 declare global {

+ 9 - 9
packages-private/dts-test/component.test-d.ts

@@ -198,10 +198,10 @@ describe('object props', () => {
     expectType<ExpectedProps['object']>(props.object)
 
     // raw bindings
-    expectType<Number>(rawBindings.setupA)
-    expectType<Ref<Number>>(rawBindings.setupB)
-    expectType<Ref<Number>>(rawBindings.setupC.a)
-    expectType<Ref<Number> | undefined>(rawBindings.setupD)
+    expectType<number>(rawBindings.setupA)
+    expectType<Ref<number>>(rawBindings.setupB)
+    expectType<Ref<number>>(rawBindings.setupC.a)
+    expectType<Ref<number> | undefined>(rawBindings.setupD)
 
     // raw bindings props
     expectType<ExpectedProps['a']>(rawBindings.setupProps.a)
@@ -223,9 +223,9 @@ describe('object props', () => {
     expectType<ExpectedProps['validated']>(rawBindings.setupProps.validated)
 
     // setup
-    expectType<Number>(setup.setupA)
-    expectType<Number>(setup.setupB)
-    expectType<Ref<Number>>(setup.setupC.a)
+    expectType<number>(setup.setupA)
+    expectType<number>(setup.setupB)
+    expectType<Ref<number>>(setup.setupC.a)
     expectType<number | undefined>(setup.setupD)
 
     // raw bindings props
@@ -354,10 +354,10 @@ describe('object props', () => {
     expectType<ExpectedProps['object']>(props.object)
 
     // rawBindings
-    expectType<Number>(rawBindings.setupA)
+    expectType<number>(rawBindings.setupA)
 
     //setup
-    expectType<Number>(setup.setupA)
+    expectType<number>(setup.setupA)
   })
 })
 

+ 0 - 2
packages/compiler-core/src/babelUtils.ts

@@ -59,7 +59,6 @@ export function walkIdentifiers(
         }
       } else if (
         node.type === 'ObjectProperty' &&
-        // eslint-disable-next-line no-restricted-syntax
         parent?.type === 'ObjectPattern'
       ) {
         // mark property in destructure pattern
@@ -483,7 +482,6 @@ function isReferenced(node: Node, parent: Node, grandparent?: Node): boolean {
     // no: export { NODE as foo } from "foo";
     case 'ExportSpecifier':
       // @ts-expect-error
-      // eslint-disable-next-line no-restricted-syntax
       if (grandparent?.source) {
         return false
       }

+ 1 - 1
packages/compiler-dom/src/decodeHtmlBrowser.ts

@@ -1,4 +1,4 @@
-/* eslint-disable no-restricted-globals */
+/* oxlint-disable no-restricted-globals */
 
 let decoder: HTMLDivElement
 

+ 2 - 2
packages/compiler-sfc/__tests__/compileTemplate.spec.ts

@@ -395,8 +395,8 @@ test('should generate the correct imports expression', () => {
     `,
     ssr: true,
   })
-  expect(code).toMatch(`_ssrRenderAttr(\"src\", _imports_1)`)
-  expect(code).toMatch(`_createVNode(\"img\", { src: _imports_1 })`)
+  expect(code).toMatch(`_ssrRenderAttr("src", _imports_1)`)
+  expect(code).toMatch(`_createVNode("img", { src: _imports_1 })`)
 })
 
 // #3874

+ 1 - 1
packages/compiler-ssr/__tests__/utils.ts

@@ -6,7 +6,7 @@ export function getCompiledString(src: string): string {
   // but also means this util can only be used for non-root cases.
   const { code } = compile(`<div>${src}</div>`)
   const match = code.match(
-    /_push\(\`<div\${\s*_ssrRenderAttrs\(_attrs\)\s*}>([^]*)<\/div>\`\)/,
+    /_push\(`<div\${\s*_ssrRenderAttrs\(_attrs\)\s*}>([^]*)<\/div>`\)/,
   )
 
   if (!match) {

+ 0 - 1
packages/reactivity/src/system.ts

@@ -1,4 +1,3 @@
-/* eslint-disable */
 // Ported from https://github.com/stackblitz/alien-signals/blob/v3.0.0/src/system.ts
 import type { ComputedRefImpl as Computed } from './computed.js'
 import type { ReactiveEffect as Effect } from './effect.js'

+ 1 - 0
packages/runtime-core/__tests__/apiWatch.spec.ts

@@ -1264,6 +1264,7 @@ describe('api: watch', () => {
       sideEffect = obj.a
     })
 
+    // oxlint-disable-next-line no-self-assign
     v.value = v.value
     await nextTick()
     // should not trigger

+ 1 - 1
packages/runtime-core/__tests__/helpers/useId.spec.ts

@@ -28,7 +28,7 @@ async function runOnClient(factory: TestCaseFactory) {
 async function runOnServer(factory: TestCaseFactory) {
   const [app, _] = await factory()
   return (await renderToString(app))
-    .replace(/<!--[\[\]]-->/g, '') // remove fragment wrappers
+    .replace(/<!--[[\]]-->/g, '') // remove fragment wrappers
     .trim()
 }
 

+ 1 - 0
packages/runtime-core/__tests__/hydration.spec.ts

@@ -1959,6 +1959,7 @@ describe('SSR hydration', () => {
       expect(container.innerHTML).toBe(
         `<div show="true"><!--[--><div><div><div>foo</div></div></div><div>1</div><!--]--></div>`,
       )
+      // oxlint-disable-next-line no-useless-catch
     } catch (e) {
       throw e
     } finally {

+ 1 - 1
packages/runtime-core/__tests__/rendererAttrsFallthrough.spec.ts

@@ -745,7 +745,7 @@ describe('attribute fallthrough', () => {
     toggle.value = true
     await nextTick()
     expect(root.innerHTML).toBe(
-      `<!-- comment A --><span class=\"red\">Foo</span>`,
+      `<!-- comment A --><span class="red">Foo</span>`,
     )
   })
 

+ 2 - 2
packages/runtime-core/src/compat/global.ts

@@ -495,7 +495,7 @@ function installCompatMount(
 
       let container: Element
       if (typeof selectorOrEl === 'string') {
-        // eslint-disable-next-line
+        // oxlint-disable-next-line
         const result = document.querySelector(selectorOrEl)
         if (!result) {
           __DEV__ &&
@@ -506,7 +506,7 @@ function installCompatMount(
         }
         container = result
       } else {
-        // eslint-disable-next-line
+        // oxlint-disable-next-line
         container = selectorOrEl || document.createElement('div')
       }
 

+ 2 - 2
packages/runtime-core/src/components/Suspense.ts

@@ -458,7 +458,7 @@ function createSuspenseBoundary(
   if (__DEV__ && !__TEST__ && !hasWarned) {
     hasWarned = true
     // @ts-expect-error `console.info` cannot be null error
-    // eslint-disable-next-line no-console
+    // oxlint-disable-next-line no-console
     console[console.info ? 'info' : 'log'](
       `<Suspense> is an experimental feature and its API will likely change.`,
     )
@@ -775,7 +775,7 @@ function hydrateSuspense(
     parentSuspense,
     parentComponent,
     node.parentNode!,
-    // eslint-disable-next-line no-restricted-globals
+    // oxlint-disable-next-line no-restricted-globals
     document.createElement('div'),
     null,
     namespace,

+ 1 - 1
packages/runtime-core/src/customFormatter.ts

@@ -12,7 +12,7 @@ import type { ComponentInternalInstance, ComponentOptions } from './component'
 import type { ComponentPublicInstance } from './componentPublicInstance'
 
 export function initCustomFormatter(): void {
-  /* eslint-disable no-restricted-globals */
+  /* oxlint-disable no-restricted-globals */
   if (!__DEV__ || typeof window === 'undefined') {
     return
   }

+ 1 - 2
packages/runtime-core/src/devtools.ts

@@ -1,4 +1,4 @@
-/* eslint-disable no-restricted-globals */
+/* oxlint-disable no-restricted-globals */
 import type { App } from './apiCreateApp'
 import { Comment, Fragment, Static, Text } from './vnode'
 import type { GenericComponentInstance } from './component'
@@ -63,7 +63,6 @@ export function setDevtoolsHook(hook: DevtoolsHook, target: any): void {
     // some envs mock window but not fully
     window.HTMLElement &&
     // also exclude jsdom
-    // eslint-disable-next-line no-restricted-syntax
     !window.navigator?.userAgent?.includes('jsdom')
   ) {
     const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =

+ 1 - 1
packages/runtime-core/src/hmr.ts

@@ -1,4 +1,4 @@
-/* eslint-disable no-restricted-globals */
+/* oxlint-disable no-restricted-globals */
 import { EffectFlags } from '@vue/reactivity'
 import {
   type ClassComponent,

+ 1 - 1
packages/runtime-core/src/hydrationStrategies.ts

@@ -35,7 +35,7 @@ export const hydrateOnIdle: HydrationStrategyFactory<number> =
 
 function elementIsVisibleInViewport(el: Element) {
   const { top, left, bottom, right } = el.getBoundingClientRect()
-  // eslint-disable-next-line no-restricted-globals
+  // oxlint-disable-next-line no-restricted-globals
   const { innerHeight, innerWidth } = window
   return (
     ((top > 0 && top < innerHeight) || (bottom > 0 && bottom < innerHeight)) &&

+ 1 - 1
packages/runtime-core/src/profiling.ts

@@ -1,4 +1,4 @@
-/* eslint-disable no-restricted-globals */
+/* oxlint-disable no-restricted-globals */
 import { type GenericComponentInstance, formatComponentName } from './component'
 import { devtoolsPerfEnd, devtoolsPerfStart } from './devtools'
 

+ 0 - 1
packages/runtime-core/src/warning.ts

@@ -54,7 +54,6 @@ export function warn(msg: string, ...args: any[]): void {
       instance,
       ErrorCodes.APP_WARN_HANDLER,
       [
-        // eslint-disable-next-line no-restricted-syntax
         msg + args.map(a => a.toString?.() ?? JSON.stringify(a)).join(''),
         (instance && instance.proxy) || instance,
         trace

+ 1 - 1
packages/runtime-dom/__tests__/customElement.spec.ts

@@ -714,7 +714,7 @@ describe('defineCustomElement', () => {
     // https://github.com/vuejs/core/issues/12964
     // Disabled because of missing support for `delegatesFocus` in jsdom
     // https://github.com/jsdom/jsdom/issues/3418
-    // eslint-disable-next-line vitest/no-disabled-tests
+    // oxlint-disable-next-line vitest/no-disabled-tests
     test.skip('shadowRoot should be initialized with delegatesFocus', () => {
       const E = defineCustomElement(
         {

+ 1 - 1
packages/runtime-vapor/__tests__/componentAttrs.spec.ts

@@ -631,7 +631,7 @@ describe('attribute fallthrough', () => {
     toggle.value = true
     await nextTick()
     expect(host.innerHTML).toBe(
-      `<!-- comment A --><span class=\"red\">Foo</span><!--if-->`,
+      `<!-- comment A --><span class="red">Foo</span><!--if-->`,
     )
   })
 

+ 1 - 1
packages/runtime-vapor/__tests__/componentSlots.spec.ts

@@ -1197,7 +1197,7 @@ describe('component: slots', () => {
       const createTestApp = (
         rootComponent: any,
         foo: Ref<string>,
-        show: Ref<Boolean>,
+        show: Ref<boolean>,
       ) => {
         return {
           setup() {

+ 1 - 1
packages/server-renderer/src/renderToStream.ts

@@ -206,7 +206,7 @@ export function pipeToWebWritable(
     },
     destroy(err) {
       // TODO better error handling?
-      // eslint-disable-next-line no-console
+      // oxlint-disable-next-line no-console
       console.log(err)
       writer.close()
     },

+ 1 - 2
packages/vue/jsx-runtime/index.d.ts

@@ -1,4 +1,3 @@
-/* eslint-disable @typescript-eslint/ban-ts-comment */
 import type { NativeElements, ReservedProps, VNode } from '@vue/runtime-dom'
 
 /**
@@ -18,7 +17,7 @@ export namespace JSX {
   }
   export interface IntrinsicElements extends NativeElements {
     // allow arbitrary elements
-    // @ts-ignore suppress ts:2374 = Duplicate string index signature.
+    // @ts-expect-error suppress ts:2374 = Duplicate string index signature.
     [name: string]: any
   }
   export interface IntrinsicAttributes extends ReservedProps {}

+ 0 - 2
packages/vue/jsx.d.ts

@@ -1,4 +1,3 @@
-/* eslint-disable @typescript-eslint/ban-ts-comment */
 // global JSX namespace registration
 // somehow we have to copy=pase the jsx-runtime types here to make TypeScript happy
 import type { NativeElements, ReservedProps, VNode } from '@vue/runtime-dom'
@@ -14,7 +13,6 @@ declare global {
     }
     export interface IntrinsicElements extends NativeElements {
       // allow arbitrary elements
-      // @ts-ignore suppress ts:2374 = Duplicate string index signature.
       [name: string]: any
     }
     export interface IntrinsicAttributes extends ReservedProps {}

Diff do ficheiro suprimidas por serem muito extensas
+ 104 - 571
pnpm-lock.yaml


+ 0 - 8
pnpm-workspace.yaml

@@ -17,11 +17,3 @@ onlyBuiltDependencies:
   - 'puppeteer'
   - 'simple-git-hooks'
   - 'unrs-resolver'
-
-peerDependencyRules:
-  allowedVersions:
-    'typescript-eslint>eslint': '^9.0.0'
-    '@typescript-eslint/eslint-plugin>eslint': '^9.0.0'
-    '@typescript-eslint/parser>eslint': '^9.0.0'
-    '@typescript-eslint/type-utils>eslint': '^9.0.0'
-    '@typescript-eslint/utils>eslint': '^9.0.0'

+ 0 - 13
scripts/release.js

@@ -81,19 +81,6 @@ const packages = fs
     }
   })
 
-const isCorePackage = (/** @type {string} */ pkgName) => {
-  if (!pkgName) return
-
-  if (pkgName === 'vue' || pkgName === '@vue/compat') {
-    return true
-  }
-
-  return (
-    pkgName.startsWith('@vue') &&
-    packages.includes(pkgName.replace(/^@vue\//, ''))
-  )
-}
-
 const keepThePackageName = (/** @type {string} */ pkgName) => pkgName
 
 /** @type {string[]} */

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff