Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding "setting up prettier" in CONTRIBUTING.md #46310

Merged
merged 8 commits into from
Oct 14, 2019
Merged
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ IntelliJ | Settings » Languages & Frameworks » JavaScript » Code Quality To

Another tool we use for enforcing consistent coding style is EditorConfig, which can be set up by installing a plugin in your editor that dynamically updates its configuration. Take a look at the [EditorConfig](http://editorconfig.org/#download) site to find a plugin for your editor, and browse our [`.editorconfig`](https://github.com/elastic/kibana/blob/master/.editorconfig) file to see what config rules we set up.

#### Setup Guide for VS Code Users

Note that for VSCode, to enable "live" linting of TypeScript (and other) file types, you will need to modify your local settings, as shown below. The default for the ESLint extension is to only lint JavaScript file types.

```json
Expand All @@ -317,6 +319,14 @@ Note that for VSCode, to enable "live" linting of TypeScript (and other) file ty
]
```

`eslint` can automatically fix trivial lint errors when you save a file by adding this line in your setting.

```json
"eslint.autoFixOnSave": true,
```

It is **not** recommended to use `prettier` plugin on Kibana project. Because settings are in `eslintrc.js` file and it is applied to too many files that shouldn't be prettier-ized.

### Internationalization

All user-facing labels and info texts in Kibana should be internationalized. Please take a look at the [readme](packages/kbn-i18n/README.md) and the [guideline](packages/kbn-i18n/GUIDELINE.md) of the i18n package on how to do so.
Expand Down