保存进度!
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
|
* @Author: Kane
|
||||||
* @Date: 2023-02-09 15:26:18
|
* @Date: 2023-02-09 15:26:18
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-02-09 18:36:33
|
* @LastEditTime: 2023-02-10 10:25:42
|
||||||
* @FilePath: /后端辅助工具/.eslintrc.js
|
* @FilePath: /后端辅助工具/.eslintrc.js
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
root: true,
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
es2021: true,
|
es2021: true,
|
||||||
|
node: true,
|
||||||
},
|
},
|
||||||
extends: [
|
parser: "@typescript-eslint/parser",
|
||||||
"standard-with-typescript",
|
|
||||||
],
|
|
||||||
overrides: [
|
|
||||||
],
|
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
ecmaVersion: "latest",
|
ecmaVersion: "latest",
|
||||||
sourceType: "module",
|
sourceType: "module",
|
||||||
|
// project: ["./tsconfig.json",],
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
"vue",
|
"@typescript-eslint",
|
||||||
|
],
|
||||||
|
extends: [
|
||||||
|
// "standard-with-typescript",
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
|
"no-console": "warn",
|
||||||
"quote-props": ["warn", "as-needed",],
|
"quote-props": ["warn", "as-needed",],
|
||||||
quotes: ["warn", "double", { allowTemplateLiterals: true, },],
|
quotes: ["warn", "double", { allowTemplateLiterals: true, },],
|
||||||
indent: ["warn", 4,],
|
indent: ["warn", 4,],
|
||||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
"no-unused-vars": "off",
|
||||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
||||||
"no-unused-vars": "warn",
|
|
||||||
semi: ["error", "always",], // 控制行尾部分号
|
semi: ["error", "always",], // 控制行尾部分号
|
||||||
"comma-dangle": ["error", {
|
"comma-dangle": ["error", {
|
||||||
arrays: "always",
|
arrays: "always",
|
||||||
@ -48,5 +53,6 @@ module.exports = {
|
|||||||
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
||||||
// "comma-spacing": ["error", { "before": false, "after": true, },],
|
// "comma-spacing": ["error", { "before": false, "after": true, },],
|
||||||
"brace-style": ["error", "allman", { allowSingleLine: 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,
|
spring = 1,
|
||||||
summer,
|
summer,
|
||||||
autumn,
|
autumn,
|
||||||
winter,
|
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!";
|
var greetings = "Hello, World!";
|
||||||
console.log(greetings);
|
// console.log( greetings );
|
||||||
var Season;
|
var Season;
|
||||||
(function (Season) {
|
(function (Season) {
|
||||||
Season[Season["spring"] = 1] = "spring";
|
Season[Season["spring"] = 1] = "spring";
|
||||||
@ -8,5 +8,17 @@ var Season;
|
|||||||
Season[Season["winter"] = 4] = "winter";
|
Season[Season["winter"] = 4] = "winter";
|
||||||
})(Season || (Season = {}));
|
})(Season || (Season = {}));
|
||||||
;
|
;
|
||||||
|
var ar = [
|
||||||
|
"1", "2",
|
||||||
|
];
|
||||||
|
var ar2 = [
|
||||||
|
1, 2, 3, "4",
|
||||||
|
];
|
||||||
|
var ar3 = [1, 2, 3, 4, 5, "7",];
|
||||||
var today = Season.spring;
|
var today = Season.spring;
|
||||||
|
function ts() {
|
||||||
|
var message = "message";
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
ts();
|
||||||
console.log(today);
|
console.log(today);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-02-09 15:24:20
|
* @Date: 2023-02-09 15:24:20
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-02-09 15:29:03
|
* @LastEditTime: 2023-02-10 10:16:40
|
||||||
* @FilePath: /后端辅助工具/tsconfig.json
|
* @FilePath: /后端辅助工具/tsconfig.json
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
@ -15,10 +15,13 @@
|
|||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
},
|
},
|
||||||
// "files": [
|
// "files": [
|
||||||
// "./src/**/*"
|
// "./src/main.ts",
|
||||||
// ],
|
// ],
|
||||||
"include": [
|
"include": [
|
||||||
"./src/**/*"
|
"./src/**/*.ts",
|
||||||
|
// "./src/*.ts",
|
||||||
|
// "src/main.ts",
|
||||||
|
// ".eslintrc.js",
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"./target"
|
"./target"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user