Skip to content

Commit

Permalink
add tsconfig.json's to eslintrc.cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexErrant committed Jun 11, 2023
1 parent ac4c325 commit 6f8b4e8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
24 changes: 22 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
const path = require("path")

const project = [
path.join(__dirname, "app/tsconfig.lib.json"),
path.join(__dirname, "app-ugc/tsconfig.json"),
path.join(__dirname, "hub/tsconfig.json"),
path.join(__dirname, "hub-ugc/tsconfig.json"),
path.join(__dirname, "lrpc/tsconfig.json"),
path.join(__dirname, "shared/tsconfig.json"),
path.join(__dirname, "shared-dom/tsconfig.json"),
path.join(__dirname, "shared-edge/tsconfig.json"),
path.join(__dirname, "cwa/tsconfig.json"),
path.join(__dirname, "api-ugc/tsconfig.json"),
path.join(__dirname, "peer/tsconfig.json"),
path.join(__dirname, "workers-test/tsconfig.json"),
path.join(__dirname, "workers-test/test/tsconfig.json"),
path.join(__dirname, "example-plugins/solid/tsconfig.json"),
path.join(__dirname, "example-plugins/svelte/tsconfig.json"),
]

/* eslint-env node */
module.exports = {
root: true,
Expand All @@ -23,7 +43,7 @@ module.exports = {
plugins: ["@typescript-eslint", "solid"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: ["./tsconfig.json", "./test/tsconfig.json"],
project,
},
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
Expand Down Expand Up @@ -84,7 +104,7 @@ module.exports = {
plugins: ["@typescript-eslint"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
project,
},
rules: {
"@typescript-eslint/no-non-null-assertion": "off",
Expand Down
3 changes: 0 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"eslint.workingDirectories": [
"./app"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@
{
"path": "example-plugins/svelte"
},
// if adding or removing a project, also update the `./eslintrc.cjs`!
]
}

0 comments on commit 6f8b4e8

Please sign in to comment.