Skip to content

Commit 467446b

Browse files
committed
[cdt-63] : linting fixed
closes #63 Signed-off-by: ashish <[email protected]>
1 parent 5351ee6 commit 467446b

File tree

3 files changed

+23
-24
lines changed

3 files changed

+23
-24
lines changed

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ USAGE
161161
$ cdt hash [STRING]
162162
163163
OPTIONS
164-
-f, --file=file file to be hashed
165-
-h, --help show CLI help
166-
-o, --outputFile=outputFile output file path
167-
-s, --string=string string to be hashed
168-
-t, --type=type type of hash [SHA1(default), MD5, SHA256, SHA512, RMD160 or RIPEMD160]
164+
-f, --file=file file to be hashed
165+
-h, --help show CLI help
166+
-o, --output=output output file path
167+
-s, --string=string string to be hashed
168+
-t, --type=type type of hash [SHA1(default), MD5, SHA256, SHA512, RMD160 or RIPEMD160]
169169
```
170170

171171
_See code: [src/commands/hash.ts](https://github.com/codingtools/cdt/blob/v0.1.6/src/commands/hash.ts)_
@@ -196,12 +196,10 @@ USAGE
196196
$ cdt minify [FILE]
197197
198198
OPTIONS
199-
-f, --file=file file to be minified
200-
-h, --help show CLI help
201-
-o, --outputFile=outputFile output file path
202-
203-
-t, --type=type type of file to be minified, it will try to find type with extension supported: JS,
204-
HTML/HTM, CSS
199+
-f, --file=file file to be minified
200+
-h, --help show CLI help
201+
-o, --output=output output file path
202+
-t, --type=type type of file to be minified, it will try to find type with extension supported: JS, HTML/HTM, CSS
205203
```
206204

207205
_See code: [src/commands/minify.ts](https://github.com/codingtools/cdt/blob/v0.1.6/src/commands/minify.ts)_

oclif.manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":"0.1.6","commands":{"avro":{"id":"avro","description":"Avro Utility command","pluginName":"@codingtools/cdt","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"file":{"name":"file","type":"option","char":"f","description":"input file path"},"output":{"name":"output","type":"option","char":"o","description":"output file path"},"schemaType":{"name":"schemaType","type":"option","char":"t","description":"schema type file path"}},"args":[{"name":"command"}]},"bundlephobia":{"id":"bundlephobia","description":"Find cost of adding a npm/yarn packages or all dependencies in package.json file","pluginName":"@codingtools/cdt","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"packages":{"name":"packages","type":"option","char":"p","description":"packages for which cost is required, can pass more than one separated by space"},"file":{"name":"file","type":"option","char":"f","description":"path for package.json file"}},"args":[{"name":"package"}]},"crypto":{"id":"crypto","description":"Encryption and Decryption functionality for File/String","pluginName":"@codingtools/cdt","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"encryption":{"name":"encryption","type":"option","char":"e","description":"encryption type, Supported [AES, DES, 3DES, Rabbit, RC4, RC4Drop]"},"decryption":{"name":"decryption","type":"option","char":"d","description":"decryption type, Supported [AES, DES, 3DES, Rabbit, RC4, RC4Drop]"},"string":{"name":"string","type":"option","char":"s","description":"string to be encrypted/decrypted"},"file":{"name":"file","type":"option","char":"f","description":"file to be encrypted/decrypted"},"key":{"name":"key","type":"option","char":"k","description":"key for encryption/decryption"},"mode":{"name":"mode","type":"option","char":"m","description":"Block Mode, Supported [CBC, CFB, CTR, OFB, ECB]"}},"args":[{"name":"string"}]},"datetime":{"id":"datetime","description":"Date and Time utility","pluginName":"@codingtools/cdt","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"date":{"name":"date","type":"option","char":"d","description":"Datetime input string, default: Current Datetime, could also be passed through argument"},"format":{"name":"format","type":"option","char":"f","description":"Datetime format, default: Do MMMM YYYY, h:m:s A, Z UTC"},"timezone":{"name":"timezone","type":"option","char":"z","description":"Timezone for Datetime parsing, default: Your timezone"},"locale":{"name":"locale","type":"option","char":"l","description":"Locale, default: en"}},"args":[{"name":"date"}]},"hash":{"id":"hash","description":"Hashing functionality for a string/file","pluginName":"@codingtools/cdt","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"type":{"name":"type","type":"option","char":"t","description":"type of hash [SHA1(default), MD5, SHA256, SHA512, RMD160 or RIPEMD160]"},"string":{"name":"string","type":"option","char":"s","description":"string to be hashed"},"file":{"name":"file","type":"option","char":"f","description":"file to be hashed"},"output":{"name":"output","type":"option","char":"o","description":"output file path"}},"args":[{"name":"string"}]},"minify":{"id":"minify","description":"File Minifier","pluginName":"@codingtools/cdt","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"type":{"name":"type","type":"option","char":"t","description":"type of file to be minified, it will try to find type with extension supported: JS, HTML/HTM, CSS"},"file":{"name":"file","type":"option","char":"f","description":"file to be minified"},"output":{"name":"output","type":"option","char":"o","description":"output file path"}},"args":[{"name":"file"}]}}}

src/commands/bundlephobia.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,6 @@ export default class Bundlephobia extends Command {
2222

2323
static args = [{name: 'package'}] // only one can be passed club which one passed through flag and arg
2424

25-
private getErrorMessage(pkg: string, message: string) {
26-
// replacing will be useful when we do not have specific version
27-
// output will be like below
28-
/*
29-
⚠ @codingtools/[email protected] This package has not been published with this particular version.
30-
Valid versions - `<code>latest</code>`, `<code>0.1.1</code>` and `<code>0.1.2</code>`
31-
*/
32-
if (message.includes('This package has not been published with this particular version.'))
33-
message = message.replace(/`<code>|<\/code>`/g, '')
34-
35-
return `${chalk.red(pkg)} ${message}`
36-
}
37-
3825
private static getSize(byteSize: number) {
3926
if (byteSize >= 1024 * 1024)
4027
return `${chalk.red((byteSize / (1024 * 1024)).toFixed(1) + 'MB')}`
@@ -55,6 +42,19 @@ export default class Bundlephobia extends Command {
5542
this.bundlePhobia(flags, args)
5643
}
5744

45+
private getErrorMessage(pkg: string, message: string) {
46+
// replacing will be useful when we do not have specific version
47+
// output will be like below
48+
/*
49+
⚠ @codingtools/[email protected] This package has not been published with this particular version.
50+
Valid versions - `<code>latest</code>`, `<code>0.1.1</code>` and `<code>0.1.2</code>`
51+
*/
52+
if (message.includes('This package has not been published with this particular version.'))
53+
message = message.replace(/`<code>|<\/code>`/g, '')
54+
55+
return `${chalk.red(pkg)} ${message}`
56+
}
57+
5858
private getPackages(flags: any, args: any) {
5959
let packages = []
6060

0 commit comments

Comments
 (0)