diff --git a/lint.config.ts b/lint.config.ts index 25eac7767de..34c6182d80e 100644 --- a/lint.config.ts +++ b/lint.config.ts @@ -49,37 +49,35 @@ export const lintConfig = { 'web/public/**', 'web/types/doc-paths.ts', ], - plugins: ['import', 'unicorn', 'node', 'jsdoc', 'typescript', 'vitest', 'react', 'jsx-a11y'], + plugins: ['import', 'jsdoc', 'jsx-a11y', 'node', 'react', 'typescript', 'unicorn', 'vitest'], + // Keep JavaScript plugins ordered by rule namespace. The `-js` aliases distinguish + // plugins that supplement an active native Oxlint plugin with the same namespace. jsPlugins: [ + '@tanstack/eslint-plugin-query', 'eslint-plugin-antfu', + 'eslint-plugin-command', + 'eslint-plugin-erasable-syntax-only', { name: 'eslint-comments', specifier: '@eslint-community/eslint-plugin-eslint-comments', }, - 'eslint-plugin-command', - 'eslint-plugin-perfectionist', - 'eslint-plugin-regexp', - 'eslint-plugin-erasable-syntax-only', { name: 'eslint-react', specifier: '@eslint-react/eslint-plugin', }, - { - name: 'node-js', - specifier: 'eslint-plugin-n', - }, + 'eslint-plugin-hyoban', { name: 'jsdoc-js', specifier: 'eslint-plugin-jsdoc', }, - { - name: 'jsx-a11y-js', - specifier: 'eslint-plugin-jsx-a11y', - }, 'eslint-plugin-no-barrel-files', - '@tanstack/eslint-plugin-query', + { + name: 'node-js', + specifier: 'eslint-plugin-n', + }, + 'eslint-plugin-perfectionist', + 'eslint-plugin-regexp', 'eslint-plugin-storybook', - 'eslint-plugin-hyoban', ], options: { reportUnusedDisableDirectives: 'warn', @@ -652,11 +650,6 @@ export const lintConfig = { '@tanstack/query/infinite-query-property-order': 'error', '@tanstack/query/no-void-query-fn': 'error', '@tanstack/query/mutation-property-order': 'error', - }, - }, - { - files: ['web/**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}'], - rules: { 'react/exhaustive-deps': 'warn', 'react/no-array-index-key': 'warn', 'react/no-clone-element': 'warn', @@ -686,25 +679,6 @@ export const lintConfig = { 'jsx-a11y/aria-unsupported-elements': 'error', 'jsx-a11y/autocomplete-valid': 'error', 'jsx-a11y/click-events-have-key-events': 'error', - 'jsx-a11y-js/control-has-associated-label': [ - 'off', - { - ignoreElements: ['audio', 'canvas', 'embed', 'input', 'textarea', 'tr', 'video'], - ignoreRoles: [ - 'grid', - 'listbox', - 'menu', - 'menubar', - 'radiogroup', - 'row', - 'tablist', - 'toolbar', - 'tree', - 'treegrid', - ], - includeRoles: ['alert', 'dialog'], - }, - ], 'jsx-a11y/heading-has-content': 'error', 'jsx-a11y/html-has-lang': 'error', 'jsx-a11y/iframe-has-title': 'error', @@ -1151,6 +1125,8 @@ export const lintConfig = { 'react/rules-of-hooks': 'error', 'react/jsx-no-comment-textnodes': 'warn', 'react/only-export-components': 'off', + 'eslint-react/no-context-provider': 'off', + 'eslint-react/no-use-context': 'off', }, }, { @@ -1291,13 +1267,6 @@ export const lintConfig = { ], }, }, - { - files: ['packages/dify-ui/**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}'], - rules: { - 'eslint-react/no-context-provider': 'off', - 'eslint-react/no-use-context': 'off', - }, - }, { files: [ 'packages/dify-ui/**/__tests__/**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}', diff --git a/package.json b/package.json index 79cfd9af925..985480b162c 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "eslint-plugin-hyoban": "catalog:", "eslint-plugin-jsdoc": "catalog:", "eslint-plugin-jsonc": "catalog:", - "eslint-plugin-jsx-a11y": "catalog:", "eslint-plugin-markdown-preferences": "catalog:", "eslint-plugin-n": "catalog:", "eslint-plugin-no-barrel-files": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 50f9712b6f6..ccc3da07be3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -351,9 +351,6 @@ catalogs: eslint-plugin-jsonc: specifier: 3.3.0 version: 3.3.0 - eslint-plugin-jsx-a11y: - specifier: 6.10.2 - version: 6.10.2 eslint-plugin-markdown-preferences: specifier: 0.41.1 version: 0.41.1 @@ -716,9 +713,6 @@ importers: eslint-plugin-jsonc: specifier: 'catalog:' version: 3.3.0(eslint@10.7.0(jiti@2.7.0)) - eslint-plugin-jsx-a11y: - specifier: 'catalog:' - version: 6.10.2(eslint@10.7.0(jiti@2.7.0)) eslint-plugin-markdown-preferences: specifier: 'catalog:' version: 0.41.1(@eslint/markdown@8.0.3)(eslint@10.7.0(jiti@2.7.0)) @@ -6434,12 +6428,6 @@ packages: peerDependencies: eslint: '>=9.38.0' - eslint-plugin-jsx-a11y@6.10.2: - resolution: {integrity: sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==} - engines: {node: '>=4.0'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 - eslint-plugin-markdown-preferences@0.41.1: resolution: {integrity: sha512-Xi4rlT7oBZ8PMGDl7J9khgO2vF9X0F/6ag05/25Vyq7r3llaK95x9D6DpzXidxC2Gagl/e8bp2Hw47r4I3wWSA==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} @@ -14788,25 +14776,6 @@ snapshots: transitivePeerDependencies: - '@eslint/json' - eslint-plugin-jsx-a11y@6.10.2(eslint@10.7.0(jiti@2.7.0)): - dependencies: - aria-query: 5.3.2 - array-includes: 3.1.9 - array.prototype.flatmap: 1.3.3 - ast-types-flow: 0.0.8 - axe-core: 4.12.1 - axobject-query: 4.1.0 - damerau-levenshtein: 1.0.8 - emoji-regex: 9.2.2 - eslint: 10.7.0(jiti@2.7.0) - hasown: 2.0.4 - jsx-ast-utils: 3.3.5 - language-tags: 1.0.9 - minimatch: 3.1.5 - object.fromentries: 2.0.8 - safe-regex-test: 1.1.0 - string.prototype.includes: 2.0.1 - eslint-plugin-markdown-preferences@0.41.1(@eslint/markdown@8.0.3)(eslint@10.7.0(jiti@2.7.0)): dependencies: '@eslint/markdown': 8.0.3 @@ -19311,7 +19280,6 @@ time: eslint-plugin-hyoban@0.14.1: '2026-03-08T02:51:00.805Z' eslint-plugin-jsdoc@63.0.13: '2026-07-10T02:14:18.206Z' eslint-plugin-jsonc@3.3.0: '2026-07-07T00:25:44.392Z' - eslint-plugin-jsx-a11y@6.10.2: '2024-10-26T04:45:18.067Z' eslint-plugin-markdown-preferences@0.41.1: '2026-04-09T23:28:41.552Z' eslint-plugin-n@18.2.2: '2026-07-11T01:32:26.873Z' eslint-plugin-no-barrel-files@1.3.1: '2026-04-12T18:28:18.653Z' diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 30489036a54..2ea335f5f65 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -166,7 +166,6 @@ catalog: eslint-plugin-hyoban: 0.14.1 eslint-plugin-jsdoc: 63.0.13 eslint-plugin-jsonc: 3.3.0 - eslint-plugin-jsx-a11y: 6.10.2 eslint-plugin-markdown-preferences: 0.41.1 eslint-plugin-n: 18.2.2 eslint-plugin-no-barrel-files: 1.3.1