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

Add spell check to precommit hook #186

Merged
merged 3 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm exec --no -- lint-staged --no-stash
15 changes: 15 additions & 0 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const path = require('path')

module.exports = {
'*.md': [
(filenames) => {
if (filenames.length === 0) {
return [];
}

const fileNames = filenames.join(' ');
console.log('Spell-checking files:', filenames);
return [`cspell ${fileNames} -c cspell.json`];
},
],
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Then in your project that has `radar-sdk-js` in its `package.json`
```bash
npm link radar-sdk-js
```
This will point the pakage in your project to use the local version of the SDK.
This will point the package in your project to use the local version of the SDK.

**Note**: Make sure you're using the node.js & npm installations in both projects, especially if you're using a node manager like `nvm` or `n`.

Expand Down
4 changes: 2 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Migrating from 3.x to 4.x

Radar JS SDK 4.0 is a complete re-write of the existing SDK in Typescript, with exposed bindings to all functions and objects. It's also written to take advantage of modern JS best pracices such as ES Modules, and using `async/await` for Promise-based functions.
Radar JS SDK 4.0 is a complete re-write of the existing SDK in Typescript, with exposed bindings to all functions and objects. It's also written to take advantage of modern JS best practices such as ES Modules, and using `async/await` for Promise-based functions.

In addition, 4.0 also introduces Radar UI Kits. These are out-of-the-box components that allow you to easily create web-based experiences that leverage Radar apis, including Maps and Autocomplete inputs, with more to come in future releases.

Expand Down Expand Up @@ -66,7 +66,7 @@ Radar.trackOnce()
### Error handling

As mentioned in the async/await examples above, errors are now `thrown` objects to be handled instead of strings returned with the response. As such, Errors now contain more helpful debugging info including:
* Strack trace of where error occured
* Stack trace of where error occurred
* More descriptive error messages (`err.message`)
* HTTP Error codes (`err.code`)
* API response details about what failed (`err.response`)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

### With npm

> **Note:** The Radar JS SDK has a peer depdendency on [maplibre-gl-js](https://github.com/maplibre/maplibre-gl-js).
> **Note:** The Radar JS SDK has a peer dependency on [maplibre-gl-js](https://github.com/maplibre/maplibre-gl-js).

Add the `radar-sdk-js` and `maplibre-gl` packages
```bash
Expand Down
83 changes: 83 additions & 0 deletions cspell.json
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"version": "0.2",
"language": "en",
"showSuggestions": true,
"unique": true,
"silent": true,
"ignorePaths": [
"**/docs/places/*",
"**/docs/regions/*"
],
"ignoreWords": [
"androidx",
"appboy",
"autocompletes",
"autocompleting",
"backgrounded",
"blocklisted",
"brandify",
"cartfile",
"ccpa",
"cocoapods",
"codepath",
"customerid",
"dma",
"dmas",
"drawables",
"eddystone",
"endpointid",
"geocode",
"geocoder",
"geocodes",
"geofence",
"geofences",
"geofencing",
"getcapacitor",
"ibeacon",
"idfv",
"ismanualfire",
"isochrone",
"linestring",
"leanplum",
"lytics",
"llpy",
"mapbox",
"maplibre",
"mcdonalds",
"mparticle",
"mpid",
"multipolygon",
"nonatomic",
"nonnull",
"objc",
"onesignal",
"podfile",
"polyline",
"polylines",
"pubspec",
"quickstart",
"quickstarts",
"radarlabs",
"sfmc",
"signup",
"sportsbook",
"timewanted",
"upsert",
"upserted",
"upserts",
"wakeups",
"webm",
"xcframework",
"xcodeworkspace",
"xcproject",
"xcworkspace",
"yourapp",
"lookback",
"jailbroken"
],
"ignoreRegExpList": [
"/^\\s*```[\\s\\S]*?^\\s*```/gm",
"/.*enc:.*/",
"/.*enc6:.*/"
]
}
Loading
Loading