Skip to content

Commit

Permalink
chore: stylelint update to V14,and update the stylelint.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
someGenki committed Nov 24, 2021
1 parent 7e140a7 commit a862461
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 191 deletions.
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-yuan-admin",
"version": "0.2.0",
"version": "0.2.1",
"private": true,
"author": "禾几元",
"scripts": {
Expand All @@ -11,28 +11,28 @@
"lint:css": "stylelint **/*.{vue,css,sass,scss} --fix"
},
"dependencies": {
"@vueuse/core": "^6.9.1",
"@vueuse/core": "^7.0.3",
"axios": "^0.24.0",
"echarts": "^5.2.2",
"element-plus": "1.1.0-beta.20",
"js-cookie": "^3.0.1",
"mockjs": "^1.1.0",
"pinia": "^2.0.3",
"pinia": "^2.0.4",
"vue": "^3.2.22",
"vue-router": "^4.0.12"
},
"devDependencies": {
"@vitejs/plugin-vue": "^1.9.4",
"@vitejs/plugin-vue-jsx": "^1.2.0",
"@vitejs/plugin-vue": "^1.10.0",
"@vitejs/plugin-vue-jsx": "^1.3.0",
"@vue/compiler-sfc": "^3.2.22",
"postcss-html": "^1.2.0",
"prettier": "^2.4.1",
"sass": "^1.43.4",
"stylelint": "^13.13.1",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^22.0.0",
"stylelint-config-recess-order": "^2.5.0",
"stylelint-order": "^4.1.0",
"stylelint-scss": "^3.21.0",
"stylelint": "^14.1.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-recess-order": "^3.0.0",
"stylelint-config-recommended-scss": "^5.0.2",
"stylelint-config-recommended-vue": "^1.0.0",
"vite": "^2.6.14",
"vite-plugin-mock": "^2.9.6"
},
Expand Down
2 changes: 1 addition & 1 deletion src/styles/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @param {Number} 行数
*/
@mixin ellipsis($rowCount: 1) {
@if $rowCount <=1 {
@if $rowCount <= 1 {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Expand Down
138 changes: 0 additions & 138 deletions src/styles/bem-support.scss

This file was deleted.

47 changes: 6 additions & 41 deletions stylelint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,19 @@
// vue项目中使用新的单文件组件样式的特性(状态驱动的动态 CSS | v-bind(var) )时,值需要用引号包裹起来,避免被stylelint所格式化
module.exports = {
root: true,
plugins: ['stylelint-order', 'stylelint-scss'],
extends: [
// > 该风格是 Stylelint 的维护者汲取了 GitHub、Google、Airbnb 多家之长生成的一套css风格规则
'stylelint-config-standard',
// 兼容于prettier的规则,避免冲突
'stylelint-config-recommended-scss',
'stylelint-config-recommended-vue',
'stylelint-config-prettier',
// 对css进行排序 https://github.com/stormwarning/stylelint-config-recess-order/blob/main/index.js
// 对css进行排序 https://github.com/stormwarning/stylelint-config-recess-order/blob/main/index.js
'stylelint-config-recess-order',
],
rules: {
'selector-pseudo-class-no-unknown': null,
'selector-pseudo-element-no-unknown': null,
'at-rule-no-unknown': [
true,
{
ignoreAtRules: [
'tailwind',
'return',
'at-root',
'apply',
'variants',
'responsive',
'screen',
'function',
'if',
'else',
'each',
'include',
'mixin',
],
},
],
'at-rule-no-unknown': null,
'no-empty-source': null,
'named-grid-areas-no-invalid': null,
'unicode-bom': 'never',
'no-descending-specificity': null,
'media-feature-name-no-vendor-prefix': true,
'font-family-no-missing-generic-family-keyword': null,
'declaration-colon-space-after': 'always-single-line',
'declaration-colon-space-before': 'never',
// 'declaration-block-trailing-semicolon': 'always',
'rule-empty-line-before': [
'always',
{
ignore: ['after-comment', 'first-nested'],
},
],
'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
'scss/at-import-partial-extension': null,
'scss/at-import-no-partial-leading-underscore': null,
},
ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
}

0 comments on commit a862461

Please sign in to comment.