Skip to content

Commit 85b97f6

Browse files
committedMar 4, 2024
fix: format readme lint
1 parent 2f182ca commit 85b97f6

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed
 

‎README.md

+20-6
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ Then, leetcode-practice will meet all your needs!
2424

2525
The best and most flexible way to use it is to use our CLI in the terminal. You can create and check your solutions using three core commands: `lk`, `lf`, and `lc`.
2626

27-
[Installation](#I-Global-Installation-of-CLI-(Option-A)) · [Usage](#Using-CLI)
27+
[Installation](#I-Global-Installation-of-CLI-(Option-A)) · [Usage](#using-cli)
2828

2929
### Option B: Fork (Supported)
3030

3131
You can also use GitHub's fork feature to create a copy of our project. Then, you can directly use the built-in commands within the project to create and check solutions.
3232

33-
[Installation](#II-Fork-the-Repository-to-Create-Your-Own-leetcode-practice-Repository-(Option-B)) · [Usage](#Using-the-Forked-Project)
33+
[Installation](#II-Fork-the-Repository-to-Create-Your-Own-leetcode-practice-Repository-(Option-B)) · [Usage](#using-the-forked-project)
3434

3535
### Option C: Plugin (Supported)
3636

3737
You can also use our `leetcode-practice` plugin available in the plugin marketplace for interactive creation and checking of solutions. (Supported on two popular editors: `WebStorm` and `VS Code`)
3838

39-
[Installation](#III-Install-Plugins-from-the-Editor's-Marketplace-(Option-C)) · [Usage](#Plugin-Usage)
39+
[Installation](#III-Install-Plugins-from-the-Editor's-Marketplace-(Option-C)) · [Usage](#plugin-usage)
4040

4141
## Prerequisites
4242

@@ -67,6 +67,7 @@ yarn global install leetcode-practice
6767
### II. Fork the Repository to Create Your Own leetcode-practice Repository (Option B)
6868

6969
#### Regular Method
70+
7071
1. Open our project link: [leetcode-practice](https://github.com/wh131462/leetcode-practice)
7172

7273
![leetcode-practice-github](resources/images/leetcode-practice-github.png)
@@ -173,6 +174,7 @@ Problem file address is: /home/wh131462/workspace/leetcode-practice/src/14.longe
173174
##### [5]. Easy Creation Mode (Interactive Creation) - [`-e`/`--easy`]
174175

175176
In addition to creating problems quickly with precise commands as mentioned above, you can also use easy creation mode for interactive creation.
177+
176178
```shell
177179
lc -e
178180
```
@@ -229,6 +231,7 @@ lk -i 2581
229231
# For problem numbers with spaces, use double quotation marks
230232
lk "LCP 50"
231233
```
234+
232235
Example of checking the specified solution:
233236

234237
```shell
@@ -253,6 +256,7 @@ Type `lk` followed by the `-r` parameter in the terminal to check the previously
253256
# Full command
254257
lk -r
255258
```
259+
256260
Example of checking a randomly obtained solution:
257261

258262
```shell
@@ -274,6 +278,7 @@ Click to jump to problem submission: https://leetcode.com/problems/first-missing
274278
##### [4]. Easy Mode (Interactive Checking) [`-e`/`--easy`]
275279

276280
Type `lk` followed by the `-e` parameter in the terminal to use interactive mode for checking the problem.
281+
277282
```shell
278283
# Full command
279284
lk -e
@@ -334,6 +339,7 @@ Note: Unable to execute test cases in this environment.
334339
335340
The `create` and `check` commands can also use the `-d` parameter to specify a relative address based on the current working directory as the specified directory.
336341
When specifying a directory, the operation will be performed in that directory.
342+
337343
```shell
338344
# Use the src directory as the generation directory
339345
lc -d src -t
@@ -375,11 +381,13 @@ workspace/leetcode-practice [dev●] » lc -V
375381
##### [4]. Update Check [`-u`/`--update`]
376382
377383
Using the `-u` or `--update` parameter, you can check whether the current version is the latest version. If the current version is not the latest version, you will be prompted whether to update.
384+
378385
```shell
379386
lk -u
380387
lf -u
381388
lc -u
382389
```
390+
383391
```shell
384392
? Automatically detected environment is [ project ], if not, please make a selection, if yes, please press Enter to confirm. project
385393
Start getting version number in npm repository...
@@ -412,14 +420,17 @@ The commands in the forked project are the same as those in the CLI usage parame
412420
413421
##### [1]. Create Solution [`lc`]
414422
415-
Refer to the `lc` part of the CLI for parameters: [lc](#1-Creating-Solutions---lc)
423+
Refer to the `lc` part of the CLI for parameters: [lc](#1-creating-solutions---lc)
416424
417425
Simple usage example:
426+
418427
```shell
419428
# Execute using yarn
420429
yarn lc 1314
421430
```
431+
422432
Execution result:
433+
423434
```shell
424435
# Generated in the src directory
425436
> yarn lc 1314
@@ -433,14 +444,17 @@ Problem file address is:/Users/mac-106/wh131462/workspace/leetcode-practice/src/
433444
434445
##### [2]. Check Solution [`lk`]
435446
436-
Refer to the `lk` part of the CLI for parameters: [lk](#2-Checking-Solutions---lk)
447+
Refer to the `lk` part of the CLI for parameters: [lk](#2-checking-solutions---lk)
437448
438449
Simple usage example:
450+
439451
```shell
440452
# Execute using yarn
441453
yarn lk 1314
442454
```
455+
443456
Execution result:
457+
444458
```shell
445459
# Checked in the src directory
446460
> yarn lk 1314
@@ -460,7 +474,7 @@ Click to jump to problem submission: https://leetcode.com/problems/matrix-block-
460474
461475
##### [3]. Look Up Solutions [`lf`]
462476
463-
Refer to the `lf` part of the CLI for parameters: [lf](#3-Problem-Lookup---lf)
477+
Refer to the `lf` part of the CLI for parameters: [lf](#3-problem-lookup---lf)
464478
465479
To be developed...
466480

0 commit comments

Comments
 (0)