Skip to content

Format code with prettier #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 55 additions & 55 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
module.exports = {
//root: true 用于指定它是最顶层的配置,即它在任何情况下都会被采用,而不会被继承覆盖
root: true,
//env 指定代码运行的环境
env : {
browser: true,
node : true,
es2021 : true,
es6 : true
},
//extends 指定继承的配置
extends : ["plugin:vue/essential"],
//plugins 指定使用的插件
plugins : ["@typescript-eslint"],
// parserOptions 指定解析器选项
parserOptions: { parser: "babel-eslint" },
plugins : ["vue"],
// rules 指定自定义的规则
rules : {
//自动对齐上下行等号
"key-spacing" : ["error", { beforeColon: false, afterColon: true }],
eqeqeq : "off",
curly : "error",
quotes : ["error", "double"],
"arrow-parens" : 0,
"generator-star-spacing" : 0,
"no-unused-vars" : "warn",
"no-debugger" : process.env.NODE_ENV === "production" ? "error" : "off",
indent : [2, 4, { SwitchCase: 1 }],
"space-before-function-paren": ["error", "never"],
"no-constant-condition" : ["warn"],
"no-empty" : ["off"],
"comma-spacing" : ["error", { after: true }],
"key-spacing" : [
"error",
{
singleLine: {},
multiLine : { align: "colon" }
}
],
"object-curly-newline" : ["error", { multiline: true }],
"array-bracket-newline": ["error", { multiline: true }],
curly : ["error", "all"],
quotes : ["error", "double"],
indent : ["error", "tab"],
"brace-style" : ["error", "stroustrup", { allowSingleLine: false }],
"space-infix-ops" : ["error"],
"comma-dangle" : ["warn", "never"]
},
//overrides 指定某些文件的指定规则 */
overrides: [
{
files: ["*.vue"],
rules: { "vue/multi-word-component-names": 0 }
}
]
//root: true 用于指定它是最顶层的配置,即它在任何情况下都会被采用,而不会被继承覆盖
root: true,
//env 指定代码运行的环境
env: {
browser: true,
node: true,
es2021: true,
es6: true,
},
//extends 指定继承的配置
extends: ["plugin:vue/essential"],
//plugins 指定使用的插件
plugins: ["@typescript-eslint"],
// parserOptions 指定解析器选项
parserOptions: { parser: "babel-eslint" },
plugins: ["vue"],
// rules 指定自定义的规则
rules: {
//自动对齐上下行等号
"key-spacing": ["error", { beforeColon: false, afterColon: true }],
eqeqeq: "off",
curly: "error",
quotes: ["error", "double"],
"arrow-parens": 0,
"generator-star-spacing": 0,
"no-unused-vars": "warn",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
indent: [2, 4, { SwitchCase: 1 }],
"space-before-function-paren": ["error", "never"],
"no-constant-condition": ["warn"],
"no-empty": ["off"],
"comma-spacing": ["error", { after: true }],
"key-spacing": [
"error",
{
singleLine: {},
multiLine: { align: "colon" },
},
],
"object-curly-newline": ["error", { multiline: true }],
"array-bracket-newline": ["error", { multiline: true }],
curly: ["error", "all"],
quotes: ["error", "double"],
indent: ["error", "tab"],
"brace-style": ["error", "stroustrup", { allowSingleLine: false }],
"space-infix-ops": ["error"],
"comma-dangle": ["warn", "never"],
},
//overrides 指定某些文件的指定规则 */
overrides: [
{
files: ["*.vue"],
rules: { "vue/multi-word-component-names": 0 },
},
],
};

