Open regseb opened 2 years ago
Use case: .storybook
folder
Thans for workaround.
After updating to version @5
, I began to get errors in the IDE in storybook files.
Having issues with .storybook
folder too
Even in TS 5.0, .storybook
or any dot folders needs to be explicitly included in config.
This is particularly problematic with typescript eslint:
Parsing error: ESLint was configured to run on <tsconfigRootDir>/packages/eslint-config/.prettierrc.js using parserOptions.project: folder/tsconfig.json
However, that TSConfig does not include this file. Either:
- Change ESLint's list of included files to not include this file
- Change that TSConfig to include this file
- Create a new TSConfig that includes this file and include it in your parserOptions.project
See the typescript-eslint docs for more info: 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
I would not name the option hidden
(which is too ambigous), but includeDot
and excludeDot
.
I would not name the option
hidden
(which is too ambigous), butincludeDot
andexcludeDot
.
This is correct. "Hidden" depends on the environment. In case of Linux, yes, but still depends on the filesystem and some don't have EXT4, hence "dotfiles".
What about Windows? Please correct if mistaken, but in Windows, you have NTFS with both prefixes like $
and file metadata as hidden
and system
referenced in file header attributes.
Use case: .storybook folder
Adding .storybook/**/*
to the config include
array works.
Today got bit by the fact that hidden files are ignored because it was refusing to look at .eslintrc.js
In the Storybook case (using typescript-eslint), the following worked for me:
.tsconfig
"include": [
".storybook/**/*"
],
.eslintrc
ignorePatterns: [
'!.storybook',
],
Suggestion
🔍 Search Terms
hidden, dot, include, tsconfig.
✅ Viability Checklist
My suggestion meets these guidelines:
⭐ Suggestion
Add an option in TSConfig to include hidden files (and hidden directories) in
include
andexclude
options.Other alternative names for
hidden
:dot
like in:.dot
files in normal matches andglobstar
matches. Note that an explicit dot in a portion of the pattern will always match dot files..
).includeDot
andexcludeDot
by silverwind: #49555 (comment)📃 Motivating Example
Proposal for wildcard documentation:
💻 Use Cases
I want to scan all files in my project, even hidden files and files in a hidden directory. I use this TSConfig: