Skip to content

Commit

Permalink
docs: Update README (#4097)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S authored Feb 3, 2023
1 parent 295627b commit 88e3f05
Show file tree
Hide file tree
Showing 7 changed files with 156 additions and 47 deletions.
24 changes: 24 additions & 0 deletions packages/cspell-glob/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,27 @@ const cspellGlob = require('cspell-glob');
// TODO: DEMONSTRATE API
```

## CSpell for Enterprise

<!--- @@inject: ../../static/tidelift.md --->

Available as part of the Tidelift Subscription.

The maintainers of cspell and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-cspell?utm_source=npm-cspell&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)

<!--- @@inject-end: ../../static/tidelift.md --->

<!--- @@inject: ../../static/footer.md --->

<br/>

---

<p align="center">
Brought to you by <a href="https://streetsidesoftware.com" title="Street Side Software">
<img width="16" alt="Street Side Software Logo" src="https://i.imgur.com/CyduuVY.png" /> Street Side Software
</a>
</p>

<!--- @@inject-end: ../../static/footer.md --->
14 changes: 12 additions & 2 deletions packages/cspell-tools/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cSpell-Tools
# CSpell-Tools

Tools used to assist cSpell Development.
Tools used to assist CSpell Development.

The Primary use of this tool is to build dictionaries used by cspell. This tool will convert a word list or a hunspell file into a file usable by cspell.

Expand Down Expand Up @@ -36,6 +36,16 @@ For large files, this process can take a long time and us a lot of memory.

The tool `cspell-trie` can be used to read the contents of a `.trie` or `.trie.gz` file.

## CSpell for Enterprise

<!--- @@inject: ../../static/tidelift.md --->

Available as part of the Tidelift Subscription.

The maintainers of cspell and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-cspell?utm_source=npm-cspell&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)

<!--- @@inject-end: ../../static/tidelift.md --->

<!--- @@inject: ../../static/footer.md --->

<br/>
Expand Down
10 changes: 10 additions & 0 deletions packages/cspell-trie-lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,16 @@ How to walk the data to see if "talks" is in it.
cspell:word DAFSA DAWG
-->

## CSpell for Enterprise

<!--- @@inject: ../../static/tidelift.md --->

Available as part of the Tidelift Subscription.

The maintainers of cspell and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-cspell?utm_source=npm-cspell&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)

<!--- @@inject-end: ../../static/tidelift.md --->

<!--- @@inject: ../../static/footer.md --->

<br/>
Expand Down
36 changes: 30 additions & 6 deletions packages/cspell-trie/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,37 @@ each line can only refer to previous lines.

How to walk the data to see if "talks" is in it.

1. Start with the root at offset 8.
2. t found goto 7
3. a found goto 6
4. l found goto 5
5. k found goto 4
6. s found stop (goto 0 is stop).
1. Start with the root at offset 8.
1. t found goto 7
1. a found goto 6
1. l found goto 5
1. k found goto 4
1. s found stop (goto 0 is stop).

<!---
cspell:word DAFSA DAWG
-->

## CSpell for Enterprise

<!--- @@inject: ../../static/tidelift.md --->

Available as part of the Tidelift Subscription.

The maintainers of cspell and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-cspell?utm_source=npm-cspell&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)

<!--- @@inject-end: ../../static/tidelift.md --->

<!--- @@inject: ../../static/footer.md --->

<br/>

---

<p align="center">
Brought to you by <a href="https://streetsidesoftware.com" title="Street Side Software">
<img width="16" alt="Street Side Software Logo" src="https://i.imgur.com/CyduuVY.png" /> Street Side Software
</a>
</p>

<!--- @@inject-end: ../../static/footer.md --->
92 changes: 53 additions & 39 deletions packages/cspell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ A Spell Checker for Code!
cspell was initially built as the spell checking service for the [spell checker extension](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) for
[Visual Studio Code](https://code.visualstudio.com/).

## cspell for enterprise
## CSpell for Enterprise

<!--- @@inject: ../../static/tidelift.md --->

Available as part of the Tidelift Subscription.

The maintainers of cspell and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-cspell?utm_source=npm-cspell&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)

<!--- @@inject-end: ../../static/tidelift.md --->

## Installation

```sh
Expand All @@ -45,9 +49,19 @@ npm install -g cspell

There is a docker image at [Packages for cspell](https://github.com/streetsidesoftware/cspell-cli/pkgs/container/cspell).

`cspell` commands below can be run by replacing `cspell` with: `docker run -v -i -t $PWD:/workdir ghcr.io/streetsidesoftware/cspell:latest`
`cspell` commands below can be run by replacing

Example:
```
cspell
```

with:

```
docker run -v -i -t $PWD:/workdir ghcr.io/streetsidesoftware/cspell:latest
```

**Example:**

```sh
docker run -v -i -t $PWD:/workdir ghcr.io/streetsidesoftware/cspell:latest lint --help
Expand Down Expand Up @@ -310,7 +324,7 @@ The concept is simple, split camelCase and snake_case words before checking them
It is possible to add spell check settings into your source code.
This is to help with file specific issues that may not be applicable to the entire project.

All settings are prefixed with `cSpell:` or `spell-checker:`.
All settings are prefixed with `cspell:` or `spell-checker:`.

- `disable` -- turn off the spell checker for a section of code.
- `enable` -- turn the spell checker back on after it has been turned off.
Expand All @@ -327,26 +341,26 @@ It is possible to disable / enable the spell checker by adding comments to your

#### Disable Checking

- `/* cSpell:disable */`
- `/* cspell:disable */`
- `/* spell-checker: disable */`
- `/* spellchecker: disable */`
- `// cspell:disable-line` -- disables checking for the current line.
- `/* cspell:disable-next-line */` -- disables checking till the end of the next line.

<!--- cSpell:enable -->
<!--- cspell:enable -->

#### Enable Checking

- `/* cSpell:enable */`
- `/* cspell:enable */`
- `/* spell-checker: enable */`
- `/* spellchecker: enable */`

#### Example

```javascript
// cSpell:disable
// cspell:disable
const wackyWord = ['zaallano', 'wooorrdd', 'zzooommmmmmmm'];
/* cSpell:enable */
/* cspell:enable */

const words = ['zaallano', 'wooorrdd', 'zzooommmmmmmm']; // cspell:disable-line disables this entire line

Expand All @@ -363,7 +377,7 @@ var liep = 1;
/* cspell:disable */
// It is still disabled

// cSpell:enable
// cspell:enable
// It is now enabled

const str = 'goededag'; // <- will be flagged as an error.
Expand All @@ -376,15 +390,15 @@ const str = 'goededag'; // <- will be flagged as an error.
const str = 'goedemorgen'; // <- will NOT be flagged as an error.
```

<!--- cSpell:enable -->
<!--- cspell:enable -->

### Ignore

_Ignore_ allows you the specify a list of words you want to ignore within the document.

```javascript
// cSpell:ignore zaallano, wooorrdd
// cSpell:ignore zzooommmmmmmm
// cspell:ignore zaallano, wooorrdd
// cspell:ignore zzooommmmmmmm
const wackyWord = ['zaallano', 'wooorrdd', 'zzooommmmmmmm'];
```

Expand All @@ -395,7 +409,7 @@ const wackyWord = ['zaallano', 'wooorrdd', 'zzooommmmmmmm'];
The _words_ list allows you to add words that will be considered correct and will be used as suggestions.

```javascript
// cSpell:words woorxs sweeetbeat
// cspell:words woorxs sweeetbeat
const companyName = 'woorxs sweeetbeat';
```

Expand All @@ -406,8 +420,8 @@ const companyName = 'woorxs sweeetbeat';
In some programing language it is common to glue words together.

```c
// cSpell:enableCompoundWords
char * errormessage; // Is ok with cSpell:enableCompoundWords
// cspell:enableCompoundWords
char * errormessage; // Is ok with cspell:enableCompoundWords
int errornumber; // Is also ok.
```

Expand All @@ -417,7 +431,7 @@ The last setting in the file determines the value for the entire file.
### Excluding and Including Text to be checked.

By default, the entire document is checked for spelling.
`cSpell:disable`/`cSpell:enable` above allows you to block off sections of the document.
`cspell:disable`/`cspell:enable` above allows you to block off sections of the document.
`ignoreRegExp` and `includeRegExp` give you the ability to ignore or include patterns of text.
By default the flags `gim` are added if no flags are given.

Expand All @@ -430,17 +444,17 @@ The spell checker works in the following way:
#### Exclude Example

```javascript
// cSpell:ignoreRegExp 0x[0-9a-f]+ -- will ignore c style hex numbers
// cSpell:ignoreRegExp /0x[0-9A-F]+/g -- will ignore upper case c style hex numbers.
// cSpell:ignoreRegExp g{5} h{5} -- will only match ggggg, but not hhhhh or 'ggggg hhhhh'
// cSpell:ignoreRegExp g{5}|h{5} -- will match both ggggg and hhhhh
// cSpell:ignoreRegExp /g{5} h{5}/ -- will match 'ggggg hhhhh'
/* cSpell:ignoreRegExp /n{5}/ -- will NOT work as expected because of the ending comment -> */
// cspell:ignoreRegExp 0x[0-9a-f]+ -- will ignore c style hex numbers
// cspell:ignoreRegExp /0x[0-9A-F]+/g -- will ignore upper case c style hex numbers.
// cspell:ignoreRegExp g{5} h{5} -- will only match ggggg, but not hhhhh or 'ggggg hhhhh'
// cspell:ignoreRegExp g{5}|h{5} -- will match both ggggg and hhhhh
// cspell:ignoreRegExp /g{5} h{5}/ -- will match 'ggggg hhhhh'
/* cspell:ignoreRegExp /n{5}/ -- will NOT work as expected because of the ending comment -> */
/*
cSpell:ignoreRegExp /q{5}/ -- will match qqqqq just fine but NOT QQQQQ
cspell:ignoreRegExp /q{5}/ -- will match qqqqq just fine but NOT QQQQQ
*/
// cSpell:ignoreRegExp /[^\s]{40,}/ -- will ignore long strings with no spaces.
// cSpell:ignoreRegExp Email -- this will ignore email like patterns -- see Predefined RegExp expressions
// cspell:ignoreRegExp /[^\s]{40,}/ -- will ignore long strings with no spaces.
// cspell:ignoreRegExp Email -- this will ignore email like patterns -- see Predefined RegExp expressions
var encodedImage = 'HR+cPzr7XGAOJNurPL0G8I2kU0UhKcqFssoKvFTR7z0T3VJfK37vS025uKroHfJ9nA6WWbHZ/ASn...';
var email1 = '[email protected]';
var email2 = '<[email protected]>';
Expand All @@ -453,8 +467,8 @@ var email2 = '<[email protected]>';
In general you should not need to use `includeRegExp`. But if you are mixing languages then it could come in helpful.

```Python
# cSpell:includeRegExp #.*
# cSpell:includeRegExp ("""|''')[^\1]*\1
# cspell:includeRegExp #.*
# cspell:includeRegExp ("""|''')[^\1]*\1
# only comments and block strings will be checked for spelling.
def sum_it(self, seq):
"""This is checked for spelling"""
Expand All @@ -471,7 +485,7 @@ def sum_it(self, seq):
The _dictionaries_ list allows you to specify dictionaries to use for the file.

```javascript
// cSpell:dictionaries lorem-ipsum
// cspell:dictionaries lorem-ipsum
const companyName = 'Lorem ipsum dolor sit amet';
```

Expand Down Expand Up @@ -682,7 +696,7 @@ The number of `!`s is important.

## LanguageSettings

The Language Settings allow configuration to be based upon the programming language and/or the e.
The Language Settings allow configuration to be based upon the programming language and/or the locale.
There are two selector fields `locale` and `languageId`.

- `languageId` defines which programming languages to match against.
Expand Down Expand Up @@ -749,13 +763,13 @@ Brought to you by <a href="https://streetsidesoftware.com" title="Street Side So
<!--- @@inject-end: ../../static/footer.md --->

<!---
cSpell:disableCompoundWords
cSpell:ignore compoundwords stringlength errornumber
cSpell:ignore jsja goededag alek wheerd behaviour tsmerge QQQQQ ncode
cSpell:includeRegExp Everything
cSpell:ignore hte variabele alinea
cSpell:ignore mkdirp githubusercontent streetsidesoftware vsmarketplacebadge visualstudio
cSpell:words Verdana
cSpell:ignore ieeees beees treeees
cSpell:ignore amet
cspell:disableCompoundWords
cspell:ignore compoundwords stringlength errornumber
cspell:ignore jsja goededag alek wheerd behaviour tsmerge QQQQQ ncode
cspell:includeRegExp Everything
cspell:ignore hte variabele alinea
cspell:ignore mkdirp githubusercontent streetsidesoftware vsmarketplacebadge visualstudio
cspell:words Verdana
cspell:ignore ieeees beees treeees
cspell:ignore amet
-->
24 changes: 24 additions & 0 deletions packages/hunspell-reader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,27 @@ const promiseArrayOfWords = reader.readWords().toArray().toPromise();
## Reference

- [Hunspell Docs](https://github.com/hunspell/hunspell/blob/master/docs/hunspell.5.md)

## CSpell for Enterprise

<!--- @@inject: ../../static/tidelift.md --->

Available as part of the Tidelift Subscription.

The maintainers of cspell and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-cspell?utm_source=npm-cspell&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)

<!--- @@inject-end: ../../static/tidelift.md --->

<!--- @@inject: ../../static/footer.md --->

<br/>

---

<p align="center">
Brought to you by <a href="https://streetsidesoftware.com" title="Street Side Software">
<img width="16" alt="Street Side Software Logo" src="https://i.imgur.com/CyduuVY.png" /> Street Side Software
</a>
</p>

<!--- @@inject-end: ../../static/footer.md --->
3 changes: 3 additions & 0 deletions static/tidelift.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Available as part of the Tidelift Subscription.

The maintainers of cspell and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-cspell?utm_source=npm-cspell&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)

0 comments on commit 88e3f05

Please sign in to comment.