Skip to content

Commit 460303c

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/add-parseargs-replacements
2 parents aa40584 + de825ef commit 460303c

8 files changed

Lines changed: 92 additions & 248 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ We provide two things:
1111

1212
## List of replacements
1313

14-
You can find a list of replacements in the
15-
[modules readme](./docs/modules/README.md).
14+
You can find a list of replacements on the [e18e website](https://e18e.dev/docs/replacements/).
1615

1716
## Tools
1817

@@ -21,6 +20,8 @@ Some tools consume the lists of modules in this repository:
2120
| Name | Description |
2221
| -------------------------------------------------------------------------- | --------------------------------------------- |
2322
| [eslint-plugin-depend](https://github.com/es-tooling/eslint-plugin-depend) | ESLint plugin to detect possible replacements |
23+
| [@e18e/eslint-plugin](https://github.com/e18e/eslint-plugin) | Official e18e ESLint plugin |
24+
| [npmx](https://npmx.dev) | Alternative npm frontend |
2425

2526
## Manifests
2627

docs/modules/README.md

Lines changed: 0 additions & 117 deletions
This file was deleted.

docs/modules/portfinder.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
description: Modern alternatives to the portfinder package for finding an available port
3+
---
4+
5+
# Replacements for `portfinder`
6+
7+
## `get-port`
8+
9+
[`get-port`](https://github.com/sindresorhus/get-port) is a lighter and more modern package for finding an available port.
10+
11+
Example:
12+
13+
```ts
14+
import portfinder from 'portfinder' // [!code --]
15+
import getPort from 'get-port' // [!code ++]
16+
17+
const port = await portfinder.getPortPromise() // [!code --]
18+
const port = await getPort() // [!code ++]
19+
```

manifests/micro-utilities.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
"description": "You can use `Array.from` to create an array of sequential integers",
2525
"example": "Array.from({ length: n }, (_, i) => i);"
2626
},
27+
"snippet::array-from-count-with-start": {
28+
"id": "snippet::array-from-count-with-start",
29+
"type": "simple",
30+
"description": "You can use `Array.from` to create an array of sequential integers starting from a specific integer",
31+
"example": "Array.from({ length: end - start }, (_, i) => i + start);"
32+
},
2733
"snippet::array-last": {
2834
"id": "snippet::array-last",
2935
"type": "simple",
@@ -356,6 +362,11 @@
356362
"moduleName": "array-last",
357363
"replacements": ["snippet::array-last"]
358364
},
365+
"array-range": {
366+
"type": "module",
367+
"moduleName": "array-range",
368+
"replacements": ["snippet::array-from-count-with-start"]
369+
},
359370
"array-union": {
360371
"type": "module",
361372
"moduleName": "array-union",

0 commit comments

Comments
 (0)