@nivinjoseph/n-sec 4.0.6 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +2 -0
- package/.eslintrc +335 -0
- package/dist/api-security/alg-type.js +2 -0
- package/dist/api-security/alg-type.js.map +1 -1
- package/dist/api-security/claim.d.ts +2 -3
- package/dist/api-security/claim.js +3 -2
- package/dist/api-security/claim.js.map +1 -1
- package/dist/api-security/claims-identity.js +2 -1
- package/dist/api-security/claims-identity.js.map +1 -1
- package/dist/api-security/expired-token-exception.d.ts +0 -1
- package/dist/api-security/expired-token-exception.js +2 -2
- package/dist/api-security/expired-token-exception.js.map +1 -1
- package/dist/api-security/invalid-token-exception.d.ts +0 -1
- package/dist/api-security/invalid-token-exception.js +3 -3
- package/dist/api-security/invalid-token-exception.js.map +1 -1
- package/dist/api-security/json-web-token.d.ts +4 -5
- package/dist/api-security/json-web-token.js +88 -81
- package/dist/api-security/json-web-token.js.map +1 -1
- package/dist/api-security/security-token.js +2 -2
- package/dist/api-security/security-token.js.map +1 -1
- package/dist/crypto/asymmetric-encryption.js +49 -0
- package/dist/crypto/asymmetric-encryption.js.map +1 -1
- package/dist/crypto/crypto-exception.js +1 -0
- package/dist/crypto/crypto-exception.js.map +1 -1
- package/dist/crypto/digital-signature.js +51 -0
- package/dist/crypto/digital-signature.js.map +1 -1
- package/dist/crypto/hash.d.ts +2 -3
- package/dist/crypto/hash.js +5 -5
- package/dist/crypto/hash.js.map +1 -1
- package/dist/crypto/hmac.d.ts +1 -2
- package/dist/crypto/hmac.js +4 -4
- package/dist/crypto/hmac.js.map +1 -1
- package/dist/crypto/symmetric-encryption.d.ts +1 -2
- package/dist/crypto/symmetric-encryption.js +15 -20
- package/dist/crypto/symmetric-encryption.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +12 -11
- package/src/api-security/claim.ts +5 -5
- package/src/api-security/claims-identity.ts +1 -1
- package/src/api-security/expired-token-exception.ts +1 -2
- package/src/api-security/invalid-token-exception.ts +2 -3
- package/src/api-security/json-web-token.ts +80 -79
- package/src/crypto/hash.ts +7 -9
- package/src/crypto/hmac.ts +4 -5
- package/src/crypto/symmetric-encryption.ts +17 -27
- package/test/hash.test.ts +42 -41
- package/test/hmac.test.ts +24 -23
- package/test/json-web-token.test.ts +66 -61
- package/test/other.test.ts +3 -3
- package/test/symmetric-encryption.test.ts +12 -10
- package/tsconfig.json +9 -11
- package/dist/crypto/uuid.js.map +0 -1
- package/tslint.json +0 -64
package/test/hmac.test.ts
CHANGED
|
@@ -9,9 +9,10 @@ suite("Hmac", () =>
|
|
|
9
9
|
{
|
|
10
10
|
test("should return string value that is not null, empty, whitespace or same as the key or input", async () =>
|
|
11
11
|
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const key = await SymmetricEncryption.generateKey();
|
|
13
|
+
const value = "hello world";
|
|
14
|
+
const hmac = Hmac.create(key, value);
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
15
16
|
Assert.ok(hmac !== null && !hmac.isEmptyOrWhiteSpace());
|
|
16
17
|
Assert.notStrictEqual(hmac, key);
|
|
17
18
|
Assert.notStrictEqual(hmac, value);
|
|
@@ -19,42 +20,42 @@ suite("Hmac", () =>
|
|
|
19
20
|
|
|
20
21
|
test("multiple invocations with the same key and value must return the same output", async () =>
|
|
21
22
|
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
const key = await SymmetricEncryption.generateKey();
|
|
24
|
+
const value = "hello world";
|
|
25
|
+
const hmac1 = Hmac.create(key, value);
|
|
26
|
+
const hmac2 = Hmac.create(key, value);
|
|
26
27
|
Assert.strictEqual(hmac1, hmac2);
|
|
27
28
|
});
|
|
28
29
|
|
|
29
30
|
test("multiple invocations with different keys and different values must return different outputs", async () =>
|
|
30
31
|
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const key1 = await SymmetricEncryption.generateKey();
|
|
33
|
+
const value1 = "hello world";
|
|
34
|
+
const hmac1 = Hmac.create(key1, value1);
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
const key2 = await SymmetricEncryption.generateKey();
|
|
37
|
+
const value2 = "goodbye world";
|
|
38
|
+
const hmac2 = Hmac.create(key2, value2);
|
|
38
39
|
Assert.notStrictEqual(hmac1, hmac2);
|
|
39
40
|
});
|
|
40
41
|
|
|
41
42
|
test("multiple invocations with the same key and different values must return different outputs", async () =>
|
|
42
43
|
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
const key = await SymmetricEncryption.generateKey();
|
|
45
|
+
const value1 = "hello world";
|
|
46
|
+
const value2 = "goodbye world";
|
|
47
|
+
const hmac1 = Hmac.create(key, value1);
|
|
48
|
+
const hmac2 = Hmac.create(key, value2);
|
|
48
49
|
Assert.notStrictEqual(hmac1, hmac2);
|
|
49
50
|
});
|
|
50
51
|
|
|
51
52
|
test("multiple invocations with different keys and the same value must return different outputs", async () =>
|
|
52
53
|
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
const key1 = await SymmetricEncryption.generateKey();
|
|
55
|
+
const key2 = await SymmetricEncryption.generateKey();
|
|
56
|
+
const value = "hello world";
|
|
57
|
+
const hmac1 = Hmac.create(key1, value);
|
|
58
|
+
const hmac2 = Hmac.create(key2, value);
|
|
58
59
|
Assert.notStrictEqual(hmac1, hmac2);
|
|
59
60
|
});
|
|
60
61
|
|
|
@@ -14,11 +14,12 @@ suite("Json Web Token ", () =>
|
|
|
14
14
|
|
|
15
15
|
test("should successfully create a token using hmac with one claim", async () =>
|
|
16
16
|
{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
const claim = new Claim("this_claim", "ThisValue");
|
|
18
|
+
const key = await SymmetricEncryption.generateKey();
|
|
19
|
+
const time = Date.now();
|
|
20
|
+
const token = JsonWebToken.fromClaims("issuer1", 1, key, time + 10000000, [claim]).generateToken();
|
|
21
|
+
const jwt = JsonWebToken.fromToken("issuer1", 1, key, token);
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
22
23
|
Assert.ok(jwt !== null || jwt !== undefined);
|
|
23
24
|
Assert.strictEqual(jwt.issuer, "issuer1");
|
|
24
25
|
Assert.strictEqual(jwt.algType, 1);
|
|
@@ -28,12 +29,13 @@ suite("Json Web Token ", () =>
|
|
|
28
29
|
|
|
29
30
|
test("should successfully create a token using hmac with 2 claims", async () =>
|
|
30
31
|
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
const claim1 = new Claim("this_claim", "ThisValue");
|
|
33
|
+
const claim2 = new Claim("that_claim", "ThatValue");
|
|
34
|
+
const key = await SymmetricEncryption.generateKey();
|
|
35
|
+
const time = Date.now();
|
|
36
|
+
const token = JsonWebToken.fromClaims("issuer1", 1, key, time + 10000000, [claim1, claim2]).generateToken();
|
|
37
|
+
const jwt = JsonWebToken.fromToken("issuer1", 1, key, token);
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
37
39
|
Assert.ok(jwt !== null || jwt !== undefined);
|
|
38
40
|
Assert.strictEqual(jwt.issuer, "issuer1");
|
|
39
41
|
Assert.strictEqual(jwt.algType, 1);
|
|
@@ -43,12 +45,13 @@ suite("Json Web Token ", () =>
|
|
|
43
45
|
|
|
44
46
|
test("should successfully create a token using hmac with 2 claims", async () =>
|
|
45
47
|
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
const claim1 = new Claim("this_claim", "ThisValue");
|
|
49
|
+
const claim2 = new Claim("that_claim", "ThatValue");
|
|
50
|
+
const key = await SymmetricEncryption.generateKey();
|
|
51
|
+
const time = Date.now();
|
|
52
|
+
const token = JsonWebToken.fromClaims("issuer1", 1, key, time + 10000000, [claim1, claim2]).generateToken();
|
|
53
|
+
const jwt = JsonWebToken.fromToken("issuer1", 1, key, token);
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
52
55
|
Assert.ok(jwt !== null || jwt !== undefined);
|
|
53
56
|
Assert.strictEqual(jwt.issuer, "issuer1");
|
|
54
57
|
Assert.strictEqual(jwt.algType, 1);
|
|
@@ -58,14 +61,14 @@ suite("Json Web Token ", () =>
|
|
|
58
61
|
|
|
59
62
|
test("should throw an exception when getting JWT with a different issuer that what was user to generate token", async () =>
|
|
60
63
|
{
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
const claim1 = new Claim("this_claim", "ThisValue");
|
|
65
|
+
const claim2 = new Claim("that_claim", "ThatValue");
|
|
66
|
+
const key = await SymmetricEncryption.generateKey();
|
|
67
|
+
const time = Date.now();
|
|
68
|
+
const token = JsonWebToken.fromClaims("issuer1", 1, key, time + 10000000, [claim1, claim2]).generateToken();
|
|
66
69
|
try
|
|
67
70
|
{
|
|
68
|
-
|
|
71
|
+
JsonWebToken.fromToken("notTheIssuer", 1, key, token);
|
|
69
72
|
}
|
|
70
73
|
catch (exp)
|
|
71
74
|
{
|
|
@@ -78,14 +81,14 @@ suite("Json Web Token ", () =>
|
|
|
78
81
|
|
|
79
82
|
test("should throw an exception when getting JWT when the token is expired", async () =>
|
|
80
83
|
{
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
const claim1 = new Claim("this_claim", "ThisValue");
|
|
85
|
+
const claim2 = new Claim("that_claim", "ThatValue");
|
|
86
|
+
const key = await SymmetricEncryption.generateKey();
|
|
87
|
+
const time = Date.now();
|
|
88
|
+
const token = JsonWebToken.fromClaims("issuer1", 1, key, time, [claim1, claim2]).generateToken();
|
|
86
89
|
try
|
|
87
90
|
{
|
|
88
|
-
|
|
91
|
+
JsonWebToken.fromToken("issuer1", 1, key, token);
|
|
89
92
|
}
|
|
90
93
|
catch (exp)
|
|
91
94
|
{
|
|
@@ -96,37 +99,39 @@ suite("Json Web Token ", () =>
|
|
|
96
99
|
Assert.ok(false);
|
|
97
100
|
});
|
|
98
101
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
102
|
+
// TODO: right now we only support one alg type. When we support others, we should uncomment this test
|
|
103
|
+
// test("should throw an exception when getting JWT algorithm given is different than what was used for the token generation", async () =>
|
|
104
|
+
// {
|
|
105
|
+
// let claim1 = new Claim("this_claim", "ThisValue");
|
|
106
|
+
// let claim2 = new Claim("that_claim", "ThatValue");
|
|
107
|
+
// let key = await SymmetricEncryption.generateKey();
|
|
108
|
+
// let time = Date.now();
|
|
109
|
+
// let token = JsonWebToken.fromClaims("issuer1", 1, key, time + 1000000, [claim1, claim2]).generateToken();
|
|
110
|
+
// try
|
|
111
|
+
// {
|
|
112
|
+
// JsonWebToken.fromToken("issuer1", 2, key, token);
|
|
113
|
+
// }
|
|
114
|
+
// catch (exp)
|
|
115
|
+
// {
|
|
116
|
+
// console.log(exp);
|
|
117
|
+
// Assert.ok(exp instanceof InvalidTokenException);
|
|
118
|
+
// Assert.equal(exp.message, `Token '${token}' is invalid because alg was expected to be '${2}' but instead was '${1}'.`);
|
|
119
|
+
// return;
|
|
120
|
+
// }
|
|
121
|
+
// Assert.ok(false);
|
|
122
|
+
// });
|
|
118
123
|
|
|
119
124
|
test("should throw an exception when getting JWT key given is different than what was used for the token generation", async () =>
|
|
120
125
|
{
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
const claim1 = new Claim("this_claim", "ThisValue");
|
|
127
|
+
const claim2 = new Claim("that_claim", "ThatValue");
|
|
128
|
+
const key = await SymmetricEncryption.generateKey();
|
|
129
|
+
const key2 = await SymmetricEncryption.generateKey();
|
|
130
|
+
const time = Date.now();
|
|
131
|
+
const token = JsonWebToken.fromClaims("issuer1", 1, key, time + 1000000, [claim1, claim2]).generateToken();
|
|
127
132
|
try
|
|
128
133
|
{
|
|
129
|
-
|
|
134
|
+
JsonWebToken.fromToken("issuer1", 1, key2, token);
|
|
130
135
|
}
|
|
131
136
|
catch (exp)
|
|
132
137
|
{
|
|
@@ -139,15 +144,15 @@ suite("Json Web Token ", () =>
|
|
|
139
144
|
|
|
140
145
|
test("should throw an exception when getting JWT when the token is tampered with", async () =>
|
|
141
146
|
{
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
let token =
|
|
147
|
+
const claim1 = new Claim("this_claim", "ThisValue");
|
|
148
|
+
const claim2 = new Claim("that_claim", "ThatValue");
|
|
149
|
+
const key = await SymmetricEncryption.generateKey();
|
|
150
|
+
const time = Date.now();
|
|
151
|
+
let token = JsonWebToken.fromClaims("issuer1", 1, key, time + 1000000, [claim1, claim2]).generateToken();
|
|
147
152
|
token = token + "someStuff";
|
|
148
153
|
try
|
|
149
154
|
{
|
|
150
|
-
|
|
155
|
+
JsonWebToken.fromToken("issuer1", 1, key, token);
|
|
151
156
|
}
|
|
152
157
|
catch (exp)
|
|
153
158
|
{
|
package/test/other.test.ts
CHANGED
|
@@ -4,11 +4,11 @@ suite("Other", () =>
|
|
|
4
4
|
{
|
|
5
5
|
test("encoding decoding", () =>
|
|
6
6
|
{
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const text = "moonlight43iuj90/;msdnnksdkdkdk[[[][][";
|
|
8
|
+
const encodedText = Buffer.from(text, "utf8").toString("base64");
|
|
9
9
|
Assert.notStrictEqual(encodedText, text);
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const decodedText = Buffer.from(encodedText, "base64").toString("utf8");
|
|
12
12
|
Assert.notStrictEqual(decodedText, encodedText);
|
|
13
13
|
Assert.strictEqual(decodedText, text);
|
|
14
14
|
});
|
|
@@ -10,16 +10,17 @@ suite("SymmetricEncryption", () =>
|
|
|
10
10
|
{
|
|
11
11
|
test("must return string value that is not null, empty or whitespace", async () =>
|
|
12
12
|
{
|
|
13
|
-
|
|
13
|
+
const key = await SymmetricEncryption.generateKey();
|
|
14
14
|
console.log("key", key);
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
15
16
|
Assert.ok(key !== null && !key.isEmptyOrWhiteSpace());
|
|
16
17
|
});
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
test("consecutive calls must yield unique values", async () =>
|
|
20
21
|
{
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
const key1 = await SymmetricEncryption.generateKey();
|
|
23
|
+
const key2 = await SymmetricEncryption.generateKey();
|
|
23
24
|
Assert.notStrictEqual(key1, key2);
|
|
24
25
|
});
|
|
25
26
|
});
|
|
@@ -28,9 +29,10 @@ suite("SymmetricEncryption", () =>
|
|
|
28
29
|
{
|
|
29
30
|
test("must return cipher text value when called with key and plain text value", async () =>
|
|
30
31
|
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const key = "E25B269440F88601C453CD171D76EDDC11D8CF33230742DF8CAD5873D28F78B2";
|
|
33
|
+
const value = "password";
|
|
34
|
+
const encrypted = await SymmetricEncryption.encrypt(key, value);
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
34
36
|
Assert.ok(encrypted !== null);
|
|
35
37
|
Assert.notStrictEqual(encrypted, value);
|
|
36
38
|
});
|
|
@@ -171,10 +173,10 @@ suite("SymmetricEncryption", () =>
|
|
|
171
173
|
{
|
|
172
174
|
test("must return plain text value when called with key and cipher text value", async () =>
|
|
173
175
|
{
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
const key = await SymmetricEncryption.generateKey();
|
|
177
|
+
const value = "password";
|
|
178
|
+
const encrypted = await SymmetricEncryption.encrypt(key, value);
|
|
179
|
+
const decrypted = SymmetricEncryption.decrypt(key, encrypted);
|
|
178
180
|
Assert.strictEqual(decrypted, value);
|
|
179
181
|
});
|
|
180
182
|
|
package/tsconfig.json
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"module": "commonjs",
|
|
4
4
|
"target": "es2015",
|
|
5
5
|
"strict": true,
|
|
6
|
-
"strictNullChecks":
|
|
7
|
-
"strictFunctionTypes":
|
|
8
|
-
"noImplicitThis":
|
|
6
|
+
"strictNullChecks": true,
|
|
7
|
+
"strictFunctionTypes": true,
|
|
8
|
+
"noImplicitThis": true,
|
|
9
9
|
"noImplicitReturns": true,
|
|
10
10
|
"noUnusedLocals": true,
|
|
11
11
|
"noUnusedParameters": true,
|
|
@@ -14,15 +14,13 @@
|
|
|
14
14
|
"sourceMap": true,
|
|
15
15
|
"experimentalDecorators": true,
|
|
16
16
|
"emitDecoratorMetadata": true,
|
|
17
|
-
"removeComments":
|
|
17
|
+
"removeComments": false,
|
|
18
18
|
"forceConsistentCasingInFileNames": true,
|
|
19
19
|
"incremental": false,
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
]
|
|
20
|
+
"skipLibCheck": true,
|
|
21
|
+
"importHelpers": true,
|
|
22
|
+
"noEmitHelpers": true,
|
|
23
|
+
"noImplicitOverride": true,
|
|
24
|
+
"pretty": true
|
|
27
25
|
}
|
|
28
26
|
}
|
package/dist/crypto/uuid.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../src/crypto/uuid.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAI7B,MAAa,IAAI;IAEb,gBAAwB,CAAC;IAGlB,MAAM,CAAC,MAAM;QAEhB,OAAO,IAAI,CAAC,EAAE,EAAE,CAAC;IACrB,CAAC;CACJ;AATD,oBASC","sourcesContent":["import * as uuid from \"uuid\";\n\n\n// public\nexport class Uuid\n{\n private constructor() { }\n \n \n public static create(): string\n {\n return uuid.v4();\n }\n}"]}
|
package/tslint.json
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"defaultSeverity": "error",
|
|
3
|
-
"rules": {
|
|
4
|
-
"class-name": true,
|
|
5
|
-
"comment-format": [
|
|
6
|
-
true,
|
|
7
|
-
"check-space"
|
|
8
|
-
],
|
|
9
|
-
"indent": [
|
|
10
|
-
true,
|
|
11
|
-
"spaces"
|
|
12
|
-
],
|
|
13
|
-
"no-duplicate-variable": true,
|
|
14
|
-
"no-eval": true,
|
|
15
|
-
"no-internal-module": true,
|
|
16
|
-
"no-trailing-whitespace": false,
|
|
17
|
-
"no-var-keyword": true,
|
|
18
|
-
"no-default-export": true,
|
|
19
|
-
"one-line": [
|
|
20
|
-
true,
|
|
21
|
-
"check-whitespace"
|
|
22
|
-
],
|
|
23
|
-
"quotemark": [
|
|
24
|
-
true,
|
|
25
|
-
"double"
|
|
26
|
-
],
|
|
27
|
-
"semicolon": [
|
|
28
|
-
true,
|
|
29
|
-
"always"
|
|
30
|
-
],
|
|
31
|
-
"triple-equals": [
|
|
32
|
-
true,
|
|
33
|
-
"allow-null-check"
|
|
34
|
-
],
|
|
35
|
-
"typedef-whitespace": [
|
|
36
|
-
true,
|
|
37
|
-
{
|
|
38
|
-
"call-signature": "nospace",
|
|
39
|
-
"index-signature": "nospace",
|
|
40
|
-
"parameter": "nospace",
|
|
41
|
-
"property-declaration": "nospace",
|
|
42
|
-
"variable-declaration": "nospace"
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"variable-name": [
|
|
46
|
-
true,
|
|
47
|
-
"ban-keywords"
|
|
48
|
-
],
|
|
49
|
-
"whitespace": [
|
|
50
|
-
true,
|
|
51
|
-
"check-branch",
|
|
52
|
-
"check-decl",
|
|
53
|
-
"check-operator",
|
|
54
|
-
"check-separator",
|
|
55
|
-
"check-type"
|
|
56
|
-
],
|
|
57
|
-
"interface-name": [
|
|
58
|
-
true,
|
|
59
|
-
"never-prefix"
|
|
60
|
-
],
|
|
61
|
-
"await-promise": true,
|
|
62
|
-
"no-floating-promises": true
|
|
63
|
-
}
|
|
64
|
-
}
|