Skip to content

Commit

Permalink
style: -
Browse files Browse the repository at this point in the history
  • Loading branch information
jsxiaosi committed Jan 3, 2022
1 parent 316b651 commit a3f57e0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .husky/lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
'*.{js,ts}': ['eslint --fix', 'prettier --write'],
'package.json': ['prettier --write'],
'*.vue': ['eslint --fix', 'prettier --write', 'stylelint --fix'],
'*.scss': ['stylelint --fix', 'prettier --write'],
'*.md': ['prettier --write'],
}
'*.{js,ts,tsx,jsx}': ['eslint --fix', 'prettier --write'],
'package.json': ['prettier --write'],
'*.vue': ['eslint --fix', 'prettier --write', 'stylelint --fix'],
'*.{scss,less,styl,html}': ['stylelint --fix', 'prettier --write'],
'*.md': ['prettier --write'],
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"serve": "vite preview",
"test:gzip": "http-server dist --cors --gzip -c-1",
"test:br": "http-server dist --cors --brotli -c-1",
"lint:eslint": "eslint \"{src,mock}/**/*.{vue,ts,js}\" --fix",
"lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,json,css,scss,vue,ts,tex,jsx,html,md}\"",
"lint:eslint": "eslint \"{src,mock}/**/*.{vue,ts,js,tsx,jsx}\" --fix",
"lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,json,css,scss,vue,ts,tsx,jsx,html,md}\"",
"lint:stylelint": "stylelint --syntax scss \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
"lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js",
"lint:pretty": "pretty-quick --staged",
Expand Down
4 changes: 2 additions & 2 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
plugins: [require('autoprefixer'), require('postcss-import')],
}
plugins: [require('autoprefixer'), require('postcss-import')],
};
6 changes: 6 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
module.exports = {
// 每行最多多少个字符换行
printWidth: 100,
// 使用分号, 默认true
semi: true,
// 是否缩进Vue 文件中的代码<script>和<style>标签
vueIndentScriptAndStyle: true,
// 使用单引号, 默认false(在jsx中配置无效, 默认都是双引号)
singleQuote: true,
// 在对象或数组最后一个元素后面是否加逗号
trailingComma: 'all',
proseWrap: 'never',
// 为 HTML、Vue、Angular 和 Handlebars 指定全局空白敏感度
htmlWhitespaceSensitivity: 'strict',
endOfLine: 'auto',
};

0 comments on commit a3f57e0

Please sign in to comment.