Socket
Socket
Sign inDemoInstall

@cspell/cspell-types

Package Overview
Dependencies
Maintainers
1
Versions
231
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cspell/cspell-types - npm Package Compare versions

Comparing version 5.3.0-alpha.1 to 5.3.0-alpha.2

ajv.config.js

12

CHANGELOG.md

@@ -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 @@

104

dist/settings/CSpellSettingsDef.d.ts

@@ -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 {};

12

package.json

@@ -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"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc