-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: prepare to transfer ownership
- Loading branch information
Showing
13 changed files
with
2,205 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: autofix.ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
autofix: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js lts/* | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Setup | ||
run: npm i -g @antfu/ni | ||
|
||
- name: Install | ||
run: nci | ||
env: | ||
CYPRESS_INSTALL_BINARY: 0 | ||
|
||
- name: Lint | ||
run: nr lint --fix | ||
|
||
- uses: autofix-ci/action@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
// Enable the ESlint flat config support | ||
"eslint.experimental.useFlatConfig": true, | ||
|
||
// Disable the default formatter, use eslint instead | ||
"prettier.enable": false, | ||
"editor.formatOnSave": false, | ||
|
||
// Auto fix | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit", | ||
"source.organizeImports": "never" | ||
}, | ||
|
||
// Silent the stylistic rules in you IDE, but still auto fix them | ||
"eslint.rules.customizations": [ | ||
{ "rule": "style/*", "severity": "off" }, | ||
{ "rule": "format/*", "severity": "off" }, | ||
{ "rule": "*-indent", "severity": "off" }, | ||
{ "rule": "*-spacing", "severity": "off" }, | ||
{ "rule": "*-spaces", "severity": "off" }, | ||
{ "rule": "*-order", "severity": "off" }, | ||
{ "rule": "*-dangle", "severity": "off" }, | ||
{ "rule": "*-newline", "severity": "off" }, | ||
{ "rule": "*quotes", "severity": "off" }, | ||
{ "rule": "*semi", "severity": "off" } | ||
], | ||
|
||
// Enable eslint for all supported languages | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact", | ||
"vue", | ||
"html", | ||
"markdown", | ||
"json", | ||
"jsonc", | ||
"yaml", | ||
"toml" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import antfu from '@antfu/eslint-config' | ||
|
||
export default antfu({ | ||
includes: [ | ||
'src/**/*', | ||
], | ||
ignores: [ | ||
'test/inputs/**', | ||
'test/outputs/**', | ||
], | ||
typescript: true, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"name": "prettier-plugin-slidev", | ||
"type": "module", | ||
"version": "0.0.1", | ||
"description": "A prettier plugin for Slidev", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"type": "module", | ||
"author": "_Kerman <[email protected]>", | ||
"license": "MIT", | ||
"keywords": [ | ||
"slidev", | ||
"prettier", | ||
|
@@ -13,40 +13,58 @@ | |
"formatter", | ||
"format" | ||
], | ||
"files": [ | ||
"dist", | ||
"LICENSE", | ||
"README.md" | ||
], | ||
"exports": { | ||
".": { | ||
"default": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.js", | ||
"types": "./dist/index.d.ts" | ||
"default": "./dist/index.js" | ||
} | ||
}, | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"LICENSE", | ||
"README.md", | ||
"dist" | ||
], | ||
"scripts": { | ||
"dev": "vite build --watch", | ||
"build": "vite build", | ||
"test": "vitest", | ||
"coverage": "vitest run --coverage" | ||
"coverage": "vitest run --coverage", | ||
"lint": "eslint .", | ||
"lint:fix": "nr lint --fix", | ||
"typecheck": "vue-tsc --noEmit", | ||
"release": "bumpp package.json" | ||
}, | ||
"author": "_Kerman <[email protected]>", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"prettier": "^3.2.4" | ||
}, | ||
"dependencies": { | ||
"@slidev/parser": "^0.47.4" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^2.6.4", | ||
"@antfu/ni": "^0.21.12", | ||
"@slidev/types": "^0.47.4", | ||
"@types/js-yaml": "^4.0.9", | ||
"@types/node": "^20.11.15", | ||
"@vitest/coverage-istanbul": "^1.2.2", | ||
"bumpp": "^9.3.0", | ||
"eslint": "^8.56.0", | ||
"lint-staged": "^15.2.2", | ||
"simple-git-hooks": "^2.9.0", | ||
"tsup": "^8.0.1", | ||
"vite": "^5.0.12", | ||
"vite-plugin-dts": "^3.7.2", | ||
"vitest": "^1.2.2" | ||
}, | ||
"simple-git-hooks": { | ||
"pre-commit": "npx lint-staged" | ||
}, | ||
"lint-staged": { | ||
"*": [ | ||
"eslint --fix --cache" | ||
] | ||
} | ||
} |
Oops, something went wrong.