Skip to content

Commit

Permalink
style: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kirklin committed Jul 2, 2024
1 parent 883bddc commit fccf400
Show file tree
Hide file tree
Showing 38 changed files with 721 additions and 861 deletions.
11 changes: 0 additions & 11 deletions .eslintrc

This file was deleted.

28 changes: 14 additions & 14 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand All @@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team.
reported by contacting the project team.
All complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Before submitting the PR, please make sure you do the following:
- Added necessary documentation (if appropriate)
-->

## Proposed changes

<!-- Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. -->
Expand All @@ -27,7 +28,6 @@ _Put an `x` in the boxes that apply_

## Linked Issues


## Further comments

<!-- If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc... -->
50 changes: 35 additions & 15 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,49 @@
{
// 禁用默认的格式化程序,改用ESLint进行格式化
"prettier.enable": false,
"editor.formatOnSave": false,

// 自动修复
"editor.codeActionsOnSave": {
"source.fixAll": false,
"source.fixAll.eslint": true, // this allows ESLint to auto fix on save
"source.organizeImports": false
},
// ESLint config: https://github.com/kirklin/eslint-config
"eslint.codeAction.showDocumentation": {
"enable": true
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
"eslint.quiet": true,

// 在IDE中隐藏样式规则的提示,但仍然自动修复它们
"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" }
],

// 为所有支持的语言启用ESLint
"eslint.validate": [
"javascript",
"typescript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"json5"
],
"prettier.enable": false,
"prettier.printWidth": 200,
"prettier.semi": true,
"prettier.singleQuote": false
"yaml",
"toml",
"xml",
"gql",
"graphql",
"astro",
"css",
"less",
"scss",
"pcss",
"postcss"
]
}
26 changes: 26 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import kirklin from "@kirklin/eslint-config";

export default kirklin({
rules: {
"node/prefer-global/process": "off",
"no-console": "warn",
},
formatters: {
/**
* 格式化CSS、LESS、SCSS文件,以及Vue中的`<style>`块
* 默认情况下使用Prettier
*/
css: true,
/**
* 格式化HTML文件
* 默认情况下使用Prettier
*/
html: true,
/**
* 格式化Markdown文件
* 支持Prettier和dprint
* 默认情况下使用Prettier
*/
markdown: "prettier",
},
});
11 changes: 5 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title></title>
<meta name="description" content="Vite Starter Template By Kirk Lin">
<meta name="description" content="Vite Starter Template By Kirk Lin" />
</head>
<body>
<div id="app">
Expand Down Expand Up @@ -39,7 +39,7 @@
}

.loader:before {
content: '';
content: "";
width: 48px;
height: 5px;
background: #f0808050;
Expand All @@ -51,7 +51,7 @@
}

.loader:after {
content: '';
content: "";
width: 100%;
height: 100%;
background: #f08080;
Expand All @@ -72,7 +72,7 @@
}

50% {
transform: translateY(18px) scale(1, .9) rotate(45deg);
transform: translateY(18px) scale(1, 0.9) rotate(45deg);
border-bottom-right-radius: 40px;
}

Expand All @@ -86,7 +86,6 @@
}

@keyframes shadow324 {

0%,
100% {
transform: scale(1, 1);
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "boot-vant",
"type": "module",
"version": "0.0.1",
"private": true,
"packageManager": "[email protected]",
"type": "module",
"description": "template for Vue3 Vant Mobile",
"keywords": [
"BootVant",
Expand Down Expand Up @@ -69,6 +69,7 @@
"@vue/test-utils": "^2.4.6",
"cross-env": "^7.0.3",
"eslint": "^9.6.0",
"eslint-plugin-format": "^0.1.2",
"husky": "^9.0.11",
"jsdom": "^24.1.0",
"lint-staged": "^15.2.7",
Expand Down
Loading

0 comments on commit fccf400

Please sign in to comment.