Skip to content

Commit

Permalink
ci: add spell checking with cspell
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhamlin committed Aug 18, 2024
1 parent 75944f8 commit 299ad7a
Show file tree
Hide file tree
Showing 45 changed files with 885 additions and 68 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

**Ditch the bloat of Lodash. Stop reinventing the wheel.**

<!-- cSpell:ignore shee -->

Radashi (pronounced /ruh-DAH-shee/) is a TypeScript utility toolkit, packed with lightweight functions that are readable, performant, and robust.

Radashi is an actively maintained fork of Radash, the fastest growing Lodash alternative with 100K+ weekly downloads.
Expand Down Expand Up @@ -83,13 +85,13 @@ deno add @radashi-org/radashi

## FAQ

- **“I need XYZ, but Radashi doesnt have it.”**
- **“I need XYZ, but Radashi doesn't have it.”**
If you have a need not met by our current set of functions, we want to hear about it. [Start a discussion](https://github.com/orgs/radashi-org/discussions/new?category=ideas) so we can explore the idea together!

- **What does “community first” mean exactly?**
- **What does “community first” mean exactly?**
It means putting the community's needs first, leaning towards adding support for popular use cases, as opposed to being strictly minimalist. As such, your feedback is very welcome and we value your perspective. Specifically, we want you to [contribute your viewpoint](https://github.com/orgs/radashi-org/discussions/categories/rfcs?discussions_q=is%3Aopen+category%3ARFCs) to discussions in our RFCs category.

- **Are my contributions welcome?**
- **Are my contributions welcome?**
Yes! Pull requests are encouraged, but please keep them small and focused. Sweeping changes are discouraged and won't be merged (unless the rationale's been thoroughly discussed).

Please review _“The ethos of Radashi”_ before submitting a pull request:
Expand All @@ -98,24 +100,24 @@ deno add @radashi-org/radashi
<img src="https://github.com/radashi-org/radashi/raw/main/.github/img/ethos-button.png" alt="The ethos of Radashi" width="250px" />
</a>

- **Can I help you maintain this?**
- **Can I help you maintain this?**
Yes! I'll add you as a contributor to the repository. You can review pull requests and even merge them. You can help with closing issues, too. Committing directly to the main branch is a privilege you can earn, as is publishing versions to NPM.

<a href="https://github.com/orgs/radashi-org/discussions/4">
<img src="https://github.com/radashi-org/radashi/raw/main/.github/img/apply-button.png" alt="Apply to join the Radashi team" width="250px" />
</a>

- **Is backwards compatibility a goal?**
- **Is backwards compatibility a goal?**
Yes! We want the transition from `radash` to this library to be smooth. If you're coming from Radash, we recommend installing `radashi@^12`. This version will continue to receive backported fixes even after Radashi v13 is released. You can upgrade to the latest major version when you're ready.

- **Automatic releases**
- **Automatic releases**
To ensure contributions are quickly rolled out, we have the following automatic processes:

- **Beta releases**
- **Beta releases**
Whenever the `main` branch receives a fix or feature, a beta release is automatically published to NPM at 5:00AM UTC.
Installing `radashi@beta` will always fetch the latest beta release. Beta releases are always audited by the Radashi team.

- **Preview releases**
- **Preview releases**
When the _owner of a PR_ comments `/publish` (and nothing more), the PR is published to NPM under a version like `1.0.0-pr123.f7a9c3b` (i.e. `<latest version>-pr<PR number>.<commit SHA>`) and a tag like `pr123`. This allows the community to use the changes in the PR without waiting for the PR to be merged.

