Skip to content

Commit

Permalink
feat: apply personal changes
Browse files Browse the repository at this point in the history
  • Loading branch information
williamc committed Dec 4, 2023
1 parent f30e275 commit e3dba16
Show file tree
Hide file tree
Showing 15 changed files with 264 additions and 236 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_size = 4
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

71 changes: 36 additions & 35 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
{
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,

// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "never"
},
// 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": "*-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" }
],
// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "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"
]
// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml"
],
"references.preferredLocation": "peek"
}
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Anthony Fu <https://github.com/antfu>
Copyright (c) 2023 DevilTea

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,11 @@
_description_

> **Note**:
> Replace `pkg-placeholder`, `_description_` and `antfu` globally to use this template.
## Sponsors

<p align="center">
<a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg">
<img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/>
</a>
</p>
> Replace `pkg-placeholder`, `_description_` and `deviltea` globally to use this template.
## License

[MIT](./LICENSE) License © 2023-PRESENT [Anthony Fu](https://github.com/antfu)
[MIT](./LICENSE) License © 2023-PRESENT [DevilTea](https://github.com/DevilTea)


<!-- Badges -->
Expand Down
16 changes: 8 additions & 8 deletions build.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { defineBuildConfig } from 'unbuild'

export default defineBuildConfig({
entries: [
'src/index',
],
declaration: true,
clean: true,
rollup: {
emitCJS: true,
},
entries: [
'src/index',
],
declaration: true,
clean: true,
rollup: {
emitCJS: true,
},
})
24 changes: 12 additions & 12 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// @ts-check
import antfu from '@antfu/eslint-config'
import deviltea from '@deviltea/eslint-config'

export default antfu(
{
ignores: [
// eslint ignore globs here
],
},
{
rules: {
// overrides
},
},
export default deviltea(
{
ignores: [
// eslint ignore globs here
],
},
{
rules: {
// overrides
},
},
)
146 changes: 75 additions & 71 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,73 +1,77 @@
{
"name": "pkg-placeholder",
"type": "module",
"version": "0.0.0",
"packageManager": "[email protected]",
"description": "_description_",
"author": "Anthony Fu <[email protected]>",
"license": "MIT",
"funding": "https://github.com/sponsors/antfu",
"homepage": "https://github.com/antfu/pkg-placeholder#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/antfu/pkg-placeholder.git"
},
"bugs": "https://github.com/antfu/pkg-placeholder/issues",
"keywords": [],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"typesVersions": {
"*": {
"*": [
"./dist/*",
"./dist/index.d.ts"
]
}
},
"files": [
"dist"
],
"scripts": {
"build": "unbuild",
"dev": "unbuild --stub",
"lint": "eslint .",
"prepublishOnly": "nr build",
"release": "bumpp && npm publish",
"start": "esno src/index.ts",
"test": "vitest",
"typecheck": "tsc --noEmit",
"prepare": "simple-git-hooks"
},
"devDependencies": {
"@antfu/eslint-config": "^2.1.2",
"@antfu/ni": "^0.21.12",
"@antfu/utils": "^0.7.6",
"@types/node": "^20.10.1",
"bumpp": "^9.2.0",
"eslint": "^8.54.0",
"esno": "^4.0.0",
"lint-staged": "^15.1.0",
"pnpm": "^8.11.0",
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.9.0",
"typescript": "^5.3.2",
"unbuild": "^2.0.0",
"vite": "^5.0.4",
"vitest": "^1.0.0-beta.6"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
},
"lint-staged": {
"*": "eslint --fix"
}
"name": "pkg-placeholder",
"type": "module",
"version": "0.0.0",
"packageManager": "[email protected]",
"description": "_description_",
"author": "DevilTea <[email protected]>",
"license": "MIT",
"homepage": "https://github.com/DevilTea/pkg-placeholder#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/DevilTea/pkg-placeholder.git"
},
"bugs": "https://github.com/DevilTea/pkg-placeholder/issues",
"keywords": [],
"sideEffects": false,
"exports": {
".": {
"types": {
"import": "./dist/index.d.mts",
"require": "./dist/index.d.cts",
"default": "./dist/index.d.ts"
},
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"typesVersions": {
"*": {
"*": [
"./dist/*",
"./dist/index.d.ts"
]
}
},
"files": [
"dist"
],
"scripts": {
"build": "unbuild",
"dev": "unbuild --stub",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"prepublishOnly": "nr build",
"release": "bumpp && npm publish",
"start": "esno src/index.ts",
"test": "vitest",
"typecheck": "tsc --noEmit --project tsconfig.test.json",
"prepare": "simple-git-hooks"
},
"devDependencies": {
"@antfu/ni": "^0.21.12",
"@deviltea/eslint-config": "^3.0.0",
"@deviltea/tsconfig": "^0.0.5",
"@types/node": "^20.10.1",
"bumpp": "^9.2.0",
"eslint": "^8.54.0",
"esno": "^4.0.0",
"lint-staged": "^15.1.0",
"pnpm": "^8.11.0",
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.9.0",
"typescript": "^5.3.2",
"unbuild": "^2.0.0",
"vite": "^5.0.4",
"vitest": "^1.0.0-beta.6"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
},
"lint-staged": {
"*": "eslint --fix"
}
}
Loading

0 comments on commit e3dba16

Please sign in to comment.