You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The behavior changed between config version 0.1 and 0.2.
0.1 - assumed the glob root was the current directory when cspell was run.
0.2 - assumes the glob root matches the location of the config file.
The behavior is different between cspell 4.x and cspell 5.x
cspell version 4.x always uses the 0.1 logic.
cspell version 5.x only uses 0.1 logic if version: "0.1" is found.
The simple fix
Change "version": "0.1" to
"version": "0.2"
In most cases this should just work. But if you use cspell --config <path to config>/cspell.json to run CSpell, you
might need to add globRoot to the configuration.
Glob Root
globRoot - The root to use for glop patterns found in the configuration file.
Default: location of the configuration file.
For compatibility reasons, config files with version 0.1, the glob root will default to be ${cwd}.
Defining globRoot, does not impact imported configurations.
globRoot Values:
${cwd} - will be replaced with the current working directory.
. - will be the location of the containing configuration file.
.. - will be the parent directory of the configuration file.
../<path> - will resolve relative to the location of the configuration file.
Config File Version 0.2
The behavior changed between config version
0.1
and0.2
.0.1
- assumed the glob root was the current directory whencspell
was run.0.2
- assumes the glob root matches the location of the config file.The behavior is different between cspell 4.x and cspell 5.x
0.1
logic.0.1
logic ifversion: "0.1"
is found.The simple fix
Change
"version": "0.1"
toIn most cases this should just work. But if you use
cspell --config <path to config>/cspell.json
to run CSpell, youmight need to add
globRoot
to the configuration.Glob Root
globRoot
- The root to use for glop patterns found in the configuration file.Default: location of the configuration file.
For compatibility reasons, config files with version
0.1
, the glob root will default to be${cwd}
.Defining globRoot, does not impact imported configurations.
globRoot
Values:${cwd}
- will be replaced with the current working directory..
- will be the location of the containing configuration file...
- will be the parent directory of the configuration file.../<path>
- will resolve relative to the location of the configuration file.Example:
config/cspell.json
The text was updated successfully, but these errors were encountered: