瀏覽代碼

oxlint (#22584)

tags/1.7.0
Asuka Minato 3 月之前
父節點
當前提交
f8c7b28da7
沒有連結到貢獻者的電子郵件帳戶。
共有 3 個檔案被更改,包括 20 行新增2 行删除
  1. 2
    0
      web/eslint.config.mjs
  2. 3
    2
      web/package.json
  3. 15
    0
      web/pnpm-lock.yaml

+ 2
- 0
web/eslint.config.mjs 查看文件

import tailwind from 'eslint-plugin-tailwindcss' import tailwind from 'eslint-plugin-tailwindcss'
import reactHooks from 'eslint-plugin-react-hooks' import reactHooks from 'eslint-plugin-react-hooks'
import sonar from 'eslint-plugin-sonarjs' import sonar from 'eslint-plugin-sonarjs'
import oxlint from 'eslint-plugin-oxlint'


// import reactRefresh from 'eslint-plugin-react-refresh' // import reactRefresh from 'eslint-plugin-react-refresh'


'tailwindcss/migration-from-tailwind-2': 'warn', 'tailwindcss/migration-from-tailwind-2': 'warn',
}, },
}, },
oxlint.configs['flat/recommended'],
) )

+ 3
- 2
web/package.json 查看文件

"dev": "cross-env NODE_OPTIONS='--inspect' next dev", "dev": "cross-env NODE_OPTIONS='--inspect' next dev",
"build": "next build", "build": "next build",
"start": "cp -r .next/static .next/standalone/.next/static && cp -r public .next/standalone/public && cross-env PORT=$npm_config_port HOSTNAME=$npm_config_host node .next/standalone/server.js", "start": "cp -r .next/static .next/standalone/.next/static && cp -r public .next/standalone/public && cross-env PORT=$npm_config_port HOSTNAME=$npm_config_host node .next/standalone/server.js",
"lint": "pnpm eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache",
"lint-only-show-error": "pnpm eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --quiet",
"lint": "pnpx oxlint && pnpm eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache",
"lint-only-show-error": "pnpx oxlint && pnpm eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --quiet",
"fix": "next lint --fix", "fix": "next lint --fix",
"eslint-fix": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --fix", "eslint-fix": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --fix",
"eslint-fix-only-show-error": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --fix --quiet", "eslint-fix-only-show-error": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --fix --quiet",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^9.20.1", "eslint": "^9.20.1",
"eslint-config-next": "~15.3.5", "eslint-config-next": "~15.3.5",
"eslint-plugin-oxlint": "^1.6.0",
"eslint-plugin-react-hooks": "^5.1.0", "eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.19", "eslint-plugin-react-refresh": "^0.4.19",
"eslint-plugin-sonarjs": "^3.0.2", "eslint-plugin-sonarjs": "^3.0.2",

+ 15
- 0
web/pnpm-lock.yaml 查看文件

eslint-config-next: eslint-config-next:
specifier: ~15.3.5 specifier: ~15.3.5
version: 15.3.5(eslint@9.31.0(jiti@1.21.7))(typescript@5.8.3) version: 15.3.5(eslint@9.31.0(jiti@1.21.7))(typescript@5.8.3)
eslint-plugin-oxlint:
specifier: ^1.6.0
version: 1.6.0
eslint-plugin-react-hooks: eslint-plugin-react-hooks:
specifier: ^5.1.0 specifier: ^5.1.0
version: 5.2.0(eslint@9.31.0(jiti@1.21.7)) version: 5.2.0(eslint@9.31.0(jiti@1.21.7))
resolution: {integrity: sha512-brcKcxGnISN2CcVhXJ/kEQlNa0MEfGRtwKtWA16SkqXHKitaKIMrfemJKLKX1YqDU5C/5JY3PvZXd5jEW04e0Q==} resolution: {integrity: sha512-brcKcxGnISN2CcVhXJ/kEQlNa0MEfGRtwKtWA16SkqXHKitaKIMrfemJKLKX1YqDU5C/5JY3PvZXd5jEW04e0Q==}
engines: {node: '>=5.0.0'} engines: {node: '>=5.0.0'}


eslint-plugin-oxlint@1.6.0:
resolution: {integrity: sha512-DH5p3sCf0nIAPscl3yGnBWXXraV0bdl66hpLxvfnabvg/GzpgXf+pOCWpGK3qDb0+AIUkh1R/7A8GkOXtlj0oA==}

eslint-plugin-perfectionist@4.15.0: eslint-plugin-perfectionist@4.15.0:
resolution: {integrity: sha512-pC7PgoXyDnEXe14xvRUhBII8A3zRgggKqJFx2a82fjrItDs1BSI7zdZnQtM2yQvcyod6/ujmzb7ejKPx8lZTnw==} resolution: {integrity: sha512-pC7PgoXyDnEXe14xvRUhBII8A3zRgggKqJFx2a82fjrItDs1BSI7zdZnQtM2yQvcyod6/ujmzb7ejKPx8lZTnw==}
engines: {node: ^18.0.0 || >=20.0.0} engines: {node: ^18.0.0 || >=20.0.0}
resolution: {integrity: sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==} resolution: {integrity: sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}


jsonc-parser@3.3.1:
resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==}

jsonfile@6.1.0: jsonfile@6.1.0:
resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==}




eslint-plugin-no-only-tests@3.3.0: {} eslint-plugin-no-only-tests@3.3.0: {}


eslint-plugin-oxlint@1.6.0:
dependencies:
jsonc-parser: 3.3.1

eslint-plugin-perfectionist@4.15.0(eslint@9.31.0(jiti@1.21.7))(typescript@5.8.3): eslint-plugin-perfectionist@4.15.0(eslint@9.31.0(jiti@1.21.7))(typescript@5.8.3):
dependencies: dependencies:
'@typescript-eslint/types': 8.37.0 '@typescript-eslint/types': 8.37.0
espree: 9.6.1 espree: 9.6.1
semver: 7.7.2 semver: 7.7.2


jsonc-parser@3.3.1: {}

jsonfile@6.1.0: jsonfile@6.1.0:
dependencies: dependencies:
universalify: 2.0.1 universalify: 2.0.1

Loading…
取消
儲存