/*
Expand Down
126 changes: 45 additions & 81 deletions CHANGELOG.md

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

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

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,35 @@

`STARART-星之往昔` 最开始因为 [@JDSA Ling](https://github.com/LingASDJ)
在 [Rosy-DR-Code-Ling](https://github.com/School-of-Website-Engineering/Rosy-DR-Code-Ling)
项目中了解到“ERR”需要让我们帮忙接管一个文字游戏,也就是海带酒的 `TinyWaste`项目需要优化。我们经过讨论,我们打算参考这个游戏重写一个,并改名为STARART-星之往昔,这个项目也就从这开始了。
项目中了解到“ERR”需要让我们帮忙接管一个文字游戏,也就是海带酒的 `TinyWaste`项目需要优化。我们经过讨论,我们打算参考这个游戏重写一个,并改名为 STARART-星之往昔,这个项目也就从这开始了。

# Git 规范

## Git 分支命名

- `masin`:主分支,负责记录上线版本的迭代,该分支代码与线上代码是完全一致的。
- `develop`:开发分支,该分支记录相对稳定的版本,所有的 feature 分支和 bugfix 分支都从该分支创建。其它分支为短期分支,其完成功能开发之后需要删除
- `feature/*`:特性(功能)分支,用于开发新的功能,不同的功能创建不同的功能分支,功能分支开发完成并自测通过之后,需要合并到 develop 分支,之后删除该分支。
- `bugfix/*`:bug 修复分支,用于修复不紧急的 bug,普通 bug 均需要创建 bugfix 分支开发,开发完成自测没问题后合并到 develop 分支后,删除该分支。
- `release/*`
:发布分支,用于代码上线准备,该分支从 develop 分支创建,创建之后由测试发布到测试环境进行测试,测试过程中发现 bug 需要在该 release 分支上进行 bug 修复,所有 bug 修复完后,上线之前,需要合并该 release 分支到 masin 分支和 develop 分支。
- `hotfix/`\*:紧急 bug 修复分支,该分支只有在紧急情况下使用,从 masin 分支创建,用于紧急修复线上 bug,修复完成后,需要合并该分支到 masin 分支以便上线,同时需要再合并到 develop 分支。
- `masin`:主分支,负责记录上线版本的迭代,该分支代码与线上代码是完全一致的。
- `develop`:开发分支,该分支记录相对稳定的版本,所有的 feature 分支和 bugfix 分支都从该分支创建。其它分支为短期分支,其完成功能开发之后需要删除
- `feature/*`:特性(功能)分支,用于开发新的功能,不同的功能创建不同的功能分支,功能分支开发完成并自测通过之后,需要合并到 develop 分支,之后删除该分支。
- `bugfix/*`:bug 修复分支,用于修复不紧急的 bug,普通 bug 均需要创建 bugfix 分支开发,开发完成自测没问题后合并到 develop 分支后,删除该分支。
- `release/*`
:发布分支,用于代码上线准备,该分支从 develop 分支创建,创建之后由测试发布到测试环境进行测试,测试过程中发现 bug 需要在该 release 分支上进行 bug 修复,所有 bug 修复完后,上线之前,需要合并该 release 分支到 masin 分支和 develop 分支。
- `hotfix/`\*:紧急 bug 修复分支,该分支只有在紧急情况下使用,从 masin 分支创建,用于紧急修复线上 bug,修复完成后,需要合并该分支到 masin 分支以便上线,同时需要再合并到 develop 分支。

# Git Commit Message 格式

**type : subject**

## type 提交类型:

- `revert:` 回滚代码
- `feat:` 新特性
- `fix:` 错误修复
- `improvement:` 功能改进
- `docs:` 文档修改
- `perf:`性能修改
- `test:`测试
- `refactor:` 代码重构
- `build:` 其他修改, 比如构建流程, 依赖管理
- `revert:` 回滚代码
- `feat:` 新特性
- `fix:` 错误修复
- `improvement:` 功能改进
- `docs:` 文档修改
- `perf:`性能修改
- `test:`测试
- `refactor:` 代码重构
- `build:` 其他修改, 比如构建流程, 依赖管理

## subject 提交描述

Expand All @@ -67,11 +67,11 @@

## 相关仓库

- [Rosy-DR-Code-Ling](https://github.com/School-of-Website-Engineering/Rosy-DR-Code-Ling) — 💌 Rosy-DR-Code-Ling 的 Web 页面
- [E-commerce](https://github.com/Galaxy-Wish-Star/E-commerce) — 助农电商项目-Vue
- [Magic-Ling-Pixel-Dungeon](https://github.com/AnsdoShip/Magic-Ling-Pixel-Dungeon) — 魔绫像素地牢
- [SkyHell](https://github.com/LingASDJ/SkyHell) — 天狱之境-TR
- [StarRiver](https://github.com/LingASDJ/StarRiver-EndlessJourney-RW-MODS) — 星河征途-铁锈战争
- [Rosy-DR-Code-Ling](https://github.com/School-of-Website-Engineering/Rosy-DR-Code-Ling) — 💌 Rosy-DR-Code-Ling 的 Web 页面
- [E-commerce](https://github.com/Galaxy-Wish-Star/E-commerce) — 助农电商项目-Vue
- [Magic-Ling-Pixel-Dungeon](https://github.com/AnsdoShip/Magic-Ling-Pixel-Dungeon) — 魔绫像素地牢
- [SkyHell](https://github.com/LingASDJ/SkyHell) — 天狱之境-TR
- [StarRiver](https://github.com/LingASDJ/StarRiver-EndlessJourney-RW-MODS) — 星河征途-铁锈战争

## 维护者

Expand Down
22 changes: 11 additions & 11 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const prodPlugins
= process.env.NODE_ENV === "production" ? ["transform-remove-console"] : [];
const prodPlugins =
process.env.NODE_ENV === "production" ? ["transform-remove-console"] : [];

module.exports = {
presets: ["@vue/cli-plugin-babel/preset"],
plugins: [
...prodPlugins,
[
"import",
{ libraryName: "vant", libraryDirectory: "es", style: true },
"vant"
]
]
presets: ["@vue/cli-plugin-babel/preset"],
plugins: [
...prodPlugins,
[
"import",
{ libraryName: "vant", libraryDirectory: "es", style: true },
"vant",
],
],
};
11 changes: 2 additions & 9 deletions jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,8 @@
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
"@/*": ["src/*"]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
}
}
18 changes: 9 additions & 9 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// postcss.config.js
module.exports = {
plugins: {
"postcss-px2vp": {
viewportWidth(rule) {
const file = rule.source?.input.file;
return file?.includes("vant") ? 375 : 750;
},
propList: ["*", "!font*", "!line-height", "!letter-spacing"]
}
}
plugins: {
"postcss-px2vp": {
viewportWidth(rule) {
const file = rule.source?.input.file;
return file?.includes("vant") ? 375 : 750;
},
propList: ["*", "!font*", "!line-height", "!letter-spacing"],
},
},
};
Loading