esmate 1.0.6 → 1.0.8
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/README.md +17 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -13,9 +13,16 @@ with Deno, you will be happy with esmate.
|
|
|
13
13
|
|
|
14
14
|
### Format Code
|
|
15
15
|
|
|
16
|
+
First, you need to install Prettier:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install -D prettier
|
|
20
|
+
```
|
|
21
|
+
|
|
16
22
|
Define your Prettier configuration in a `prettier.config.js` file:
|
|
17
23
|
|
|
18
24
|
```ts
|
|
25
|
+
// @ts-check
|
|
19
26
|
import { defineConfig } from "esmate/prettier";
|
|
20
27
|
|
|
21
28
|
export default defineConfig({
|
|
@@ -30,23 +37,30 @@ export default defineConfig({
|
|
|
30
37
|
Check out [@esmate/prettier](https://www.npmjs.com/package/@esmate/prettier) to see all available options for Tailwind,
|
|
31
38
|
React, Vue, Astro, Svelte, and more.
|
|
32
39
|
|
|
33
|
-
Run Prettier to
|
|
40
|
+
Run Prettier to check your code:
|
|
34
41
|
|
|
35
42
|
```bash
|
|
36
|
-
esmate fmt
|
|
43
|
+
esmate fmt --check
|
|
37
44
|
```
|
|
38
45
|
|
|
39
46
|
Automatically fix formatting issues:
|
|
40
47
|
|
|
41
48
|
```bash
|
|
42
|
-
esmate fmt
|
|
49
|
+
esmate fmt
|
|
43
50
|
```
|
|
44
51
|
|
|
45
52
|
### Lint Code
|
|
46
53
|
|
|
54
|
+
First, you need to install ESLint:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npm install -D eslint
|
|
58
|
+
```
|
|
59
|
+
|
|
47
60
|
Define your ESLint configuration in a `eslintrc.config.js` file:
|
|
48
61
|
|
|
49
62
|
```ts
|
|
63
|
+
// @ts-check
|
|
50
64
|
import { defineConfig } from "esmate/eslint";
|
|
51
65
|
|
|
52
66
|
export default defineConfig({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "esmate",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.8",
|
|
5
5
|
"description": "Uncomplicate JavaScript",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"es-toolkit": "^1.35.0",
|
|
40
40
|
"find-up": "^7.0.0",
|
|
41
41
|
"nypm": "^0.6.0",
|
|
42
|
-
"@esmate/eslint": "1.0.
|
|
43
|
-
"@esmate/prettier": "1.0.
|
|
42
|
+
"@esmate/eslint": "1.0.1",
|
|
43
|
+
"@esmate/prettier": "1.0.4"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@rslib/core": "^0.7.1",
|
|
@@ -53,6 +53,6 @@
|
|
|
53
53
|
"build": "rslib build",
|
|
54
54
|
"dev": "rslib build --watch",
|
|
55
55
|
"fix": "prettier --write . && eslint --fix .",
|
|
56
|
-
"check": "prettier --check . && eslint ."
|
|
56
|
+
"check": "tsc && prettier --check . && eslint ."
|
|
57
57
|
}
|
|
58
58
|
}
|