mirror of https://github.com/astral-sh/ruff
Upgrade to ESlint 9 (#16470)
Closes https://github.com/astral-sh/ruff/issues/12723
This commit is contained in:
parent
a08f5edf75
commit
8c899c5409
|
|
@ -101,14 +101,7 @@
|
||||||
matchManagers: ["cargo"],
|
matchManagers: ["cargo"],
|
||||||
matchPackageNames: ["strum"],
|
matchPackageNames: ["strum"],
|
||||||
description: "Weekly update of strum dependencies",
|
description: "Weekly update of strum dependencies",
|
||||||
},
|
}
|
||||||
{
|
|
||||||
groupName: "ESLint",
|
|
||||||
matchManagers: ["npm"],
|
|
||||||
matchPackageNames: ["eslint"],
|
|
||||||
allowedVersions: "<9",
|
|
||||||
description: "Constraint ESLint to version 8 until TypeScript-eslint supports ESLint 9", // https://github.com/typescript-eslint/typescript-eslint/issues/8211
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
vulnerabilityAlerts: {
|
vulnerabilityAlerts: {
|
||||||
commitMessageSuffix: "",
|
commitMessageSuffix: "",
|
||||||
|
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
{
|
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"plugins": ["@typescript-eslint"],
|
|
||||||
"extends": [
|
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:@typescript-eslint/eslint-recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
|
||||||
"plugin:react/recommended",
|
|
||||||
"plugin:react/jsx-runtime",
|
|
||||||
"plugin:react-hooks/recommended",
|
|
||||||
"plugin:import/recommended",
|
|
||||||
"plugin:import/typescript"
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
// Disable some recommended rules that we don't want to enforce.
|
|
||||||
"@typescript-eslint/no-explicit-any": "off",
|
|
||||||
"eqeqeq": ["error","always", { "null": "never"}]
|
|
||||||
},
|
|
||||||
"settings": {
|
|
||||||
"react": {
|
|
||||||
"version": "detect"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
import react from "eslint-plugin-react";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
import reactHooks from "eslint-plugin-react-hooks";
|
||||||
|
import importPlugin from "eslint-plugin-import";
|
||||||
|
|
||||||
|
export default tseslint.config(
|
||||||
|
tseslint.configs.eslintRecommended,
|
||||||
|
tseslint.configs.recommended,
|
||||||
|
reactHooks.configs["recommended-latest"],
|
||||||
|
importPlugin.flatConfigs.recommended,
|
||||||
|
importPlugin.flatConfigs.typescript,
|
||||||
|
{
|
||||||
|
...react.configs.flat.recommended,
|
||||||
|
...react.configs.flat["jsx-runtime"],
|
||||||
|
files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
|
||||||
|
languageOptions: {
|
||||||
|
...react.configs.flat.recommended.languageOptions,
|
||||||
|
ecmaVersion: "latest",
|
||||||
|
sourceType: "module",
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
eqeqeq: [
|
||||||
|
"error",
|
||||||
|
"always",
|
||||||
|
{
|
||||||
|
null: "never",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ignores: ["src/pkg/**"],
|
||||||
|
},
|
||||||
|
);
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -25,20 +25,20 @@
|
||||||
"smol-toml": "^1.3.0"
|
"smol-toml": "^1.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.21.0",
|
||||||
"@types/react": "^19.0.0",
|
"@types/react": "^19.0.0",
|
||||||
"@types/react-dom": "^19.0.0",
|
"@types/react-dom": "^19.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
||||||
"@typescript-eslint/parser": "^8.0.0",
|
|
||||||
"@vitejs/plugin-react-swc": "^3.0.0",
|
"@vitejs/plugin-react-swc": "^3.0.0",
|
||||||
"autoprefixer": "^10.4.13",
|
"autoprefixer": "^10.4.13",
|
||||||
"eslint": "^8.30.0",
|
"eslint": "^9.0.0",
|
||||||
"eslint-plugin-import": "^2.29.1",
|
"eslint-plugin-import": "^2.31.0",
|
||||||
"eslint-plugin-react": "^7.31.11",
|
"eslint-plugin-react": "^7.31.11",
|
||||||
"eslint-plugin-react-hooks": "^5.0.0",
|
"eslint-plugin-react-hooks": "^5.2.0",
|
||||||
"postcss": "^8.4.20",
|
"postcss": "^8.4.20",
|
||||||
"prettier": "^3.0.0",
|
"prettier": "^3.0.0",
|
||||||
"tailwindcss": "^3.2.4",
|
"tailwindcss": "^3.2.4",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
|
"typescript-eslint": "^8.25.0",
|
||||||
"vite": "^6.0.0"
|
"vite": "^6.0.0"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue