Jyoti Puri
Jyoti Puri

Reputation: 1346

Code formatting standard across various IDEs for JavaScript

I am working on an Angular project. Developers in my team are using various IDEs like WebStrorm, SublimeText or even Eclipse.

I wish to have some kind of code formatting rules defined for JavaScript defined which can be imported in WebStorm as well as other IDEs, but as I searched I could not found anything standard for this.

How can I do this?

Upvotes: 2

Views: 2000

Answers (1)

imcg
imcg

Reputation: 2649

You can use a plugin called editorconfig. It supports all the major editors. You define the rules in a config file that sits in the root of the project repo.

Additionally, you can include jsHint in your workflow/build process to check your code for potentially problems and inconsistent formatting. It's fully configurable.

Upvotes: 3

Related Questions