-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: update README.md with new package name * chore: add eslint9 with basic config * fix: fix lint issues
- Loading branch information
Showing
42 changed files
with
1,296 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,18 +4,21 @@ iggy node.js client for [iggy-rs](https://iggy.rs/)'s binary protocol, written i | |
|
||
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". | ||
|
||
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] | ||
|
||
|
||
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) | ||
|
||
## install | ||
|
||
``` | ||
$ npm i iggy-bin | ||
$ npm i @iggy.rs/sdk | ||
``` | ||
|
||
## basic usage | ||
|
||
```ts | ||
import { Client } from "iggy-bin"; | ||
import { Client } from "@iggy.rs/sdk"; | ||
|
||
const credentials = { username: "iggy", password: "iggy" }; | ||
|
||
|
@@ -44,6 +47,20 @@ $ npm run build | |
|
||
### test | ||
|
||
#### unit tests | ||
``` | ||
$ npm run test | ||
``` | ||
|
||
#### e2e tests | ||
|
||
e2e test expect an iggy-server at tcp://127.0.0.1:8090 | ||
``` | ||
$ npm run test:e2e | ||
``` | ||
|
||
### lint | ||
|
||
``` | ||
$ npm run lint | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { builtinModules } from "module" | ||
|
||
// import jsLint from "@eslint/js" | ||
// import stylistic from "@stylistic/eslint-plugin" | ||
// import globals from "globals" | ||
import tsLint from "typescript-eslint" | ||
|
||
export default [ | ||
// config parsers | ||
{ | ||
files: ["**/*.{js,mjs,cjs,ts}"] | ||
}, | ||
{ | ||
languageOptions: { | ||
// globals: { | ||
// ...globals.node | ||
// } | ||
} | ||
}, | ||
// rules | ||
// jsLint.configs.recommended, | ||
...tsLint.configs.recommended, | ||
{ | ||
rules: { | ||
"@typescript-eslint/consistent-type-imports": [ | ||
"error", | ||
{ | ||
prefer: "type-imports", | ||
fixStyle: "separate-type-imports" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
plugins: { | ||
|
||
}, | ||
}, | ||
|
||
// see: https://eslint.style/guide/getting-started | ||
// see: https://github.com/eslint-stylistic/eslint-stylistic/blob/main/packages/eslint-plugin/configs/disable-legacy.ts | ||
// stylistic.configs["disable-legacy"], | ||
// stylistic.configs.customize({ | ||
// indent: 4, | ||
// quotes: "double", | ||
// semi: false, | ||
// commaDangle: "never", | ||
// jsx: true | ||
// }), | ||
|
||
{ | ||
// https://eslint.org/docs/latest/use/configure/ignore | ||
ignores: [ | ||
"node_modules", | ||
"dist", | ||
] | ||
} | ||
] |
Oops, something went wrong.