esmate 1.0.7 → 1.0.9
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 +16 -2
- 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({
|
|
@@ -44,9 +51,16 @@ esmate fmt
|
|
|
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({
|
|
@@ -56,8 +70,8 @@ export default defineConfig({
|
|
|
56
70
|
});
|
|
57
71
|
```
|
|
58
72
|
|
|
59
|
-
Check out [@esmate/eslint](https://www.npmjs.com/package/@esmate/eslint) to see all available options for
|
|
60
|
-
|
|
73
|
+
Check out [@esmate/eslint](https://www.npmjs.com/package/@esmate/eslint) to see all available options for React, Vue,
|
|
74
|
+
Astro, Svelte, and more.
|
|
61
75
|
|
|
62
76
|
Run ESLint to check for code issues:
|
|
63
77
|
|
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.9",
|
|
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/
|
|
43
|
-
"@esmate/
|
|
42
|
+
"@esmate/eslint": "1.0.2",
|
|
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
|
}
|