Skip to content

Commit fcb66de

Browse files
committed
chore: setup @antfu/eslint-config
1 parent 6180a13 commit fcb66de

File tree

13 files changed

+2133
-109
lines changed

13 files changed

+2133
-109
lines changed

.github/workflows/static.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Deploy static content to Pages
44
on:
55
# Runs on pushes targeting the default branch
66
push:
7-
branches: ["main"]
7+
branches: [main]
88

99
# Allows you to run this workflow manually from the Actions tab
1010
workflow_dispatch:
@@ -18,7 +18,7 @@ permissions:
1818
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1919
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2020
concurrency:
21-
group: "pages"
21+
group: pages
2222
cancel-in-progress: false
2323

2424
jobs:
@@ -37,7 +37,7 @@ jobs:
3737
uses: actions/upload-pages-artifact@v3
3838
with:
3939
# Upload entire repository
40-
path: './docs/'
40+
path: ./docs/
4141
- name: Deploy to GitHub Pages
4242
id: deployment
4343
uses: actions/deploy-pages@v4

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Feel free to submit PRs to add helper functions.
3737
pnpm add vue-modern-cropper
3838
```
3939

40+
<!-- eslint-skip -->
4041
```ts
4142
// Register it globally
4243
import { ModernCropper } from 'vue-modern-cropper'

eslint.config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import antfu from '@antfu/eslint-config'
2+
3+
export default antfu(
4+
{
5+
unocss: true,
6+
vue: true,
7+
ignores: ['docs', 'lib'],
8+
},
9+
{
10+
rules: {
11+
'style/no-trailing-spaces': ['error', { ignoreComments: true }],
12+
'style/max-statements-per-line': ['error', { max: 2 }],
13+
},
14+
},
15+
{
16+
files: ['*.md'],
17+
rules: {
18+
'style/no-trailing-spaces': 'off',
19+
},
20+
},
21+
)

package.json

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,46 @@
11
{
22
"name": "vue-modern-cropper",
3-
"description": "Power-packed wrapper over cropperjs@next",
4-
"version": "0.1.3",
53
"type": "module",
4+
"version": "0.1.3",
5+
"description": "Power-packed wrapper over cropperjs@next",
66
"author": "NamesMT <dangquoctrung123@gmail.com>",
7-
"scripts": {
8-
"dev": "vite --mode docs",
9-
"build:docs": "vite build --mode docs",
10-
"build:lib": "vite build --mode lib && vue-tsc -p tsconfig.build.json",
11-
"preview": "vite preview",
12-
"release": "pnpm dlx changelogen@latest --release --push --publish",
13-
"prerelease": "pnpm run build:lib"
14-
},
7+
"homepage": "https://github.com/NamesMT/vue-modern-cropper",
158
"repository": {
169
"type": "git",
1710
"url": "git+https://github.com/NamesMT/vue-modern-cropper.git"
1811
},
19-
"homepage": "https://github.com/NamesMT/vue-modern-cropper",
20-
"files": [
21-
"lib"
22-
],
23-
"main": "./lib/vue-modern-cropper.mjs",
24-
"module": "./lib/vue-modern-cropper.mjs",
2512
"exports": {
2613
".": {
27-
"import": "./lib/vue-modern-cropper.mjs",
28-
"types": "./lib/index.d.ts"
14+
"types": "./lib/index.d.ts",
15+
"import": "./lib/vue-modern-cropper.mjs"
2916
}
3017
},
18+
"main": "./lib/vue-modern-cropper.mjs",
19+
"module": "./lib/vue-modern-cropper.mjs",
3120
"types": "./lib/index.d.ts",
21+
"files": [
22+
"lib"
23+
],
24+
"scripts": {
25+
"dev": "vite --mode docs",
26+
"build:docs": "vite build --mode docs",
27+
"build:lib": "vite build --mode lib && vue-tsc -p tsconfig.build.json",
28+
"preview": "vite preview",
29+
"release": "pnpm dlx changelogen@latest --release --push --publish",
30+
"prerelease": "pnpm run build:lib"
31+
},
3232
"devDependencies": {
33+
"@antfu/eslint-config": "^2.12.2",
3334
"@iconify-json/carbon": "^1.1.31",
3435
"@iconify-json/mdi": "^1.1.64",
3536
"@types/node": "^18.19.28",
37+
"@unocss/eslint-plugin": "^0.59.0",
3638
"@unocss/reset": "^0.55.7",
3739
"@vitejs/plugin-vue": "^4.6.2",
3840
"@vueuse/core": "^10.9.0",
3941
"clean-css": "^5.3.3",
4042
"cropperjs": "2.0.0-beta.4",
43+
"eslint": "^9.0.0",
4144
"highlight.js": "^11.9.0",
4245
"sass": "^1.72.0",
4346
"type-fest": "^4.14.0",
@@ -55,4 +58,4 @@
5558
"isarray": "npm:@nolyfill/isarray@latest"
5659
}
5760
}
58-
}
61+
}

0 commit comments

Comments
 (0)