Skip to content

Commit

Permalink
fix: search for tsconfig relative to eslintrc (#1263)
Browse files Browse the repository at this point in the history
* fix: search for tsconfig relative to eslintrc

* chore: add changeset
  • Loading branch information
mkreuzmayr authored Mar 16, 2023
1 parent 708bf90 commit 8dc6e33
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/fresh-cars-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-t3-app": patch
---

search for tsconfig relative to eslintrc
7 changes: 5 additions & 2 deletions cli/template/base/_eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require("path");

/** @type {import("eslint").Linter.Config} */
const config = {
overrides: [
Expand All @@ -7,13 +10,13 @@ const config = {
],
files: ["*.ts", "*.tsx"],
parserOptions: {
project: "tsconfig.json",
project: path.join(__dirname, "tsconfig.json"),
},
},
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
project: path.join(__dirname, "tsconfig.json"),
},
plugins: ["@typescript-eslint"],
extends: ["next/core-web-vitals", "plugin:@typescript-eslint/recommended"],
Expand Down

0 comments on commit 8dc6e33

Please sign in to comment.