Browse Source

script: use default prettier

pull/4954/head
陈帅 7 years ago
parent
commit
3d3b5ad4a5
  1. 8
      .gitpod.yml
  2. 12
      .prettierignore
  3. 8
      .prettierrc
  4. 7
      .stylelintrc.json
  5. 20
      CODE_OF_CONDUCT.md
  6. 3
      README.fr-FR.md
  7. 2
      README.ja-JP.md
  8. 2
      README.md
  9. 2
      config/plugin.config.ts
  10. 4
      docker/docker-compose.dev.yml
  11. 5207
      lambda/mock/index.js
  12. 6
      package.json
  13. 10
      src/pages/document.ejs
  14. 2
      tests/run-tests.js

8
.gitpod.yml

@ -1,6 +1,6 @@
ports:
- port: 8000
onOpen: open-preview
- port: 8000
onOpen: open-preview
tasks:
- init: npm install
command: npm start
- init: npm install
command: npm start

12
.prettierignore

@ -2,3 +2,15 @@
package.json
.umi
.umi-production
/dist
.dockerignore
.DS_Store
.eslintignore
*.png
*.toml
docker
.editorconfig
Dockerfile*
.gitignore
.prettierignore
LICENSE

8
.prettierrc

@ -9,6 +9,12 @@
"options": {
"parser": "json"
}
},
{
"files": "document.ejs",
"options": {
"parser": "html"
}
}
]
}
}

7
.stylelintrc.json

@ -5,12 +5,9 @@
"stylelint-config-rational-order",
"stylelint-config-prettier"
],
"plugins": [
"stylelint-order",
"stylelint-declaration-block-no-ignored-properties"
],
"plugins": ["stylelint-order", "stylelint-declaration-block-no-ignored-properties"],
"rules": {
"no-descending-specificity": null,
"plugin/declaration-block-no-ignored-properties": true
}
}
}

20
CODE_OF_CONDUCT.md

@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities

3
README.fr-FR.md

@ -115,9 +115,8 @@ Toute forme de contribution est la bienvenue, voici quelques exemples de façons
- Soumettre des [issues](http://github.com/ant-design/ant-design-pro/issues) pour reporter les bugs ou poser des questions.
- Proposer des [pull requests](http://github.com/ant-design/ant-design-pro/pulls) pour améliorer notre code.
<div align="center">
<a href="https://www.netlify.com">
<img src="https://www.netlify.com/img/global/badges/netlify-color-bg.svg"/>
</a>
</div>
</div>

2
README.ja-JP.md

@ -121,4 +121,4 @@ Gitpod(GitHub 用の無料オンライン開発環境)でプロジェクト
<a href="https://www.netlify.com">
<img src="https://www.netlify.com/img/global/badges/netlify-color-bg.svg"/>
</a>
</div>
</div>

2
README.md

@ -121,4 +121,4 @@ Any type of contribution is welcome, here are some examples of how you may contr
<a href="https://www.netlify.com">
<img src="https://www.netlify.com/img/global/badges/netlify-color-bg.svg"/>
</a>
</div>
</div>

2
config/plugin.config.ts

@ -112,4 +112,4 @@ const getAntdSerials = (color: string) => {
});
const colorPalettes = generate(color);
return lightens.concat(colorPalettes);
}
};

4
docker/docker-compose.dev.yml

@ -1,4 +1,4 @@
version: "3.5"
version: '3.5'
services:
ant-design-pro_dev:
@ -7,7 +7,7 @@ services:
build:
context: ../
dockerfile: Dockerfile.dev
container_name: "ant-design-pro_dev"
container_name: 'ant-design-pro_dev'
volumes:
- ../src:/usr/src/app/src
- ../config:/usr/src/app/config

5207
lambda/mock/index.js

File diff suppressed because it is too large

6
package.json

@ -25,7 +25,7 @@
"lint:prettier": "check-prettier lint",
"lint:style": "stylelint --fix \"src/**/*.less\" --syntax less",
"lint:ts": "tslint -p . -c tslint.yml",
"prettier": " check-prettier write",
"prettier": "prettier -c --write '**/*'",
"site": "npm run fetch:blocks && npm run functions:build && umi build",
"start": "umi dev",
"start:no-mock": "cross-env MOCK=none umi dev",
@ -42,8 +42,8 @@
"lint-staged": {
"**/*.less": "stylelint --syntax less",
"**/*.{js,jsx}": "npm run lint-staged:js",
"**/*.{js,ts,tsx,md,json,jsx,less}": [
"npm run prettier",
"**/*.{js,jsx,tsx,ts,less,md,json}": [
"prettier --write",
"git add"
],
"**/*.{ts,tsx}": "npm run lint-staged:ts"

10
src/pages/document.ejs

@ -30,18 +30,16 @@
font-variant: tabular-nums;
line-height: 1.5;
list-style: none;
-webkit-font-feature-settings: "tnum";
font-feature-settings: "tnum";
-webkit-font-feature-settings: 'tnum';
font-feature-settings: 'tnum';
position: absolute;
display: none;
color: #1890ff;
text-align: center;
vertical-align: middle;
opacity: 0;
-webkit-transition: -webkit-transform 0.3s
cubic-bezier(0.78, 0.14, 0.15, 0.86);
transition: -webkit-transform 0.3s
cubic-bezier(0.78, 0.14, 0.15, 0.86);
-webkit-transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86),
-webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);

2
tests/run-tests.js

@ -37,7 +37,7 @@ startServer.stdout.on('data', data => {
['test', '--', '--maxWorkers=1', '--runInBand'],
{
stdio: 'inherit',
}
},
);
testCmd.on('exit', code => {
startServer.kill();

Loading…
Cancel
Save