Skip to content

Commit 99f750d

Browse files
committed
chore: minor changes
1 parent f6257c1 commit 99f750d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2764
-10787
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ logs
2424
!.env.example
2525

2626

27-
!.vscode
27+
!.vscode/blog.code-workspace

.lintstagedrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

.vscode/blog.code-workspace

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"folders": [
3+
{
4+
"name": "root",
5+
"path": "..",
6+
},
7+
{
8+
"name": "frontend",
9+
"path": "../packages/app",
10+
},
11+
{
12+
"name": "backend",
13+
"path": "../packages/backend",
14+
},
15+
],
16+
"settings": {
17+
"cSpell.words": ["changefreq", "https", "petdex"],
18+
"css.lint.unknownAtRules": "ignore",
19+
"editor.codeActionsOnSave": {
20+
"source.fixAll.eslint": "explicit",
21+
},
22+
"editor.formatOnSave": true,
23+
"eslint.experimental.useFlatConfig": true,
24+
"eslint.format.enable": true,
25+
"eslint.options": {
26+
"overrideConfigFile": "eslint.config.js",
27+
},
28+
"volar.takeOverMode.extension": "Vue.volar",
29+
"typescript.tsdk": "node_modules\\typescript\\lib",
30+
"[vue]": {
31+
"editor.defaultFormatter": "esbenp.prettier-vscode",
32+
},
33+
},
34+
"extensions": {
35+
"recommendations": [
36+
"dbaeumer.vscode-eslint",
37+
"esbenp.prettier-vscode",
38+
"Vue.volar",
39+
],
40+
"unwantedRecommendations": ["vscode.typescript-language-features"],
41+
},
42+
}

.vscode/extensions.json

-8
This file was deleted.

.vscode/settings.json

-18
This file was deleted.

commitlint.config.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
module.exports = {
2-
extends: ["@commitlint/config-conventional"],
3-
rules: {
4-
"scope-empty": [2, "always"],
5-
},
6-
};
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
rules: {
4+
'scope-empty': [2, 'always'],
5+
'body-empty': [2, 'always'],
6+
'footer-empty': [2, 'always'],
7+
},
8+
};

eslint.config.js

