-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
6,981 additions
and
2 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,2 @@ | ||
*.js text eol=lf | ||
*.md text eol=lf |
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,26 @@ | ||
name: autofix.ci | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: ["main"] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
autofix: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
- run: pnpm install | ||
- name: Fix lint issues | ||
run: pnpm lint:fix | ||
- uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c | ||
with: | ||
commit-message: "chore: apply automated updates" |
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,24 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
- run: pnpm install | ||
- run: pnpm build |
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,22 @@ | ||
name: sync-gitee | ||
|
||
on: | ||
workflow_run: | ||
workflows: ['release'] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
sync-to-gitee: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: gitee-mirror-action | ||
uses: Yikun/hub-mirror-action@master | ||
with: | ||
src: github/viarotel-org | ||
dst: gitee/viarotel-org | ||
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} | ||
dst_token: ${{ secrets.GITEE_TOKEN }} | ||
account_type: org | ||
white_list: 'cleants' | ||
force_update: 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
# User | ||
node_modules | ||
*.local | ||
dist |
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,2 @@ | ||
|
||
find "src" -type f -exec git update-index --chmod=+x {} + |
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,5 @@ | ||
registry=https://registry.npmmirror.com/ | ||
shamefully-hoist=true | ||
strict-peer-dependencies=false | ||
auto-install-peers=true | ||
virtual-store-dir-max-length=70 |
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,87 @@ | ||
{ | ||
// 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", | ||
"fixable": true | ||
}, | ||
{ | ||
"rule": "format/*", | ||
"severity": "off", | ||
"fixable": true | ||
}, | ||
{ | ||
"rule": "*-indent", | ||
"severity": "off", | ||
"fixable": true | ||
}, | ||
{ | ||
"rule": "*-spacing", | ||
"severity": "off", | ||
"fixable": true | ||
}, | ||
{ | ||
"rule": "*-spaces", | ||
"severity": "off", | ||
"fixable": true | ||
}, | ||
{ | ||
"rule": "*-order", | ||
"severity": "off", | ||
"fixable": true | ||
}, | ||
{ | ||
"rule": "*-dangle", | ||
"severity": "off", | ||
"fixable": true | ||
}, | ||
{ | ||
"rule": "*-newline", | ||
"severity": "off", | ||
"fixable": true | ||
}, | ||
{ | ||
"rule": "*quotes", | ||
"severity": "off", | ||
"fixable": true | ||
}, | ||
{ | ||
"rule": "*semi", | ||
"severity": "off", | ||
"fixable": true | ||
} | ||
], | ||
// Enable eslint for all supported languages | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact", | ||
"vue", | ||
"html", | ||
"markdown", | ||
"json", | ||
"jsonc", | ||
"yaml", | ||
"toml", | ||
"xml", | ||
"gql", | ||
"graphql", | ||
"astro", | ||
"svelte", | ||
"css", | ||
"less", | ||
"scss", | ||
"pcss", | ||
"postcss" | ||
] | ||
} |
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,5 @@ | ||
# Changelog | ||
|
||
|
||
## v0.0.1-0 | ||
|
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# cleants | ||
Convert TypeScript to a cleaner JavaScript project | ||
Convert TypeScript to a cleaner JavaScript project |
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,11 @@ | ||
import { defineBuildConfig } from 'unbuild' | ||
|
||
export default defineBuildConfig({ | ||
entries: ['./src/bin', './src/index'], | ||
clean: true, | ||
failOnWarn: false, | ||
rollup: { | ||
emitCJS: true, | ||
inlineDependencies: 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import antfu from '@antfu/eslint-config' | ||
|
||
export default antfu( | ||
{ | ||
typescript: false, | ||
markdown: false, | ||
ignores: [ | ||
'.github', | ||
'.vscode', | ||
'node_modules', | ||
'dist', | ||
], | ||
}, | ||
{ | ||
rules: { | ||
'jsdoc/check-param-names': 'off', | ||
'jsdoc/check-types': 'off', | ||
'jsdoc/require-returns-description': 'off', | ||
|
||
'antfu/consistent-list-newline': 'off', | ||
'antfu/top-level-function': 'off', | ||
|
||
'import/default': 'off', | ||
'import/order': 'off', | ||
|
||
'node/prefer-global/process': 'off', | ||
|
||
'no-console': 'off', | ||
'curly': 'off', | ||
'eqeqeq': 'off', | ||
'no-unused-vars': 'off', | ||
'unused-imports/no-unused-vars': 'off', | ||
'no-debugger': 'off', | ||
'no-restricted-syntax': 'off', | ||
'no-new': 'off', | ||
'prefer-promise-reject-errors': 'off', | ||
'no-unused-expressions': 'off', | ||
'sort-imports': 'off', | ||
|
||
'unicorn/consistent-function-scoping': 'off', | ||
'regexp/no-unused-capturing-group': 'off', | ||
'regexp/no-dupe-disjunctions': 'off', | ||
'perfectionist/sort-imports': 'off', | ||
'antfu/no-top-level-await': 'off', | ||
}, | ||
}, | ||
) |
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,28 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "esnext", | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"jsx": "preserve", | ||
"sourceMap": true, | ||
"resolveJsonModule": true, | ||
"esModuleInterop": true, | ||
"lib": [ | ||
"esnext", | ||
"dom" | ||
], | ||
"baseUrl": ".", | ||
"paths": { | ||
"@/*": [ | ||
"src/*" | ||
] | ||
} | ||
}, | ||
"include": [ | ||
"src" | ||
], | ||
"exclude": [ | ||
"node_modules", | ||
"dist" | ||
] | ||
} |
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,59 @@ | ||
{ | ||
"name": "cleants", | ||
"type": "module", | ||
"version": "0.0.1-0", | ||
"packageManager": "[email protected]", | ||
"description": "Convert TypeScript to a cleaner JavaScript project", | ||
"author": "viarotel", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/viarotel-org/cleants.git" | ||
}, | ||
"keywords": [ | ||
"typescript", | ||
"javascript", | ||
"converter", | ||
"electron", | ||
"vue" | ||
], | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org/", | ||
"access": "public" | ||
}, | ||
"exports": { | ||
".": { | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs" | ||
} | ||
}, | ||
"main": "./dist/index.cjs", | ||
"bin": { | ||
"cleants": "dist/bin.mjs" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix", | ||
"dev": "unbuild && npx .", | ||
"build": "unbuild", | ||
"release": "changelogen --release --prerelease && npm publish && git push --follow-tags", | ||
"prepare": "husky install" | ||
}, | ||
"dependencies": { | ||
"@vue/compiler-sfc": "^3.5.12", | ||
"citty": "^0.1.6", | ||
"fs-extra": "^11.2.0", | ||
"glob": "^11.0.0", | ||
"typescript": "^5.6.3" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^3.7.3", | ||
"changelogen": "^0.5.7", | ||
"eslint": "^9.12.0", | ||
"husky": "^9.1.6", | ||
"unbuild": "latest" | ||
} | ||
} |
Oops, something went wrong.