Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint v9 support #13

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/pretty-trains-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zemd/eslint-flat-config": major
---

supporting eslint v9
Binary file modified bun.lockb
Binary file not shown.
15 changes: 12 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import config from "./src/";
import { createEslintConfig } from "./src/";

export default [
...config
];
...createEslintConfig({
useStorybook: true,
useGraphQL: true,
useLodash: true,
useNextjs: true,
usePlaywright: true,
useTailwind: true,
useTurbo: true,
useVitest: true,
}),
];
50 changes: 25 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"email": "[email protected]",
"url": "https://codeandgin.co"
},
"homepage": "https://github.com/zemd/eslint-config",
"homepage": "https://github.com/zemd/eslint-flat-config",
"repository": {
"type": "git",
"url": "https://github.com/zemd/eslint-config.git"
"url": "https://github.com/zemd/eslint-flat-config.git"
},
"bugs": {
"url": "https://github.com/zemd/eslint-config/issues"
"url": "https://github.com/zemd/eslint-flat-config/issues"
},
"files": [
"dist"
Expand All @@ -39,44 +39,44 @@
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsup",
"dev": "eslint-flat-config-viewer",
"dev": "bunx @eslint/config-inspector",
"release": "bun run build && changeset publish"
},
"peerDependencies": {
"eslint": ">=8.53.0"
"eslint": ">=9.2.0"
},
"dependencies": {
"@eslint/js": "^8.57.0",
"@eslint/js": "^9.2.0",
"@graphql-eslint/eslint-plugin": "^3.20.1",
"@next/eslint-plugin-next": "^14.1.1",
"@stylistic/eslint-plugin": "^1.6.3",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@next/eslint-plugin-next": "^14.2.3",
"@stylistic/eslint-plugin": "^2.1.0",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/experimental-utils": "^5.62.0",
"@typescript-eslint/parser": "^7.1.0",
"@typescript-eslint/parser": "^7.8.0",
"eslint-define-config": "^2.1.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-lodash-f": "^7.5.3",
"eslint-plugin-playwright": "^1.5.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-sonarjs": "^0.24.0",
"eslint-plugin-playwright": "^1.6.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-sonarjs": "^1.0.3",
"eslint-plugin-sort-keys": "^2.3.5",
"eslint-plugin-storybook": "^0.8.0",
"eslint-plugin-tailwindcss": "^3.14.3",
"eslint-plugin-turbo": "^1.12.4",
"eslint-plugin-unicorn": "^51.0.1",
"eslint-plugin-vitest": "^0.3.22"
"eslint-plugin-tailwindcss": "^3.15.1",
"eslint-plugin-turbo": "^1.13.3",
"eslint-plugin-unicorn": "^53.0.0",
"eslint-plugin-vitest": "^0.5.4"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@swc/core": "^1.4.2",
"@types/eslint": "^8.56.5",
"@eslint/config-inspector": "^0.4.8",
"@swc/core": "^1.5.5",
"@types/eslint": "^8.56.10",
"@types/eslint__js": "^8.42.3",
"@types/node": "^20.11.24",
"@zemd/tsconfig": "^1.2.0",
"eslint": "^8.57.0",
"eslint-flat-config-viewer": "^0.1.11",
"@types/node": "^20.12.11",
"@zemd/tsconfig": "^1.3.0",
"eslint": "^9.2.0",
"tsup": "^8.0.2",
"typescript": "^5.3.3"
"typescript": "^5.4.5"
}
}
4 changes: 2 additions & 2 deletions src/features/recommended.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Linter } from "eslint";

import eslintJsRecommended from "@eslint/js";
import unicorn from "eslint-plugin-unicorn";
import * as sonarjs from "eslint-plugin-sonarjs";
import sonarjs from "eslint-plugin-sonarjs";
import { unicornRules } from "../rules/unicorn.js";
import { customEslintRules } from "../rules/eslint.js";
import { supportedAllFileTypes } from "../config.js";
Expand Down Expand Up @@ -40,6 +40,6 @@ export const rules: Array<Linter.FlatConfig> = [
files: [`**/*.{${supportedAllFileTypes}}`],
plugins: { sonarjs },
// @ts-ignore
rules: sonarjs.configs.recommended.rules,
rules: sonarjs.configs.recommended,
},
];