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

Use ESLint flat config in base recipe #1013

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
31 changes: 9 additions & 22 deletions packages/create/src/recipes/_base/template/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
import { FlatCompat } from "@eslint/eslintrc";
import js from "@eslint/js";
// @ts-check

const compat = new FlatCompat();
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintConfigPrettier from "eslint-config-prettier";

export default [
{
...compat
.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"prettier"
)
.map((c) => ({
...c,
files: ["**/*.{ts,tsx,mts}"],
})),
},
{
files: ["**/*.{js,jsx,cjs,mjs}"],
...js.configs.recommended,
},
];
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier
);
9 changes: 4 additions & 5 deletions packages/create/src/recipes/_base/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
},
"devDependencies": {
"@edgedb/generate": "0.x",
"@typescript-eslint/eslint-plugin": "6.x",
"@typescript-eslint/parser": "6.x",
"@eslint/eslintrc": "2.x",
"eslint": "8.x",
"@eslint/js": "9.x",
"eslint": "9.x",
"eslint-config-prettier": "9.x",
"prettier": "3.x",
"typescript": "5.x"
"typescript": "5.x",
"typescript-eslint": "7.x"
}
}