Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add spell checking with cspell #187

Merged
merged 2 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion 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,7 +85,7 @@ deno add @radashi-org/radashi

## FAQ

- **“I need XYZ, but Radashi doesnt have it.”**
aleclarson marked this conversation as resolved.
Show resolved Hide resolved
- **“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?**
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
Loading