- ⚠️ **Beware:** Preview releases are not audited by the Radashi team. Always look at their
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/object/assign.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('assign', () => {
location: {
street: '23 main',
state: {
abbrv: 'FL',
abbreviation: 'FL',
name: 'Florida',
},
},
Expand All @@ -19,7 +19,7 @@ describe('assign', () => {
location: {
street: '8114 capo',
state: {
abbrv: 'TX',
abbreviation: 'TX',
name: 'Texas',
},
},
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/string/template.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ describe('template', () => {
Thank You - {{name}}
`
const data = {
name: 'Spongebob',
type: 'squarepants',
name: 'SpongeBob',
type: 'squarePants',
reason: 'so likeable',
}

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/typed/isEqual.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('isEqual', () => {
boolean: true,
unf: void 0,
nul: null,
obj: { name: 'object', id: 1, chilren: [0, 1, 2] },
obj: { name: 'object', id: 1, children: [0, 1, 2] },
arr: [0, 1, 2],
func() {
console.log('function')
Expand Down
48 changes: 48 additions & 0 deletions cspell.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: '0.2'
language: en
ignorePaths:
- '**/package.json'
- '**/pnpm-lock.yaml'
- '**/dist'
- coverage
- 'cliff.toml'
languageSettings:
- languageId: markdown
ignoreRegExpList:
- '/@[\w-]+/' # ignore github handles
dictionaries:
- typescript # ignore typescript-y words in markdown
- languageId: typescript
ignoreRegExpList:
- "/ from '.+'/" # ignore import targets
words:
- automagically
- backported
- browserslist
- curlopt
- dedented
- deno
- dequal
- esbuild
- execa
- exobase
- gitter
- kleur
- lerp
- listify
- lowerize
- mapify
- nums
- objectize
- partob
- ponyfill
- procs
- radash
- radashi
- smidge
- supabase
- tryit
- upperize
- upserting
- urlencode
- vitest
2 changes: 1 addition & 1 deletion docs/array/fork.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ const gods = [
},
]

const [finalGods, lesserGods] = _.fork(gods, f => f.power > 90) // [[ra, vishnu, zues], [loki]]
const [finalGods, lesserGods] = _.fork(gods, f => f.power > 90) // [[ra, vishnu, zeus], [loki]]
```
2 changes: 1 addition & 1 deletion docs/array/toggle.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: toggle
description: Toggles an items existance in an array
description: Toggles an item's existence in an array
---

### Usage
Expand Down
4 changes: 2 additions & 2 deletions docs/curry/chain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Chaining functions will cause them to execute one after another, passing the out
import * as _ from 'radashi'

const add = (y: number) => (x: number) => x + y
const mult = (y: number) => (x: number) => x * y
const multiply = (y: number) => (x: number) => x * y
const addFive = add(5)
const double = mult(2)
const double = multiply(2)

const chained = _.chain(addFive, double)

Expand Down
2 changes: 1 addition & 1 deletion docs/curry/compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const composed = _.compose(
composed() // => 2
```

This can be a little jarring if you haven't seen it before. Here's a broken down composition. It's equivelent to the code above.
This can be a little jarring if you haven't seen it before. Here's a broken down composition. It's equivalent to the code above.

```ts
const decomposed = useZero(objectize(increment(increment(_.returnArg('num')))))
Expand Down
2 changes: 1 addition & 1 deletion docs/object/cloneDeep.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Deeply clone the given object or array. The only nested objects that get cloned

The default behavior aims to support the most popular use cases. See “Customized cloning” below if you need more control.

By default, non-enumerable properties and computed properties are copied losslessly. Note that you can opt out of this behavior if you need better performance (see “Faster cloning” below).
By default, non-enumerable properties and computed properties are copied lossless-ly. Note that you can opt out of this behavior if you need better performance (see “Faster cloning” below).

```ts
import * as _ from 'radashi'
Expand Down
2 changes: 1 addition & 1 deletion docs/object/invert.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as _ from 'radashi'
const powersByGod = {
ra: 'sun',
loki: 'tricks',
zeus: 'lighning',
zeus: 'lightning',
}

_.invert(powersByGod) // => { sun: ra, tricks: loki, lightning: zeus }
Expand Down
2 changes: 1 addition & 1 deletion docs/random/random.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: 'Generate a random number'

### Usage

Genearate a number within a range. This function is meant for utility use -- not cryptographic.
Generate a number within a range. This function is meant for utility use -- not cryptographic.

```ts
import * as _ from 'radashi'
Expand Down
2 changes: 1 addition & 1 deletion docs/random/uid.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Generates a unique string with optional special characters.
import * as _ from 'radashi'

_.uid(7) // => UaOKdlW
_.uid(20, '*') // => dyJdbC*NsEgcnGjTHS
_.uid(12, '*') // => egFn*THGelM8
```

Note, this function is optimized for simplicity and usability -- not performance or security. If you need to create universally unique or cryptographically random strings use a package specifically for that purpose.
2 changes: 1 addition & 1 deletion docs/series/series.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Create an ordered series object

### Usage

Sometimes you have an enum or union type, possibly a status, that has inherint order and you need to work with values as though they're ordered. The `series` function takes many values and returns an object that let's you do ordered logic on those values.
Sometimes you have an enum or union type, possibly a status, that has an inherent order and you need to work with values as though they're ordered. The `series` function takes many values and returns an object that let's you do ordered logic on those values.

```ts
import * as _ from 'radashi'
Expand Down
2 changes: 1 addition & 1 deletion docs/string/similarity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import * as _ from 'radashi'
_.similarity('hello', 'hello') // => 0

// One character difference
_.similarity('kitten', 'sitten') // => 1
_.similarity('kitten', 'mitten') // => 1

// Multiple differences
_.similarity('saturday', 'sunday') // => 3
Expand Down
2 changes: 1 addition & 1 deletion docs/string/snake.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as _ from 'radashi'
_.snake('green fish blue fish') // => green_fish_blue_fish
```

**Warning**: In v11.0.0 a change was made to _fix_ this function so that it correctly splits numbers from neighbouring letters (`hello5` becomes `hello_5`). You can opt out of this behavior and continue with the legacy style (`hello5` becomes `hello5`) by passing the `splitOnNumber` options.
**Warning**: In v11.0.0 a change was made to _fix_ this function so that it correctly splits numbers from neighboring letters (`hello5` becomes `hello_5`). You can opt out of this behavior and continue with the legacy style (`hello5` becomes `hello5`) by passing the `splitOnNumber` options.

```ts
_.snake('5green fish 2blue fish') // => 5_green_fish_2_blue_fish
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@vitest/coverage-v8": "2.0.5",
"cspell": "^8.13.3",
"prettier": "^3.3.2",
"prettier-plugin-pkg": "^0.18.1",
"prettier-plugin-sh": "^0.14.0",
Expand Down
Loading

0 comments on commit 299ad7a

Please sign in to comment.