Skip to content

Commit

Permalink
editer config
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiram committed Mar 24, 2024
1 parent 9d5a8be commit e17ab1a
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ out
thumbnail
.DS_Store
*.log*

# lock文件
yarn.lock
package-lock.json
pnpm-lock.yaml
30 changes: 25 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@
"homepage": "https://github.com/Hiram-Wong/ZyPlayer",
"scripts": {
"format": "prettier --write .",
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts,.vue --fix",
"lint": "eslint --ext .vue,.js,.jsx,.ts,.tsx ./ --max-warnings 0",
"lint:fix": "eslint --ext .vue,.js,jsx,.ts,.tsx ./ --max-warnings 0 --fix",
"stylelint": "stylelint src/**/*.{html,vue,sass,less}",
"stylelint:fix": "stylelint --fix src/**/*.{html,vue,css,sass,less}",
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
"typecheck:web": "vue-tsc --noEmit -p tsconfig.web.json --composite false",
"typecheck": "npm run typecheck:node && npm run typecheck:web",
"start": "electron-vite preview",
"dev": "electron-vite dev",
"build": " electron-vite build",
"postinstall": "electron-builder install-app-deps",
"build:web": "npm run build",
"build:unpack": "npm run build && electron-builder --dir",
"build:win": "npm run build && electron-builder --win",
"build:mac": "npm run build && electron-builder --mac",
Expand All @@ -37,10 +41,14 @@
"electron-updater": "^6.1.8",
"fastify": "^4.26.2",
"fastify-logger": "^1.0.1",
"hls-parser": "^0.10.9",
"ip": "^2.0.1",
"lodash-id": "^0.14.1",
"node-json-db": "^2.3.0",
"node-rsa": "^1.1.1",
"puppeteer-core": "^22.5.0",
"puppeteer-in-electron": "^3.0.5"
"puppeteer-in-electron": "^3.0.5",
"sync-fetch": "^0.5.2"
},
"devDependencies": {
"@electron-toolkit/eslint-config": "^1.0.2",
Expand Down Expand Up @@ -88,18 +96,21 @@
"public-ip": "^6.0.2",
"qrcode.vue": "^3.4.1",
"qs": "^6.12.0",
"sync-request": "^6.1.0",
"stylelint": "~16.2.1",
"stylelint-config-standard": "^36.0.0",
"stylelint-order": "~6.0.4",
"tdesign-icons-vue-next": "^0.2.2",
"tdesign-vue-next": "^1.9.0",
"terser": "^5.29.2",
"typescript": "^5.4.2",
"unplugin-auto-import": "^0.17.5",
"unplugin-vue-components": "^0.26.0",
"url": "^0.11.3",
"uuid-by-string": "^4.0.0",
"v3-infinite-loading": "^1.3.1",
"vite": "^5.1.6",
"vite": "^5.2.4",
"vite-svg-loader": "^5.1.0",
"vue": "~3.3.8",
"vue": "^3.4.21",
"vue-i18n": "^9.10.2",
"vue-router": "^4.3.0",
"vue-tsc": "^2.0.6",
Expand All @@ -110,6 +121,15 @@
"xgplayer-mp4": "^3.0.14",
"xpath": "^0.0.34"
},
"lint-staged": {
"*.{js,jsx,vue,ts,tsx}": [
"prettier --write",
"npm run lint:fix"
],
"*.{html,vue,css,sass,less}": [
"npm run stylelint:fix"
]
},
"engines": {
"node": ">=18.18.0"
}
Expand Down
28 changes: 28 additions & 0 deletions stylelint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export default {
defaultSeverity: 'error',
extends: ['stylelint-config-standard'],
rules: {
'no-descending-specificity': null,
'import-notation': 'string',
'no-empty-source': null,
'custom-property-pattern': null,
'selector-class-pattern': null,
'selector-pseudo-class-no-unknown': [
true,
{
ignorePseudoClasses: ['deep'],
},
],
'media-query-no-invalid': null, // 官方表示此规则应当仅对于原生CSS启用,对于预处理器(Less)不应启用
},
overrides: [
{
files: ['**/*.html', '**/*.vue'],
customSyntax: 'postcss-html',
},
{
files: ['**/*.less'],
customSyntax: 'postcss-less',
},
],
};

0 comments on commit e17ab1a

Please sign in to comment.