加入后端工具项目。

This commit is contained in:
Kane Wang 2023-02-09 18:36:43 +08:00
parent 8e5dc6e617
commit a5fa62c5d0
6 changed files with 140 additions and 0 deletions

View File

@ -0,0 +1,52 @@
/*
* @Author: Kane
* @Date: 2023-02-09 15:26:18
* @LastEditors: Kane
* @LastEditTime: 2023-02-09 18:36:33
* @FilePath: /后端辅助工具/.eslintrc.js
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
"standard-with-typescript",
],
overrides: [
],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: [
"vue",
],
rules: {
"quote-props": ["warn", "as-needed",],
quotes: ["warn", "double", { allowTemplateLiterals: true, },],
indent: ["warn", 4,],
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-unused-vars": "warn",
semi: ["error", "always",], // 控制行尾部分号
"comma-dangle": ["error", {
arrays: "always",
objects: "always",
imports: "never",
exports: "never",
functions: "never",
},], // 数组和对象键值对最后一个逗号
"comma-style": ["error", "last",], // 逗号在行位
"array-bracket-spacing": ["error", "never",],
"no-undef-init": "error",
"no-invalid-this": "error",
"no-use-before-define": "error",
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作比如NaN、Infinity、undefined、eval、arguments等
// "comma-spacing": ["error", { "before": false, "after": true, },],
"brace-style": ["error", "allman", { allowSingleLine: true, },],
},
};

View File

@ -0,0 +1,20 @@
{
// 使 IntelliSense
//
// 访: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${file}",
"outFiles": [
"${workspaceFolder}/**/*.js"
]
}
]
}

View File

@ -0,0 +1,14 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "typescript",
"tsconfig": "tsconfig.json",
"problemMatcher": [
"$tsc"
],
"group": "build",
"label": "tsc: build - tsconfig.json"
}
]
}

View File

@ -0,0 +1,16 @@
const greetings: string = "Hello, World!";
console.log( greetings );
enum Season {
spring = 1,
summer,
autumn,
winter,
};
let today: Season = Season.spring;
console.log( today );

View File

@ -0,0 +1,12 @@
var greetings = "Hello, World!";
console.log(greetings);
var Season;
(function (Season) {
Season[Season["spring"] = 1] = "spring";
Season[Season["summer"] = 2] = "summer";
Season[Season["autumn"] = 3] = "autumn";
Season[Season["winter"] = 4] = "winter";
})(Season || (Season = {}));
;
var today = Season.spring;
console.log(today);

View File

@ -0,0 +1,26 @@
/*
* @Author: Kane
* @Date: 2023-02-09 15:24:20
* @LastEditors: Kane
* @LastEditTime: 2023-02-09 15:29:03
* @FilePath: //tsconfig.json
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
{
"compilerOptions": {
"outDir": "./target",
"strict": false,
"strictNullChecks": true,
},
// "files": [
// "./src/**/*"
// ],
"include": [
"./src/**/*"
],
"exclude": [
"./target"
],
}