File tree Expand file tree Collapse file tree 6 files changed +40
-10
lines changed Expand file tree Collapse file tree 6 files changed +40
-10
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "extends" : [
3
+ " eslint:recommended" ,
4
+ " plugin:@typescript-eslint/recommended"
5
+ ],
6
+ "parser" : " @typescript-eslint/parser" ,
7
+ "plugins" : [
8
+ " @typescript-eslint"
9
+ ],
10
+ "root" : true
11
+ }
Original file line number Diff line number Diff line change @@ -10,16 +10,24 @@ jobs:
10
10
steps :
11
11
- name : Checkout
12
12
uses : actions/checkout@v3
13
+ - name : Setup Node
14
+ uses : actions/setup-node@v3
15
+ with :
16
+ node-version : 18
17
+ - name : Show environment
18
+ run : set -x; pwd; ls -la; node -v; npm -v;
19
+ - name : Install dependencies
20
+ run : npm install
21
+
22
+ # TODO: Remove next step
13
23
- name : Setup Deno
14
24
uses : denoland/setup-deno@v1
15
25
with :
16
26
deno-version : v1.x
17
- - name : Show environment
18
- run : set -x; pwd; ls -la; deno --version;
19
27
20
28
- name : Test
21
29
run : deno test ./src/
22
30
- name : Check
23
31
run : deno check ./src/test/index.ts
24
- - name : Format
25
- run : deno fmt ./src/
32
+ - name : Lint
33
+ run : npm run lint
Original file line number Diff line number Diff line change 25
25
uses : actions/setup-node@v3
26
26
- name : Show environment
27
27
run : set -x; pwd; ls -la; node -v; npm -v;
28
- - name : Run npm install
28
+ - name : Install dependencies
29
29
run : npm install
30
30
- name : Configure git
31
31
run : |
Original file line number Diff line number Diff line change 35
35
"scripts" : {
36
36
"build" : " esbuild --bundle --platform=neutral --outfile=./dist/index.js ./src/index.ts" ,
37
37
"check" : " deno check ./src/test/index.ts" ,
38
- "fmt" : " deno fmt ./src/" ,
38
+ "lint" : " eslint ./src/" ,
39
+ "lint:fix" : " eslint --fix ./src/" ,
39
40
"prepare" : " npm run build" ,
40
41
"test" : " deno test ./src/"
41
42
},
42
43
"devDependencies" : {
43
- "esbuild" : " ^0.18.15"
44
+ "@typescript-eslint/eslint-plugin" : " ^6.2.1" ,
45
+ "@typescript-eslint/parser" : " ^6.2.1" ,
46
+ "esbuild" : " ^0.18.15" ,
47
+ "eslint" : " ^8.46.0" ,
48
+ "typescript" : " ^5.1.6"
44
49
}
45
50
}
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ Deno.test("Hex", async (t) => {
40
40
41
41
await t . step ( "Hex.toBin(Not string)" , ( ) => {
42
42
try {
43
- Hex . toBin ( 1234 as any ) ;
43
+ Hex . toBin ( 1234 as any ) ; // eslint-disable-line @typescript-eslint/no-explicit-any
44
44
fail ( "Hex.toBin() is not thrown Error" ) ;
45
45
} catch ( err ) {
46
46
assert ( err instanceof Error ) ;
@@ -55,11 +55,11 @@ Deno.test("Hex", async (t) => {
55
55
await t . step ( "Hex.fromBin(Not Uint8Array)" , ( ) => {
56
56
assertEquals ( HexText , Hex . fromBin ( HexBin ) ) ;
57
57
try {
58
- Hex . fromBin ( new Int8Array ( 4 ) as any ) ;
58
+ Hex . fromBin ( new Int8Array ( 4 ) as any ) ; // eslint-disable-line @typescript-eslint/no-explicit-any
59
59
fail ( "Hex.fromBin() is not thrown Error" ) ;
60
60
} catch ( err ) {
61
61
assert ( err instanceof Error ) ;
62
62
assertEquals ( err . message , '"bin" is not Uint8Array' ) ;
63
63
}
64
- } ) ;
64
+ } )
65
65
} ) ;
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ export namespace SimpleEncryption {
12
12
type HexString = string ;
13
13
type SupportAlgorithm = "AES-GCM" | "AES-CBC" ;
14
14
15
+ // FIXME
16
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
15
17
interface EncryptArgs {
16
18
alg ?: SupportAlgorithm | null ;
17
19
iv ?: HexString | null ;
@@ -25,10 +27,14 @@ export namespace SimpleEncryption {
25
27
iv : HexString ;
26
28
}
27
29
30
+ // FIXME
31
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
28
32
interface DecryptArgs extends EncryptedData {
29
33
key : HexString ;
30
34
}
31
35
36
+ // FIXME
37
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
32
38
interface DecryptedData {
33
39
plainData : Uint8Array ;
34
40
}
You can’t perform that action at this time.
0 commit comments