Skip to content

Commit

Permalink
ci(linting): fix typescript parser issue (#11243)
Browse files Browse the repository at this point in the history
## Summary

Resolve a lint-staged error reported by @macandcheese:

```text
✖ eslint --fix:

/Users/adam9519/Documents/git-repositories/calcite-design-system/packages/calcite-components/src/components/combobox/combobox.stories.ts
  0:0  error  Parsing error: /Users/adam9519/Documents/git-repositories/calcite-design-system/packages/calcite-components/src/components/combobox/combobox.stories.ts was not found by the project service. Consider either including it in the tsconfig.json or including it in allowDefaultProject

✖ 1 problem (1 error, 0 warnings)

husky - pre-commit script failed (code 1)
Hook process exited.
```

It seems like the projectService option is using `tsconfig.json` (which
excludes stories) instead of `tsconfig-eslint.json`. Disabling the
option for now.


ref: https://typescript-eslint.io/getting-started/typed-linting/
  • Loading branch information
benelan authored Jan 9, 2025
1 parent 0cfd639 commit 2cdc294
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/calcite-components/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export default tseslint.config(
parser: tseslint.parser,
parserOptions: {
tsconfigRootDir: __dirname,
projectService: true,
project: ["tsconfig-eslint.json"],
},
},
Expand Down
1 change: 0 additions & 1 deletion packages/calcite-design-tokens/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export default tseslint.config(

parserOptions: {
tsconfigRootDir: __dirname,
projectService: true,
project: ["tsconfig-eslint.json"],
},
},
Expand Down

0 comments on commit 2cdc294

Please sign in to comment.