Improve CONTRIBUTING.md (#5157)
This commit is contained in:
		
							parent
							
								
									01e7716170
								
							
						
					
					
						commit
						a23a10d375
					
				
					 1 changed files with 26 additions and 19 deletions
				
			
		|  | @ -7,18 +7,18 @@ Feature suggestions and bug reports are filed in https://github.com/syuilo/missk | ||||||
| * Please search existing issues to avoid duplication. If your issue is already filed, please add your reaction or comment to the existing one. | * Please search existing issues to avoid duplication. If your issue is already filed, please add your reaction or comment to the existing one. | ||||||
| * If you have multiple independent issues, please submit them separately. | * If you have multiple independent issues, please submit them separately. | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| ## Localization (l10n) | ## Localization (l10n) | ||||||
| Misskey uses [Crowdin](https://crowdin.com/project/misskey) for localization management. | Misskey uses [Crowdin](https://crowdin.com/project/misskey) for localization management. | ||||||
| You can improve our translations with your Crowdin account. | You can improve our translations with your Crowdin account. | ||||||
| Changes you make in Crowdin will be merged into develop branch. | Changes you make in Crowdin will be merged into the develop branch by @syuilo. | ||||||
| 
 | 
 | ||||||
| If you can't find the language you want to contribute with, please open an issue. | If you cannot find the language you want to contribute with, please open an issue. | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
| 
 | 
 | ||||||
| ## Internationalization (i18n) | ## Internationalization (i18n) | ||||||
| Misskey uses [vue-i18n](https://github.com/kazupon/vue-i18n). | Misskey uses the Vue.js plugin [Vue I18n](https://github.com/kazupon/vue-i18n). | ||||||
|  | Documentation of Vue I18n is available at http://kazupon.github.io/vue-i18n/introduction.html . | ||||||
| 
 | 
 | ||||||
| ## Documentation | ## Documentation | ||||||
| * Documents for contributors are located in [`/docs`](/docs). | * Documents for contributors are located in [`/docs`](/docs). | ||||||
|  | @ -29,14 +29,13 @@ Misskey uses [vue-i18n](https://github.com/kazupon/vue-i18n). | ||||||
| * Test codes are located in [`/test`](/test). | * Test codes are located in [`/test`](/test). | ||||||
| 
 | 
 | ||||||
| ## Continuous integration | ## Continuous integration | ||||||
| Misskey uses CircleCI for automated test. | Misskey uses CircleCI for executing automated tests. | ||||||
| Configuration files are located in [`/.circleci`](/.circleci). | Configuration files are located in [`/.circleci`](/.circleci). | ||||||
| 
 | 
 | ||||||
| ## FAQ | ## FAQ | ||||||
| 
 | 
 | ||||||
| ### Conflict occured at yarn.lock | ### How to resolve conflictions occurred at yarn.lock? | ||||||
| 
 | Just execute `npx yarn` (or `yarn` when you have yarn installed globally) to fix it. | ||||||
| Just execute `npx yarn` (or `yarn` when you installed yarn in global) to fix it. |  | ||||||
| 
 | 
 | ||||||
| ## Glossary | ## Glossary | ||||||
| ### AP | ### AP | ||||||
|  | @ -57,11 +56,15 @@ Convert な(na) to にゃ(nya) | ||||||
| #### Denyaize | #### Denyaize | ||||||
| Revert Nyaize | Revert Nyaize | ||||||
| 
 | 
 | ||||||
| ## Code style | ## TypeScript Coding Style | ||||||
| ### セミコロンを省略しない | ### Do not omit semicolons | ||||||
| ASI Hazardを避けるためでもある | This is to avoid Automatic Semicolon Insertion (ASI) hazard. | ||||||
| 
 | 
 | ||||||
| ### 中括弧を省略しない | Ref: | ||||||
|  | * https://www.ecma-international.org/ecma-262/#sec-automatic-semicolon-insertion | ||||||
|  | * https://github.com/tc39/ecma262/pull/1062 | ||||||
|  | 
 | ||||||
|  | ### Do not omit curly brackets | ||||||
| Bad: | Bad: | ||||||
| ``` ts | ``` ts | ||||||
| if (foo) | if (foo) | ||||||
|  | @ -79,16 +82,20 @@ if (foo) { | ||||||
| } | } | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| ただし**`if`が一行**の時だけは省略しても良い | As a special case, you can omit the curly brackets if | ||||||
|  | 
 | ||||||
|  | * the body of the `if`-statement have only one statement and, | ||||||
|  | * the `if`-statement does not have `else`-clause. | ||||||
|  | 
 | ||||||
| Good: | Good: | ||||||
| ``` ts | ``` ts | ||||||
| if (foo) bar; | if (foo) bar; | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| ### 特別な理由がない限り`===`を使う | ### Do not use `==` when it can simply be replaced with `===`. | ||||||
| 🥰 | 🥰 | ||||||
| 
 | 
 | ||||||
| ### null系を除いて、bool以外の値をifに渡さない | ### Use only boolean (or null related) values in the condition of an `if`-statement. | ||||||
| Bad: | Bad: | ||||||
| ``` ts | ``` ts | ||||||
| if (foo.length) | if (foo.length) | ||||||
|  | @ -99,12 +106,12 @@ Good: | ||||||
| if (foo.length > 0) | if (foo.length > 0) | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| ### `export default`を使わない | ### Do not use `export default` | ||||||
| インテリセンスと相性が悪かったりするため | This is because the current language support does not work well with `export default`. | ||||||
| 
 | 
 | ||||||
| 参考: | Ref: | ||||||
| * https://gfx.hatenablog.com/entry/2017/11/24/135343 |  | ||||||
| * https://basarat.gitbooks.io/typescript/docs/tips/defaultIsBad.html | * https://basarat.gitbooks.io/typescript/docs/tips/defaultIsBad.html | ||||||
|  | * https://gfx.hatenablog.com/entry/2017/11/24/135343 | ||||||
| 
 | 
 | ||||||
| Bad: | Bad: | ||||||
| ``` ts | ``` ts | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue