Skip to content

Commit f1e649a

Browse files
committed
chore: docs
1 parent 0fe8d89 commit f1e649a

File tree

8 files changed

+16
-15
lines changed

8 files changed

+16
-15
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async function main() {
3636
}
3737
```
3838

39-
`ajel` is a function that consumes a promise and returns a tuple represetning the result and the error.
39+
`ajel` is a function that consumes a promise and returns a tuple representing the result and the error.
4040
On success, the result item has value. On error, the error item has value. It's that simple.
4141

4242
More interestingly, it comes with a series of linting tools to help enforce the paradigm available in the package `eslint-plugin-ajel`
@@ -59,3 +59,4 @@ More interestingly, it comes with a series of linting tools to help enforce the
5959
- `docs`: A placeholder documentation site powered by [Next.js](https://nextjs.org/)
6060
- `ajel`: The core library (function)
6161
- `eslint-plugin-ajel`: Eslint rules for proper usage and error handling paradigm
62+
- `benchmarks`: Testing ajel's performance against other methods

apps/docs/src/pages/index.mdx

+3-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async function main() {
2727
}
2828
```
2929

30-
`ajel` is a function that consumes a promise and returns a tuple represetning the result and the error.
30+
`ajel` is a function that consumes a promise and returns a tuple representing the result and the error.
3131
On success, the result item has value. On error, the error item has value. It's that simple.
3232

3333
More interestingly, it comes with a series of linting tools to help enforce the paradigm available in the package `eslint-plugin-ajel`
@@ -36,7 +36,7 @@ More interestingly, it comes with a series of linting tools to help enforce the
3636

3737
As I entered yet another year of employment at my current company, I was tasked with a new goal.
3838
I wanted to learn something new. A little mustached Netflix birdie told me to dig one level deeper.
39-
I told myself it was time to stop being a lowly TS soy dev, and alas, I had a brief but impactful
39+
I told myself it was time to stop being a lowly Typescript soy latte dev, and alas, I had a brief but impactful
4040
affair with the oxidized language Rust. As work demands kicked into overdrive during the busy portion of the year,
4141
I returned to Typescript land with my new experience with Result types - and I saw nothing but holes everywhere.
4242

@@ -47,8 +47,6 @@ It was not hard to narrow down the source of the problem. `try/catch` is a terri
4747
not included in the type system, and thus, it is not possible to know what errors a function can throw.
4848

4949
I tried a few different approaches. Result-type libraries felt like trying to force Rust's paradigm into a language that
50-
wasn't designed for it. I wanted to find a way to make it work with the language, not against it.
50+
wasn't designed for it. I wanted to find a way to with the language, not against it.
5151
Out of the solutions I tried, [one of them felt right.](https://dev.to/karanpratapsingh/go-like-error-handling-in-typescript-4plm#comment-1hc45)
5252
I had found a way that worked for me. And so, I decided to make a library out of it.
53-
54-

apps/docs/src/pages/rules/ajel-require-error-handling.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Handling errors properly is crucial for robust and maintainable code. This rule
3030
```javascript
3131
// Bad: Declaring error variable but not using it
3232
const [data, err] = await ajel(Promise.resolve(1));
33-
// 'err' should be handled, e.g., by logging or throwing
33+
// 'err' should be handled, e.g., by logging or other usage
3434

3535
// Good: Properly handling the error variable
3636
const [data, err] = await ajel(Promise.resolve(1));

packages/ajel-core/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "ajel",
3-
"version": "0.0.4",
3+
"description": "Ajel allows you to handle errors similarly to Golang.",
4+
"version": "0.0.5",
45
"main": "./dist/index.js",
56
"module": "./dist/index.mjs",
67
"types": "./dist/index.d.ts",

packages/ajel-core/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async function main() {
3636
}
3737
```
3838

39-
`ajel` is a function that consumes a promise and returns a tuple represetning the result and the error.
39+
`ajel` is a function that consumes a promise and returns a tuple representing the result and the error.
4040
On success, the result item has value. On error, the error item has value. It's that simple.
4141

4242
More interestingly, it comes with a series of linting tools to help enforce the paradigm available in the package [eslint-plugin-ajel](https://www.npmjs.com/package/eslint-plugin-ajel)

packages/eslint-plugin-ajel/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
}
6767
```
6868

69-
`ajel` is a function that consumes a promise and returns a tuple represetning the result and the error.
69+
`ajel` is a function that consumes a promise and returns a tuple representing the result and the error.
7070
On success, the result item has value. On error, the error item has value. It's that simple.
7171

7272
More interestingly, it comes with a series of linting tools to help enforce the paradigm available in the package `eslint-plugin-ajel`

packages/eslint-plugin-ajel/package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
{
22
"name": "eslint-plugin-ajel",
3-
"version": "0.0.4",
4-
"description": "",
3+
"version": "0.0.5",
4+
"description": "Eslint rules for Ajel, the library that allows you to handle errors similarly to Golang",
55
"engines": {
66
"node": ">=8.10.0"
77
},
88
"files": [
99
"dist"
1010
],
11-
"main": "./eslint-plugin-ajel/index.js",
11+
"main": "./dist/index.js",
12+
"module": "./dist/index.mjs",
13+
"types": "./dist/index.d.ts",
1214
"scripts": {
1315
"prepare": "cd ../.. && husky install packages/eslint-plugin-ajel/.husky",
1416
"clean": "rimraf dist",
@@ -55,7 +57,6 @@
5557
},
5658
"lint-staged": {
5759
"*.{js,ts}": [
58-
"pnpm run lint -- --fix",
5960
"prettier --write"
6061
],
6162
"*.{json,yaml,md}": [

packages/eslint-plugin-ajel/tsup.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { defineConfig } from 'tsup';
22

33
export default defineConfig({
44
entry: ['src/index.ts'],
5-
outDir: 'eslint-plugin-ajel',
5+
outDir: 'dist',
66
splitting: false,
77
minify: true,
88
// clean: true,

0 commit comments

Comments
 (0)