@cspell/cspell-types
Advanced tools
Comparing version 5.3.0-alpha.1 to 5.3.0-alpha.2
@@ -6,2 +6,14 @@ # Change Log | ||
# [5.3.0-alpha.2](https://github.com/streetsidesoftware/cspell/compare/v5.3.0-alpha.1...v5.3.0-alpha.2) (2021-02-22) | ||
### Bug Fixes | ||
* Add schema support for `enableFiletypes`. ([#979](https://github.com/streetsidesoftware/cspell/issues/979)) ([d18706e](https://github.com/streetsidesoftware/cspell/commit/d18706e3ffd7a6446396d339b85a753b4ae451e0)) | ||
* Add support for custom dictionaries ([#982](https://github.com/streetsidesoftware/cspell/issues/982)) ([196921d](https://github.com/streetsidesoftware/cspell/commit/196921dc635dce7cfdd5b6c300af54beeebde91a)) | ||
# [5.3.0-alpha.1](https://github.com/streetsidesoftware/cspell/compare/v5.3.0-alpha.0...v5.3.0-alpha.1) (2021-02-19) | ||
@@ -8,0 +20,0 @@ |
@@ -80,4 +80,21 @@ export declare type ReplaceEntry = [string, string]; | ||
/** languageIds for the files to spell check. */ | ||
enabledLanguageIds?: LanguageId[]; | ||
enabledLanguageIds?: LanguageIdSingle[]; | ||
/** | ||
* @title File Types to Check | ||
* @scope resource | ||
* @uniqueItems true | ||
* @markdownDescription | ||
* Enable / Disable checking file types (languageIds). | ||
* These are in additional to the file types specified by `cSpell.enabledLanguageIds`. | ||
* To disable a language, prefix with `!` as in `!json`, | ||
* | ||
* Example: | ||
* ``` | ||
* jsonc // enable checking for jsonc | ||
* !json // disable checking for json | ||
* kotlin // enable checking for kotlin | ||
* ``` | ||
*/ | ||
enableFiletypes?: LanguageIdSingle[]; | ||
/** | ||
* The maximum number of problems to report in a file. | ||
@@ -179,3 +196,3 @@ * @default 100 | ||
export declare type DictionaryFileTypes = 'S' | 'W' | 'C' | 'T'; | ||
export declare type DictionaryDefinition = DictionaryDefinitionPreferred | DictionaryDefinitionAlternate | DictionaryDefinitionLegacy; | ||
export declare type DictionaryDefinition = DictionaryDefinitionPreferred | DictionaryDefinitionCustom | DictionaryDefinitionAlternate | DictionaryDefinitionLegacy; | ||
export interface DictionaryDefinitionBase { | ||
@@ -193,11 +210,25 @@ /** The reference name of the dictionary, used with program language settings */ | ||
/** Path to the file */ | ||
path: FsPath; | ||
/** @hidden */ | ||
path: DictionaryPath; | ||
/** | ||
* Only for legacy dictionary definitions | ||
* @deprecated | ||
* @deprecatedMessage Use `path` instead. | ||
* @hidden | ||
*/ | ||
file?: undefined; | ||
} | ||
/** | ||
* Only for legacy dictionary definitions | ||
* @deprecated | ||
* @deprecatedMessage Use `DictionaryDefinitionPreferred` | ||
*/ | ||
export interface DictionaryDefinitionAlternate extends DictionaryDefinitionBase { | ||
/** @hidden */ | ||
path?: undefined; | ||
/** Path to the file */ | ||
file: FsPath; | ||
/** | ||
* Path to the file, only for legacy dictionary definitions | ||
* @deprecated | ||
* @deprecatedMessage Use `path` instead. | ||
*/ | ||
file: DictionaryPath; | ||
} | ||
@@ -228,2 +259,26 @@ /** | ||
} | ||
/** | ||
* Specifies the scope of a dictionary. | ||
*/ | ||
export declare type CustomDictionaryScope = 'user' | 'workspace' | 'folder'; | ||
/** | ||
* For Defining Custom dictionaries. They are generally scoped to a | ||
* `user`, `workspace`, or `folder`. | ||
* When `addWords` is true, indicates that the spell checker can add words | ||
* to the file. | ||
* Note: only plain text files with one word per line are supported at this moment. | ||
*/ | ||
export interface DictionaryDefinitionCustom extends DictionaryDefinitionPreferred { | ||
/** Path to custom dictionary text file. */ | ||
path: CustomDictionaryPath; | ||
/** | ||
* Defines the scope for when words will be added to the dictionary. | ||
* Scope values: `user`, `workspace`, `folder` | ||
*/ | ||
scope?: CustomDictionaryScope | CustomDictionaryScope[]; | ||
/** | ||
* When `true`, let's the spell checker know that words can be added to this dictionary. | ||
*/ | ||
addWords: boolean; | ||
} | ||
export interface LanguageSetting extends LanguageSettingFilterFields, BaseSetting { | ||
@@ -235,3 +290,3 @@ } | ||
/** The language id. Ex: "typescript", "html", or "php". "*" -- will match all languages */ | ||
languageId: LanguageId | LanguageId[]; | ||
languageId: LanguageId | LanguageIdSingle[]; | ||
/** The locale filter, matches against the language. This can be a comma separated list. "*" will match all locales. */ | ||
@@ -242,3 +297,3 @@ locale?: LocaleId | LocaleId[]; | ||
/** The language id. Ex: "typescript", "html", or "php". "*" -- will match all languages */ | ||
languageId: LanguageId | LanguageId[]; | ||
languageId: LanguageId | LanguageIdSingle[]; | ||
/** | ||
@@ -286,6 +341,30 @@ * Deprecated - The locale filter, matches against the language. This can be a comma separated list. "*" will match all locales. | ||
} | ||
/** This can be '*', 'typescript', 'cpp', 'json', etc. */ | ||
export declare type LanguageId = string; | ||
/** | ||
* This can be '*', 'typescript', 'cpp', 'json', etc. | ||
* @pattern ^!?[\w_\-\s]+$ | ||
*/ | ||
export declare type LanguageIdSingle = string; | ||
/** | ||
* This can be 'typescript,cpp,json,literal haskell', etc. | ||
* @pattern ^([\w_\-\s]+)(,[\w_\-\s]+)*$ | ||
*/ | ||
export declare type LanguageIdMultiple = string; | ||
/** | ||
* This can be 'typescript,cpp,json,literal haskell', etc. | ||
* @pattern ^(![\w_\-\s]+)(,![\w_\-\s]+)*$ | ||
*/ | ||
export declare type LanguageIdMultipleNeg = string; | ||
export declare type LanguageId = LanguageIdSingle | LanguageIdMultiple | LanguageIdMultipleNeg; | ||
/** A File System Path */ | ||
export declare type FsPath = string; | ||
/** | ||
* A File System Path to a dictionary file. | ||
* @pattern ^.*\.(?:txt|trie)(?:\.gz)?$ | ||
*/ | ||
export declare type DictionaryPath = string; | ||
/** | ||
* A File System Path to a dictionary file. | ||
* @pattern ^.*\.txt$ | ||
*/ | ||
export declare type CustomDictionaryPath = string; | ||
export interface RegExpPatternDefinition { | ||
@@ -308,6 +387,9 @@ /** | ||
export interface Source { | ||
/** name of source */ | ||
name: string; | ||
/** filename if this came from a file. */ | ||
filename?: string; | ||
sources?: CSpellSettings[]; | ||
/** The two settings that were merged to */ | ||
sources?: [CSpellSettings] | [CSpellSettings, CSpellSettings]; | ||
} | ||
export {}; |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "5.3.0-alpha.1", | ||
"version": "5.3.0-alpha.2", | ||
"description": "Types for cspell and cspell-lib", | ||
@@ -21,3 +21,4 @@ "main": "dist/index.js", | ||
"compile": "tsc -p .", | ||
"test": "jest" | ||
"test-schema": "ajv -s ./cspell.schema.json -d \"cspell.test.{json,yaml}\" -c ./ajv.config.js", | ||
"test": "jest && npm run test-schema" | ||
}, | ||
@@ -30,2 +31,4 @@ "repository": { | ||
"dist/**", | ||
"ajv.config.js", | ||
"cspell.schema.json", | ||
"!**/*.test.*", | ||
@@ -42,8 +45,9 @@ "!**/*.spec.*", | ||
"devDependencies": { | ||
"ajv-cli": "^4.1.0", | ||
"jest": "^26.6.3", | ||
"rimraf": "^3.0.2", | ||
"ts-json-schema-generator": "^0.84.0", | ||
"ts-json-schema-generator": "^0.86.1", | ||
"typescript": "^4.1.5" | ||
}, | ||
"gitHead": "dc623a57aa12c8df318aaa5ac9f8e7d70a14199d" | ||
"gitHead": "31d54344356d2e6736c889b1d44bb35ddd9a107c" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44825
12
1203
5
1