保存进度!
This commit is contained in:
parent
a5fa62c5d0
commit
e142a2a624
4
code/ts/后端辅助工具/.eslintignore
Normal file
4
code/ts/后端辅助工具/.eslintignore
Normal file
@ -0,0 +1,4 @@
|
||||
node_modules
|
||||
dist
|
||||
target
|
||||
tsconfig.json
|
@ -2,36 +2,41 @@
|
||||
* @Author: Kane
|
||||
* @Date: 2023-02-09 15:26:18
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-02-09 18:36:33
|
||||
* @LastEditTime: 2023-02-10 10:25:42
|
||||
* @FilePath: /后端辅助工具/.eslintrc.js
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
browser: true,
|
||||
es2021: true,
|
||||
node: true,
|
||||
},
|
||||
extends: [
|
||||
"standard-with-typescript",
|
||||
],
|
||||
overrides: [
|
||||
],
|
||||
parser: "@typescript-eslint/parser",
|
||||
parserOptions: {
|
||||
ecmaVersion: "latest",
|
||||
sourceType: "module",
|
||||
// project: ["./tsconfig.json",],
|
||||
tsconfigRootDir: __dirname,
|
||||
},
|
||||
plugins: [
|
||||
"vue",
|
||||
"@typescript-eslint",
|
||||
],
|
||||
extends: [
|
||||
// "standard-with-typescript",
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
],
|
||||
rules: {
|
||||
"no-console": "warn",
|
||||
"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",
|
||||
"no-unused-vars": "off",
|
||||
semi: ["error", "always",], // 控制行尾部分号
|
||||
"comma-dangle": ["error", {
|
||||
arrays: "always",
|
||||
@ -48,5 +53,6 @@ module.exports = {
|
||||
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
||||
// "comma-spacing": ["error", { "before": false, "after": true, },],
|
||||
"brace-style": ["error", "allman", { allowSingleLine: true, },],
|
||||
"@typescript-eslint/no-extra-semi": "off",
|
||||
},
|
||||
};
|
||||
|
1449
code/ts/后端辅助工具/package-lock.json
generated
Normal file
1449
code/ts/后端辅助工具/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
7
code/ts/后端辅助工具/package.json
Normal file
7
code/ts/后端辅助工具/package.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.51.0",
|
||||
"@typescript-eslint/parser": "^5.51.0",
|
||||
"eslint": "^8.33.0"
|
||||
}
|
||||
}
|
18
code/ts/后端辅助工具/src/DataType/DataType.ts
Normal file
18
code/ts/后端辅助工具/src/DataType/DataType.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2023-02-10 15:08:53
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-02-10 15:15:41
|
||||
* @FilePath: /后端辅助工具/src/DataType/DataType.ts
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
/* eslint */
|
||||
|
||||
|
||||
//Tuple
|
||||
const tu: readonly [number, number, number] = [1, 1, 2,];
|
||||
|
||||
const toArray: [number, number, string] = [1, 2, "3",];
|
||||
const v1: (number | string)[] = toArray;
|
@ -1,16 +1,36 @@
|
||||
|
||||
const greetings: string = "Hello, World!";
|
||||
const greetings = "Hello, World!";
|
||||
|
||||
console.log( greetings );
|
||||
// console.log( greetings );
|
||||
|
||||
enum Season {
|
||||
enum Season
|
||||
{
|
||||
spring = 1,
|
||||
summer,
|
||||
autumn,
|
||||
winter,
|
||||
};
|
||||
|
||||
let today: Season = Season.spring;
|
||||
const ar: string[] = [
|
||||
"1", "2",
|
||||
];
|
||||
|
||||
console.log( today );
|
||||
const ar2: (string | number)[] = [
|
||||
1, 2, 3, "4",
|
||||
];
|
||||
|
||||
const ar3: readonly (string | number)[] = [1, 2, 3, 4, 5, "7",];
|
||||
|
||||
const today = Season.spring;
|
||||
|
||||
function ts(): string
|
||||
{
|
||||
const message = "message";
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
ts();
|
||||
|
||||
console.log(today);
|
||||
|
||||
|
15
code/ts/后端辅助工具/target/DataType/DataType.js
Normal file
15
code/ts/后端辅助工具/target/DataType/DataType.js
Normal file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2023-02-10 15:08:53
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-02-10 15:15:41
|
||||
* @FilePath: /后端辅助工具/src/DataType/DataType.ts
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
/* eslint */
|
||||
//Tuple
|
||||
var tu = [1, 1, 2,];
|
||||
var toArray = [1, 2, "3",];
|
||||
var v1 = toArray;
|
@ -1,5 +1,5 @@
|
||||
var greetings = "Hello, World!";
|
||||
console.log(greetings);
|
||||
// console.log( greetings );
|
||||
var Season;
|
||||
(function (Season) {
|
||||
Season[Season["spring"] = 1] = "spring";
|
||||
@ -8,5 +8,17 @@ var Season;
|
||||
Season[Season["winter"] = 4] = "winter";
|
||||
})(Season || (Season = {}));
|
||||
;
|
||||
var ar = [
|
||||
"1", "2",
|
||||
];
|
||||
var ar2 = [
|
||||
1, 2, 3, "4",
|
||||
];
|
||||
var ar3 = [1, 2, 3, 4, 5, "7",];
|
||||
var today = Season.spring;
|
||||
function ts() {
|
||||
var message = "message";
|
||||
return message;
|
||||
}
|
||||
ts();
|
||||
console.log(today);
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: Kane
|
||||
* @Date: 2023-02-09 15:24:20
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-02-09 15:29:03
|
||||
* @LastEditTime: 2023-02-10 10:16:40
|
||||
* @FilePath: /后端辅助工具/tsconfig.json
|
||||
* @Description:
|
||||
*
|
||||
@ -15,10 +15,13 @@
|
||||
"strictNullChecks": true,
|
||||
},
|
||||
// "files": [
|
||||
// "./src/**/*"
|
||||
// "./src/main.ts",
|
||||
// ],
|
||||
"include": [
|
||||
"./src/**/*"
|
||||
"./src/**/*.ts",
|
||||
// "./src/*.ts",
|
||||
// "src/main.ts",
|
||||
// ".eslintrc.js",
|
||||
],
|
||||
"exclude": [
|
||||
"./target"
|
||||
|
Loading…
x
Reference in New Issue
Block a user