添加核心功能模块包括时间工具集、服务器实现和测试 配置项目基础设置如ESLint、Prettier和Vitest 实现时间相关功能包括当前时间、时区信息和日期计算 添加README文档说明项目功能和使用方法
40 lines
835 B
JavaScript
40 lines
835 B
JavaScript
import js from "@eslint/js";
|
|
import globals from "globals";
|
|
|
|
export default [
|
|
{
|
|
files: ["**/*.{js,mjs,cjs}"],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: "module",
|
|
globals: {
|
|
...globals.node,
|
|
...globals.es2022,
|
|
},
|
|
},
|
|
rules: {
|
|
...js.configs.recommended.rules,
|
|
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
|
|
"no-console": "off",
|
|
"prefer-const": "error",
|
|
"no-var": "error",
|
|
},
|
|
},
|
|
{
|
|
files: ["tests/**/*.js"],
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.node,
|
|
...globals.es2022,
|
|
describe: "readonly",
|
|
it: "readonly",
|
|
test: "readonly",
|
|
expect: "readonly",
|
|
beforeEach: "readonly",
|
|
afterEach: "readonly",
|
|
vi: "readonly",
|
|
},
|
|
},
|
|
},
|
|
];
|