mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
chore(project): improve prettier format (#3236)
This commit is contained in:
parent
eb932c18c0
commit
2f9cdc74ce
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1,3 +1,4 @@
|
|||||||
|
* text=auto eol=lf
|
||||||
*.ts linguist-detectable=false
|
*.ts linguist-detectable=false
|
||||||
*.css linguist-detectable=false
|
*.css linguist-detectable=false
|
||||||
*.scss linguist-detectable=false
|
*.scss linguist-detectable=false
|
||||||
|
2
.github/azure-pipelines.yml
vendored
2
.github/azure-pipelines.yml
vendored
@ -15,7 +15,7 @@ variables:
|
|||||||
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
|
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- stage: Preview
|
- stage: Preview
|
||||||
jobs:
|
jobs:
|
||||||
- job: Build_Preview
|
- job: Build_Preview
|
||||||
steps:
|
steps:
|
||||||
|
12
.prettierrc
12
.prettierrc
@ -1,8 +1,12 @@
|
|||||||
{
|
{
|
||||||
"printWidth": 80,
|
|
||||||
"tabWidth": 2,
|
|
||||||
"semi": false,
|
"semi": false,
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"endOfLine": "lf",
|
"overrides": [
|
||||||
"trailingComma": "es5"
|
{
|
||||||
|
"files": ".prettierrc",
|
||||||
|
"options": {
|
||||||
|
"parser": "json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
13
package.json
13
package.json
@ -21,9 +21,9 @@
|
|||||||
"build:utils": "cd packages/utils && yarn clean && yarn build",
|
"build:utils": "cd packages/utils && yarn clean && yarn build",
|
||||||
"build:tokens": "cd packages/tokens && yarn clean && yarn build",
|
"build:tokens": "cd packages/tokens && yarn clean && yarn build",
|
||||||
"build:full-bundle": "esno build/full-bundle.ts",
|
"build:full-bundle": "esno build/full-bundle.ts",
|
||||||
"format": "prettier --write '**/*.{vue,js,ts,jsx,tsx,scss,json,yaml,md,html}'",
|
"format": "prettier --write .",
|
||||||
"lint": "eslint ./packages --ext .vue,.js,.ts,.jsx,.tsx && prettier --check '**/*.{scss,json,yaml,md,html}'",
|
"lint": "eslint ./packages --ext .vue,.js,.ts,.jsx,.tsx && prettier --check .",
|
||||||
"lint:fix": "eslint --fix ./packages --ext .vue,.js,.ts,.jsx,.tsx && prettier --write '**/*.{scss,json,yaml,md,html}'",
|
"lint:fix": "eslint --fix ./packages --ext .vue,.js,.ts,.jsx,.tsx && prettier --write .",
|
||||||
"website-build": "rimraf website-dist && cross-env NODE_ENV=production webpack --config ./website/webpack.config.js",
|
"website-build": "rimraf website-dist && cross-env NODE_ENV=production webpack --config ./website/webpack.config.js",
|
||||||
"website-dev": "webpack-dev-server --config ./website/webpack.config.js",
|
"website-dev": "webpack-dev-server --config ./website/webpack.config.js",
|
||||||
"website-dev:play": "cross-env PLAY_ENV=true yarn website-dev"
|
"website-dev:play": "cross-env PLAY_ENV=true yarn website-dev"
|
||||||
@ -135,8 +135,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{vue,js,ts,jsx,tsx}": "eslint --fix",
|
"*.{vue,js,ts,jsx,tsx}": [
|
||||||
"*.{scss,json,yaml,md,html}": "prettier --write"
|
"eslint --fix",
|
||||||
|
"prettier --write"
|
||||||
|
],
|
||||||
|
"*.{scss,css,json,yaml,yml,md,html}": "prettier --write"
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
@ -229,7 +229,9 @@ export default defineComponent({
|
|||||||
{ firstFields: true },
|
{ firstFields: true },
|
||||||
(errors, invalidFields) => {
|
(errors, invalidFields) => {
|
||||||
validateState.value = !errors ? 'success' : 'error'
|
validateState.value = !errors ? 'success' : 'error'
|
||||||
validateMessage.value = errors ? errors[0].message || `${props.prop} is required` : ''
|
validateMessage.value = errors
|
||||||
|
? errors[0].message || `${props.prop} is required`
|
||||||
|
: ''
|
||||||
callback(validateMessage.value, invalidFields)
|
callback(validateMessage.value, invalidFields)
|
||||||
elForm.emit?.(
|
elForm.emit?.(
|
||||||
'validate',
|
'validate',
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
[class^="icon-"], [class*=" icon-"] {
|
[class^='icon-'],
|
||||||
|
[class*=' icon-'] {
|
||||||
/* use !important to prevent issues with browser extensions that change fonts */
|
/* use !important to prevent issues with browser extensions that change fonts */
|
||||||
font-family: 'icomoon' !important;
|
font-family: 'icomoon' !important;
|
||||||
speak: none;
|
speak: none;
|
||||||
@ -25,15 +26,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.icon-rate-face-off:before {
|
.icon-rate-face-off:before {
|
||||||
content: "\e900";
|
content: '\e900';
|
||||||
}
|
}
|
||||||
.icon-rate-face-1:before {
|
.icon-rate-face-1:before {
|
||||||
content: "\e901";
|
content: '\e901';
|
||||||
}
|
}
|
||||||
.icon-rate-face-2:before {
|
.icon-rate-face-2:before {
|
||||||
content: "\e902";
|
content: '\e902';
|
||||||
}
|
}
|
||||||
.icon-rate-face-3:before {
|
.icon-rate-face-3:before {
|
||||||
content: "\e903";
|
content: '\e903';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user