+2-188
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ export default defineFlatConfig([
2222
ignores: [
2323
"node_modules",
2424
"coverage",
25-
".nyc_output",
2625
"dist",
27-
".nuxt",
28-
".output",
2926
"pnpm-lock.yaml",
3027
],
3128
},
@@ -43,52 +40,13 @@ export default defineFlatConfig([
4340
"no-unused-vars": "off",
4441
},
4542
},
46-
// nuxt config eslint
47-
{
48-
files: ["*.ts", "*.tsx", "*.mts", "*.cts", "*.vue"],
49-
rules: {
50-
// The core 'no-unused-vars' rules (in the eslint:recommended ruleset)
51-
"@typescript-eslint/no-unused-vars": "warn",
52-
// does not work with type definitions.
53-
"no-unused-vars": "off",
54-
},
55-
},
56-
{
57-
// Include typescript eslint rules in *.vue files
58-
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslint-recommended.ts
59-
files: ["*.vue"],
60-
rules: {
61-
"constructor-super": "off", // ts(2335) & ts(2377)
62-
"getter-return": "off", // ts(2378)
63-
"no-const-assign": "off", // ts(2588)
64-
"no-dupe-args": "off", // ts(2300)
65-
"no-dupe-class-members": "off", // ts(2393) & ts(2300)
66-
"no-dupe-keys": "off", // ts(1117)
67-
"no-func-assign": "off", // ts(2539)
68-
"no-import-assign": "off", // ts(2539) & ts(2540)
69-
"no-new-symbol": "off", // ts(7009)
70-
"no-obj-calls": "off", // ts(2349)
71-
"no-redeclare": "off", // ts(2451)
72-
"no-setter-return": "off", // ts(2408)
73-
"no-this-before-super": "off", // ts(2376)
74-
"no-undef": "off", // ts(2304)
75-
"no-unreachable": "off", // ts(7027)
76-
"no-unsafe-negation": "off", // ts(2365) & ts(2360) & ts(2358)
77-
"no-var": "warn", // ts transpile let/const to var, so no need for vars any more
78-
"prefer-const": "warn", // ts provides better types with const
79-
"prefer-rest-params": "warn", // ts provides better types with rest args over arguments
80-
"prefer-spread": "warn", // ts transpile spread to apply, so no need for manual apply
81-
"valid-typeof": "off", // ts(2367)
82-
},
83-
},
8443
// typescript eslint rules
8544
{
86-
files: ["**/*.ts", "**/*.vue"],
45+
files: ["**/*.ts"],
8746
languageOptions: {
8847
parser: tsParser,
8948
parserOptions: {
90-
extraFileExtensions: [".vue"],
91-
project: ["./tsconfig.json", "./.nuxt/tsconfig.json"],
49+
project: "./tsconfig.json",
9250
},
9351
},
9452
plugins: {
@@ -200,119 +158,6 @@ export default defineFlatConfig([
200158
"@typescript-eslint/unified-signatures": "warn",
201159
},
202160
},
203-
// vue eslint rules
204-
{
205-
files: ["**/*.vue"],
206-
languageOptions: {
207-
ecmaVersion: 2020,
208-
parser: vueParser,
209-
parserOptions: {
210-
parser: tsParser,
211-
sourceType: "module",
212-
},
213-
sourceType: "module",
214-
},
215-
plugins: { vue },
216-
rules: {
217-
"vue/component-api-style": ["warn"],
218-
"vue/component-name-in-template-casing": ["warn", "pascal-case"],
219-
"vue/component-options-name-casing": ["warn", "kebab-case"],
220-
"vue/custom-event-name-casing": ["warn", "kebab-case"],
221-
"vue/define-emits-declaration": ["warn", "type-based"],
222-
"vue/define-props-declaration": ["warn", "type-based"],
223-
"vue/multi-word-component-names": ["warn"],
224-
"vue/no-arrow-functions-in-watch": ["warn"],
225-
"vue/no-async-in-computed-properties": ["warn"],
226-
"vue/no-child-content": ["warn"],
227-
"vue/no-computed-properties-in-data": ["warn"],
228-
"vue/no-deprecated-data-object-declaration": ["warn"],
229-
"vue/no-deprecated-destroyed-lifecycle": ["warn"],
230-
"vue/no-deprecated-dollar-listeners-api": ["warn"],
231-
"vue/no-deprecated-dollar-scopedslots-api": ["warn"],
232-
"vue/no-deprecated-events-api": ["warn"],
233-
"vue/no-deprecated-filter": ["warn"],
234-
"vue/no-deprecated-functional-template": ["warn"],
235-
"vue/no-deprecated-html-element-is": ["warn"],
236-
"vue/no-deprecated-inline-template": ["warn"],
237-
"vue/no-deprecated-props-default-this": ["warn"],
238-
"vue/no-deprecated-router-link-tag-prop": ["warn"],
239-
"vue/no-deprecated-scope-attribute": ["warn"],
240-
"vue/no-deprecated-slot-attribute": ["warn"],
241-
"vue/no-deprecated-slot-scope-attribute": ["warn"],
242-
"vue/no-deprecated-v-bind-sync": ["warn"],
243-
"vue/no-deprecated-v-is": ["warn"],
244-
"vue/no-deprecated-v-on-native-modifier": ["warn"],
245-
"vue/no-deprecated-v-on-number-modifiers": ["warn"],
246-
"vue/no-deprecated-vue-config-keycodes": ["warn"],
247-
"vue/no-dupe-keys": ["warn"],
248-
"vue/no-dupe-keys": ["warn"],
249-
"vue/no-dupe-v-else-if": ["warn"],
250-
"vue/no-duplicate-attributes": ["warn"],
251-
"vue/no-export-in-script-setup": ["warn"],
252-
"vue/no-expose-after-await": ["warn"],
253-
"vue/no-lifecycle-after-await": ["warn"],
254-
"vue/no-mutating-props": ["warn"],
255-
"vue/no-parsing-error": ["warn"],
256-
"vue/no-ref-as-operand": ["warn"],
257-
"vue/no-required-prop-with-default": ["warn", { autofix: false }],
258-
"vue/no-reserved-component-names": ["warn"],
259-
"vue/no-reserved-keys": ["warn"],
260-
"vue/no-reserved-props": ["warn"],
261-
"vue/no-shared-component-data": ["warn"],
262-
"vue/no-side-effects-in-computed-properties": ["warn"],
263-
"vue/no-template-key": ["warn"],
264-
"vue/no-textarea-mustache": ["warn"],
265-
"vue/no-unused-components": ["warn"],
266-
"vue/no-unused-vars": ["warn"],
267-
"vue/no-use-computed-property-like-method": ["warn"],
268-
"vue/no-use-v-if-with-v-for": ["warn"],
269-
"vue/no-useless-template-attributes": ["warn"],
270-
"vue/no-v-for-template-key-on-child": ["warn"],
271-
"vue/no-v-text-v-html-on-component": ["warn"],
272-
"vue/no-watch-after-await": ["warn"],
273-
"vue/prefer-import-from-vue": ["warn"],
274-
"vue/require-component-is": ["warn"],
275-
"vue/require-component-is": ["warn"],
276-
"vue/require-prop-type-constructor": ["warn"],
277-
"vue/require-render-return": ["warn"],
278-
"vue/require-slots-as-functions": ["warn"],
279-
"vue/require-toggle-inside-transition": ["warn"],
280-
"vue/require-v-for-key": ["warn"],
281-
"vue/require-valid-default-prop": ["warn"],
282-
"vue/return-in-computed-property": ["warn"],
283-
"vue/return-in-emits-validator": ["warn"],
284-
"vue/script-indent": ["warn", 2, { baseIndent: 1 }],
285-
"vue/use-v-on-exact": ["warn"],
286-
"vue/valid-attribute-name": ["warn"],
287-
"vue/valid-define-emits": ["warn"],
288-
"vue/valid-define-props": ["warn"],
289-
"vue/valid-next-tick": ["warn"],
290-
"vue/valid-template-root": ["warn"],
291-
"vue/valid-v-bind": ["warn"],
292-
"vue/valid-v-cloak": ["warn"],
293-
"vue/valid-v-else": ["warn"],
294-
"vue/valid-v-else-if": ["warn"],
295-
"vue/valid-v-for": ["warn"],
296-
"vue/valid-v-html": ["warn"],
297-
"vue/valid-v-if": ["warn"],
298-
"vue/valid-v-is": ["warn"],
299-
"vue/valid-v-memo": ["warn"],
300-
"vue/valid-v-model": ["warn"],
301-
"vue/valid-v-on": ["warn"],
302-
"vue/valid-v-once": ["warn"],
303-
"vue/valid-v-pre": ["warn"],
304-
"vue/valid-v-show": ["warn"],
305-
"vue/valid-v-slot": ["warn"],
306-
"vue/valid-v-text": ["warn"],
307-
},
308-
},
309-
// vue component rules
310-
{
311-
files: ["./components/**/*.vue"],
312-
rules: {
313-
"vue/multi-word-component-names": "warn",
314-
},
315-
},
316161
// global rules
317162
{
318163
files: ["**/*"],
@@ -498,31 +343,13 @@ export default defineFlatConfig([
498343
"write-good-comments/write-good-comments": "warn",
499344
},
500345
settings: {
501-
"import/ignore": ["vue"],
502346
"import/resolver": {
503347
node: {
504348
extensions: [".js", ".jsx", ".ts", ".tsx"],
505349
},
506350
},
507351
},
508352
},
509-
{
510-
files: [
511-
"**/pages/**/*.{js,ts,jsx,tsx,vue}",
512-
"**/layouts/**/*.{js,ts,jsx,tsx,vue}",
513-
"**/app.{js,ts,jsx,tsx,vue}",
514-
"**/error.{js,ts,jsx,tsx,vue}",
515-
"**/components/*/**/*.{js,ts,jsx,tsx,vue}",
516-
],
517-
rules: { "vue/multi-word-component-names": "off" },
518-
},
519-
{
520-
files: [
521-
"**/pages/**/*.{js,ts,jsx,tsx,vue}",
522-
"**/layouts/**/*.{js,ts,jsx,tsx,vue}",
523-
],
524-
rules: { "vue/no-multiple-template-root": "error" },
525-
},
526353
// this is eslint rules for config files
527354
{
528355
files: [
@@ -539,19 +366,6 @@ export default defineFlatConfig([
539366
"@typescript-eslint/no-magic-numbers": "off",
540367
"@typescript-eslint/no-unsafe-assignment": "off",
541368
"@typescript-eslint/no-var-requires": "off",
542-
"perfectionist/sort-array-includes": "off",
543-
"perfectionist/sort-astro-attributes": "off",
544-
"perfectionist/sort-classes": "off",
545-
"perfectionist/sort-enums": "off",
546-
"perfectionist/sort-exports": "off",
547-
"perfectionist/sort-interfaces": "off",
548-
"perfectionist/sort-jsx-props": "off",
549-
"perfectionist/sort-maps": "off",
550-
"perfectionist/sort-named-exports": "off",
551-
"perfectionist/sort-named-imports": "off",
552-
"perfectionist/sort-object-types": "off",
553-
"perfectionist/sort-objects": "off",
554-
"perfectionist/sort-union-types": "off",
555369
},
556370
},
557371
eslintConfigPrettier,

0 commit comments

Comments
 (0)