Skip to content

Commit

Permalink
Освежил (#16)
Browse files Browse the repository at this point in the history
## Изменения
Обновил зависимости и GitHub flows и провел крошечный рефакторинг

## Детали реализации
<!-- Здесь можно описать технические детали по пунктам. -->

## Check-List
<!-- После сохранения у следующих полей появятся галочки, которые нужно
проставить мышкой -->
- [ ] Вы проверили свой код перед отправкой запроса?
- [ ] Вы написали тесты к реализованным функциям?
- [ ] Вы не забыли применить форматирование `black` и `isort` для
_Back-End_ или `Prettier` для _Front-End_?

---------

Co-authored-by: Artem Netsvetaev <[email protected]>
  • Loading branch information
physphile and fizfakovets authored Nov 16, 2024
1 parent 672b3be commit f5326f3
Show file tree
Hide file tree
Showing 21 changed files with 1,695 additions and 2,133 deletions.
7 changes: 0 additions & 7 deletions .eslintrc.yml

This file was deleted.

16 changes: 8 additions & 8 deletions .github/workflows/main_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 7.26.3
version: 9

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: 22
cache: 'pnpm'

- name: Install
Expand All @@ -40,13 +40,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 7.26.3
version: 9

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: 22
cache: 'pnpm'

- name: Install
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/pr_create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 7.26.3
version: 9

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: 22
cache: 'pnpm'

- name: Install
Expand All @@ -38,13 +38,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 7.26.3
version: 9

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: 22
cache: 'pnpm'

- name: Install
Expand Down
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.github/
deployment/
dist/
node_modules/
pnpm-lock.yaml
.vite
package.json
bun.lockb
10 changes: 10 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"trailingComma": "es5",
"arrowParens": "avoid",
"bracketSpacing": true,
"useTabs": true,
"singleQuote": true,
"printWidth": 100,
"semi": true,
"endOfLine": "auto"
}
8 changes: 0 additions & 8 deletions .prettierrc.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
node_modules
.vite
10 changes: 10 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": ["stylelint-config-standard", "stylelint-config-recommended-vue"],
"rules": {
"function-disallowed-list": ["rgba", "hsla", "hsl"],
"color-function-notation": "modern",
"color-no-hex": null,
"selector-nested-pattern": "^&",
"selector-class-pattern": null
}
}
6 changes: 0 additions & 6 deletions .stylelintrc.yml

This file was deleted.

41 changes: 41 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import globals from 'globals';
import pluginVue from 'eslint-plugin-vue';
import vueTsEslintConfig from '@vue/eslint-config-typescript';
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';

export default [
...tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended),
...pluginVue.configs['flat/recommended'],
...vueTsEslintConfig(),
eslintPluginPrettierRecommended,
{
languageOptions: {
globals: {
...globals.node,
},

ecmaVersion: 2020,
sourceType: 'module',
},

rules: {
'no-duplicate-imports': 'error',

'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'always',
component: 'always',
},

svg: 'always',
math: 'always',
},
],
},
},
];
8 changes: 4 additions & 4 deletions frontend.code-workspace
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"folders": [
{
"path": "."
}
"path": ".",
},
],
"extensions": {
"recommendations": [
Expand Down Expand Up @@ -72,7 +72,7 @@
"css.validate": false,
"git.openRepositoryInParentFolders": "always",
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
},
}
50 changes: 28 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,39 @@
"dev": "vite --host",
"build": "vue-tsc && vite build",
"preview": "vite preview",
"lint": "eslint --ext .ts,.vue . --fix",
"format": "prettier . --write",
"stylelint": "stylelint \"**/*.{vue,css}\" --fix",
"test": "echo kek"
"lint": "eslint \"**/*.{vue,ts}\"",
"lint:fix": "eslint \"**/*.{vue,ts}\" --fix",
"prettier": "prettier . --check",
"prettier:write": "prettier . --write",
"stylelint": "stylelint \"**/*.{vue,css}\"",
"stylelint:fix": "stylelint \"**/*.{vue,css}\" --fix",
"format": "pnpm run lint:fix && pnpm run prettier:write && pnpm run stylelint:fix",
"check": "vue-tsc && pnpm run lint && pnpm run prettier && pnpm run stylelint",
"test": "echo success"
},
"dependencies": {
"@mdi/font": "^7.4.47",
"pinia": "^2.1.7",
"vue": "^3.3.6",
"vue-router": "^4.2.5"
"pinia": "^2.2.6",
"vue": "^3.5.13",
"vue-router": "^4.4.5"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.4.0",
"@vue/eslint-config-typescript": "^12.0.0",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-vue": "^9.17.0",
"postcss-preset-env": "^9.2.0",
"prettier": "^3.0.3",
"stylelint": "^15.11.0",
"@vitejs/plugin-vue": "^5.2.0",
"@vue/eslint-config-typescript": "^14.1.3",
"eslint": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-vue": "^9.31.0",
"globals": "^15.12.0",
"postcss-preset-env": "^10.1.0",
"prettier": "^3.3.3",
"stylelint": "^16.10.0",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard": "^34.0.0",
"typescript": "^5.2.2",
"vite": "^5.3.4",
"vite-plugin-vuetify": "^1.0.2",
"vue-tsc": "^2.0.28",
"vuetify": "^3.3.22"
"stylelint-config-standard": "^36.0.1",
"typescript": "^5.6.3",
"vite": "^5.4.11",
"vite-plugin-vuetify": "^2.0.4",
"vue-tsc": "^2.1.10",
"vuetify": "^3.7.4"
}
}
Loading

0 comments on commit f5326f3

Please sign in to comment.