Compare commits
10 Commits
5d01855b12
...
2ec29102f9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ec29102f9 | ||
|
|
b906a152d0 | ||
|
|
ca97ae58ce | ||
|
|
15d551d51f | ||
|
|
f44e7e235e | ||
|
|
e267286df6 | ||
|
|
92f001a13f | ||
|
|
942c5851a9 | ||
|
|
6c16c998de | ||
|
|
d3cd3665f5 |
|
|
@ -1,6 +1,6 @@
|
|||
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]
|
||||
charset = utf-8
|
||||
indent_size = 2
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
|
|
|||
2
.vscode/extensions.json
vendored
2
.vscode/extensions.json
vendored
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"recommendations": ["prettier.prettier-vscode", "dbaeumer.vscode-eslint", "vue.volar"],
|
||||
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "vue.volar"],
|
||||
"unwantedRecommendations": ["octref.vetur"]
|
||||
}
|
||||
|
|
|
|||
16
.vscode/settings.json
vendored
16
.vscode/settings.json
vendored
|
|
@ -1,31 +1,31 @@
|
|||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode",
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSaveMode": "file",
|
||||
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[css]": {
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
|
||||
"explorer.fileNesting.enabled": true,
|
||||
"explorer.fileNesting.expand": true,
|
||||
"explorer.fileNesting.patterns": {
|
||||
"package.json": "package-lock.json, tsconfig.json, tsconfig.app.json, tsconfig.node.json, .prettierrc.json, .prettierignore, eslint.config.js",
|
||||
"package.json": "package-lock.json, tsconfig.json, tsconfig.app.json, tsconfig.node.json, .prettierrc.json, .prettierignore, eslint.config.js, .editorconfig",
|
||||
".gitignore": ".gitattributes"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import pluginVue from "eslint-plugin-vue";
|
|||
import prettier from "eslint-plugin-prettier/recommended";
|
||||
import vueConfigTypescript from "@vue/eslint-config-typescript";
|
||||
import vueConfigPrettier from "@vue/eslint-config-prettier";
|
||||
import localPlugin from "./eslint/eslint-pinia-plugin-local.cjs";
|
||||
import dolphinEslint from "dolphin-components/eslint";
|
||||
|
||||
/** @type {import('eslint').Linter.Config[]} */
|
||||
export default [
|
||||
|
|
@ -18,6 +18,10 @@ export default [
|
|||
},
|
||||
},
|
||||
},
|
||||
|
||||
//Dolphin Component
|
||||
dolphinEslint.configs.recommended,
|
||||
|
||||
// js
|
||||
pluginJs.configs.recommended,
|
||||
{
|
||||
|
|
@ -26,6 +30,7 @@ export default [
|
|||
"no-undef": "error",
|
||||
},
|
||||
},
|
||||
|
||||
// ts
|
||||
...tseslint.configs.recommended,
|
||||
{
|
||||
|
|
@ -40,6 +45,7 @@ export default [
|
|||
"@typescript-eslint/no-explicit-any": "off",
|
||||
},
|
||||
},
|
||||
|
||||
// vue
|
||||
...pluginVue.configs["flat/recommended"],
|
||||
{
|
||||
|
|
@ -76,6 +82,7 @@ export default [
|
|||
{
|
||||
ignores: ["node_modules", ".nuxt", ".output", "dist"],
|
||||
},
|
||||
|
||||
// prettier
|
||||
prettier,
|
||||
{
|
||||
|
|
@ -83,13 +90,4 @@ export default [
|
|||
"prettier/prettier": ["warn", { singleQuote: false }],
|
||||
},
|
||||
},
|
||||
// pinia
|
||||
{
|
||||
plugins: {
|
||||
local: localPlugin,
|
||||
},
|
||||
rules: {
|
||||
"local/no-duplicate-pinia-store-ids": "error",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
const noDuplicatePiniaStoreIds = require("./eslint-pinia.cjs");
|
||||
|
||||
module.exports = {
|
||||
rules: {
|
||||
"no-duplicate-pinia-store-ids": noDuplicatePiniaStoreIds,
|
||||
},
|
||||
};
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
const storeIds = new Map();
|
||||
|
||||
module.exports = {
|
||||
meta: {
|
||||
type: "problem",
|
||||
docs: {
|
||||
description: "Disallow duplicate Pinia defineStore ids",
|
||||
},
|
||||
schema: [],
|
||||
messages: {
|
||||
duplicate: "Pinia store id '{{id}}' is already defined in {{file}}.",
|
||||
},
|
||||
},
|
||||
|
||||
create(context) {
|
||||
const filename = context.getFilename();
|
||||
|
||||
function reportIfDuplicate(id, node) {
|
||||
const existingFile = storeIds.get(id);
|
||||
|
||||
if (existingFile === filename) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (existingFile) {
|
||||
context.report({
|
||||
node,
|
||||
messageId: "duplicate",
|
||||
data: {
|
||||
id,
|
||||
file: existingFile,
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
storeIds.set(id, filename);
|
||||
}
|
||||
|
||||
return {
|
||||
CallExpression(node) {
|
||||
if (
|
||||
node.callee.type === "Identifier" &&
|
||||
node.callee.name === "defineStore" &&
|
||||
node.arguments.length > 0
|
||||
) {
|
||||
const firstArg = node.arguments[0];
|
||||
|
||||
if (firstArg.type === "Literal" && typeof firstArg.value === "string") {
|
||||
reportIfDuplicate(firstArg.value, firstArg);
|
||||
}
|
||||
|
||||
if (firstArg.type === "ObjectExpression") {
|
||||
const idProp = firstArg.properties.find(
|
||||
(p) =>
|
||||
p.type === "Property" &&
|
||||
p.key.type === "Identifier" &&
|
||||
p.key.name === "id" &&
|
||||
p.value.type === "Literal" &&
|
||||
typeof p.value.value === "string"
|
||||
);
|
||||
|
||||
if (idProp) {
|
||||
reportIfDuplicate(idProp.value.value, idProp.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
5856
package-lock.json
generated
5856
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
|
|
@ -19,20 +19,20 @@
|
|||
"lint:fix": "eslint src --fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.13.2",
|
||||
"dolphin-components": "^3.1.2",
|
||||
"axios": "^1.13.4",
|
||||
"dolphin-components": "^3.1.6",
|
||||
"echarts": "^6.0.0",
|
||||
"nepali-date-library": "^1.1.12",
|
||||
"pinia": "^3.0.4",
|
||||
"typescript-eslint": "^8.53.0",
|
||||
"typescript-eslint": "^8.54.0",
|
||||
"vue": "^3.5.27",
|
||||
"vue-echarts": "^8.0.1",
|
||||
"vue-router": "^4.6.4"
|
||||
"vue-router": "^5.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tsconfig/node24": "^24.0.4",
|
||||
"@types/node": "^25.0.9",
|
||||
"@vitejs/plugin-vue": "^6.0.3",
|
||||
"@types/node": "^25.2.0",
|
||||
"@vitejs/plugin-vue": "^6.0.4",
|
||||
"@vue/eslint-config-prettier": "^10.2.0",
|
||||
"@vue/eslint-config-typescript": "^14.6.0",
|
||||
"@vue/tsconfig": "^0.8.1",
|
||||
|
|
@ -40,10 +40,10 @@
|
|||
"eslint-plugin-vue": "~10.7.0",
|
||||
"jiti": "^2.6.1",
|
||||
"npm-run-all2": "^8.0.4",
|
||||
"prettier": "3.8.0",
|
||||
"prettier": "3.8.1",
|
||||
"typescript": "~5.9.3",
|
||||
"vite": "^7.3.1",
|
||||
"vite-plugin-vue-devtools": "^8.0.5",
|
||||
"vue-tsc": "^3.2.2"
|
||||
"vue-tsc": "^3.2.4"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
3927
pnpm-lock.yaml
Normal file
3927
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user