Skip to content

Commit a200685

Browse files
committed
build:更改配置信息
1 parent a9797e1 commit a200685

Some content is hidden

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

58 files changed

+984
-13040
lines changed

.env.uat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
NODE_ENV = 'production'
2-
BASE_URL = 'https://www.uat.com/'
3-
VUE_APP_MODE = 'uat'
1+
NODE_ENV="production"
2+
VUE_APP_ENV_CONFIG="uat"
3+
VUE_APP_BASE_URL="https://www.uat.com"

.eslintrc.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@ module.exports = {
33
env: {
44
node: true,
55
},
6-
extends: [
7-
"plugin:vue/essential",
8-
"eslint:recommended",
9-
"@vue/prettier",
10-
"plugin:prettier/recommended", // 如果同时使用了eslint和prettier发生冲突了,会关闭掉与prettier有冲突的规则,也就是使用prettier认为对的规则
11-
],
6+
extends: ["plugin:vue/essential", "eslint:recommended", "@vue/prettier"],
127
parserOptions: {
138
parser: "babel-eslint",
149
},
1510
rules: {
1611
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
1712
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
13+
"camelcase": 2, // 除了常量 命名采用骆驼拼写法variableName
14+
"no-cond-assign": 2, // 禁止在条件中使用常量表达式
15+
"no-unused-expressions": 2, // 禁止出现未使用过的表达式
16+
"no-dupe-args": 2, // 禁止 function 定义中出现重名参数
17+
"no-use-before-define": 2, // 禁止在变量定义之前使用它们
18+
"no-unused-vars": 2, // 禁止出现未使用过的变量
19+
"eqeqeq":2 // 要求使用 === 和 !==
1820
},
1921
};

.postcssrc.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
1-
// 也可以是postcss.config.js
21
module.exports = {
2+
plugins: {
3+
autoprefixer: {
4+
overrideBrowserslist: ['Android 4.1', 'iOS 7.1', 'Chrome > 31', 'ff > 31', 'ie >= 8']
5+
},
6+
'postcss-px-to-viewport': {
7+
viewportWidth: 750, // 视窗的宽度,对应的是我们设计稿的宽度,一般是750
8+
unitPrecision: 3, // 小数位
9+
viewportUnit: 'vw',
10+
selectorBlackList: ['.ignore', '.hairlines'],
11+
minPixelValue: 1,
12+
mediaQuery: false
13+
}
14+
}
15+
/*
16+
postcss-pxtorem插件转换rem
317
plugins: {
418
"autoprefixer": {},
519
"postcss-pxtorem": {
@@ -11,4 +25,5 @@ module.exports = {
1125
"exclude": /node_modules/
1226
}
1327
}
28+
*/
1429
}

.stylelintrc.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
extends: [
3+
'stylelint-config-standard',
4+
'stylelint-config-prettier',
5+
6+
],
7+
plugins: ['stylelint-order','stylelint-scss'],
8+
ignoreFiles: ["./README.md","./src/assets/style/reset.css"],
9+
rules: {
10+
"selector-class-pattern": [
11+
"^[a-z]([a-z0-9]){1,8}(-[a-z0-9]+)?((-|--)[a-z0-9]+)?$",
12+
{
13+
"resolveNestedSelectors": true,
14+
"message":"类名格式不对",
15+
}
16+
],
17+
"color-hex-case": "lower",
18+
"selector-max-empty-lines": 1,
19+
"no-descending-specificity": null,
20+
"font-family-no-missing-generic-family-keyword": null,
21+
"value-list-comma-space-after": "always-single-line",
22+
"max-line-length": 80
23+
}
24+
};

0 commit comments

Comments
 (0)