Skip to content

Commit

Permalink
Chore: Eslint include file fix
Browse files Browse the repository at this point in the history
- https://typescript-eslint.io/linting/troubleshooting/#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file

Parsing error: ESLint was configured to run on `src/transform-values/simply-important.ts` using `parserOptions.project`:
- <tsconfigRootDir>/tsconfig.json
- <tsconfigRootDir>/tsconfig.node.json
However, none of those TSConfigs include this file. Either:
- Change ESLint's list of included files to not include this file
- Change one of those TSConfigs to include this file
- Create a new TSConfig that includes this file and include it
  • Loading branch information
black7375 committed Nov 11, 2023
1 parent d7b95b0 commit 26b4c4e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion configs/eslint-config-custom/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ const { defineConfig } = require('eslint-define-config');
module.exports = defineConfig({
$schema: "https://json.schemastore.org/eslintrc.json",
parser: "@typescript-eslint/parser",
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
EXPERIMENTAL_useProjectService: true
},
plugins: [
"@typescript-eslint",
"prettier"
Expand Down
2 changes: 1 addition & 1 deletion packages/css/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "tsconfig-custom/tsconfig.json",
"include": ["./src/**/*.ts", "__tests__/**.ts"],
"include": ["src/**/*.ts", "__tests__/**/*.ts"],
"exclude": ["dist"],
"references": [{ "path": "tsconfig.node.json" }]
}
2 changes: 1 addition & 1 deletion packages/transform-to-vanilla/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "tsconfig-custom/tsconfig.json",
"include": ["./src/**/*.ts", "__tests__/**.ts"],
"include": ["src/**/*.ts", "__tests__/**/*.ts"],
"exclude": ["dist"],
"references": [{ "path": "tsconfig.node.json" }]
}

0 comments on commit 26b4c4e

Please sign in to comment.