Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 044270d

Browse files
authored
Add eslint fix (#21)
* docs: update README.md with new package name * chore: add eslint9 with basic config * fix: fix lint issues
1 parent d294d5c commit 044270d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1296
-94
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
2323
2424
- run: npm ci
25-
# - run: npm run lint
25+
- run: npm run lint
2626
- run: npm run build
2727
- run: npm run test
2828

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@ iggy node.js client for [iggy-rs](https://iggy.rs/)'s binary protocol, written i
44

55
diclaimer: although all iggy commands & basic client/stream are implemented this is still a WIP, provided as is, and has still a long way to go to be considered "battle tested".
66

7+
note: This lib started as _iggy-bin_ ( [github](https://github.com/T1B0/iggy-bin) / [npm](https://www.npmjs.com/package/iggy-bin)) before migrating under iggy-rs org. package [email protected] is equivalent to @iggy.rs/[email protected]
8+
9+
710
note: previous works on node.js http client has been moved to [iggy-node-http-client](<https://github.com/iggy-rs/iggy-node-http-client) (moved on 04 July 2024)
811

912
## install
1013

1114
```
12-
$ npm i iggy-bin
15+
$ npm i @iggy.rs/sdk
1316
```
1417

1518
## basic usage
1619

1720
```ts
18-
import { Client } from "iggy-bin";
21+
import { Client } from "@iggy.rs/sdk";
1922

2023
const credentials = { username: "iggy", password: "iggy" };
2124

@@ -44,6 +47,20 @@ $ npm run build
4447

4548
### test
4649

50+
#### unit tests
4751
```
4852
$ npm run test
4953
```
54+
55+
#### e2e tests
56+
57+
e2e test expect an iggy-server at tcp://127.0.0.1:8090
58+
```
59+
$ npm run test:e2e
60+
```
61+
62+
### lint
63+
64+
```
65+
$ npm run lint
66+
```

eslint.config.mjs

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import { builtinModules } from "module"
2+
3+
// import jsLint from "@eslint/js"
4+
// import stylistic from "@stylistic/eslint-plugin"
5+
// import globals from "globals"
6+
import tsLint from "typescript-eslint"
7+
8+
export default [
9+
// config parsers
10+
{
11+
files: ["**/*.{js,mjs,cjs,ts}"]
12+
},
13+
{
14+
languageOptions: {
15+
// globals: {
16+
// ...globals.node
17+
// }
18+
}
19+
},
20+
// rules
21+
// jsLint.configs.recommended,
22+
...tsLint.configs.recommended,
23+
{
24+
rules: {
25+
"@typescript-eslint/consistent-type-imports": [
26+
"error",
27+
{
28+
prefer: "type-imports",
29+
fixStyle: "separate-type-imports"
30+
}
31+
]
32+
}
33+
},
34+
{
35+
plugins: {
36+
37+
},
38+
},
39+
40+
// see: https://eslint.style/guide/getting-started
41+
// see: https://github.com/eslint-stylistic/eslint-stylistic/blob/main/packages/eslint-plugin/configs/disable-legacy.ts
42+
// stylistic.configs["disable-legacy"],
43+
// stylistic.configs.customize({
44+
// indent: 4,
45+
// quotes: "double",
46+
// semi: false,
47+
// commaDangle: "never",
48+
// jsx: true
49+
// }),
50+
51+
{
52+
// https://eslint.org/docs/latest/use/configure/ignore
53+
ignores: [
54+
"node_modules",
55+
"dist",
56+
]
57+
}
58+
]

0 commit comments

Comments
 (0)