From 8aedeaec99e56541b19ee66969ad4609eed55640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20El=C5=BCbieciak?= Date: Sat, 5 Dec 2015 15:41:06 +0100 Subject: [PATCH 1/2] README.md: WebStorm/PhpStorm support This fixes feross/standard#247 --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/README.md b/README.md index 068c5f077..39ae01af7 100644 --- a/README.md +++ b/README.md @@ -170,6 +170,51 @@ For automatic formatting, install **[vscode-standard-format][vscode-2]**. [vscode-1]: https://marketplace.visualstudio.com/items/chenxsan.vscode-standardjs [vscode-2]: https://marketplace.visualstudio.com/items/chenxsan.vscode-standard-format +#### [WebStorm/PhpStorm][webstorm-1] + +1. Turn off your IDE +2. [Figure out where your configuration lives][webstorm-2] (_IDE Settings_ section) +3. Navigate to `your-config-dir/codestyles` +4. Create a `Standard.xml` file: + + ```xml + + + + + + + + + ``` + +5. If you don't want to clutter your project with extra dependencies and config files, then go global: + + - `npm install -g eslint eslint-config-standard eslint-plugin-standard` (`sudo` might be required) + - `echo '{"extends": ["standard"]}' > ~/.eslintrc` (be warned: it overrides an existing file) + +6. If you're OK with local dependencies and config, do (5) without `-g` and `~/` +7. Fire up the IDE and open a _Settings_/_Preferences_ screen (choose between project and default settings accordingly to your preference) +8. Under `Editor > Code Style > JavaScript` change `Scheme` to `Standard` +9. Under `Editor > Inspections > JavaScript > Code style issues` untick `Unterminated statement` +10. Under `Languages & Frameworks > JavaScript > Code Quality Tools > ESLint` just select `Enable`, only in rare cases you'll have to configure `ESLint package` path + +[webstorm-1]: https://www.jetbrains.com/webstorm/ +[webstorm-2]: https://www.jetbrains.com/webstorm/help/project-and-ide-settings.html + ### What you might do if you're clever 1. Add it to `package.json` From 592f5d72669b28a8b9644b602895a6a759321086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20El=C5=BCbieciak?= Date: Sat, 5 Dec 2015 15:41:23 +0100 Subject: [PATCH 2/2] Extract instructions to a separate file --- README.md | 42 ++---------------------------------------- docs/webstorm.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 40 deletions(-) create mode 100644 docs/webstorm.md diff --git a/README.md b/README.md index 39ae01af7..e2eb4d909 100644 --- a/README.md +++ b/README.md @@ -172,48 +172,10 @@ For automatic formatting, install **[vscode-standard-format][vscode-2]**. #### [WebStorm/PhpStorm][webstorm-1] -1. Turn off your IDE -2. [Figure out where your configuration lives][webstorm-2] (_IDE Settings_ section) -3. Navigate to `your-config-dir/codestyles` -4. Create a `Standard.xml` file: - - ```xml - - - - - - - - - ``` - -5. If you don't want to clutter your project with extra dependencies and config files, then go global: - - - `npm install -g eslint eslint-config-standard eslint-plugin-standard` (`sudo` might be required) - - `echo '{"extends": ["standard"]}' > ~/.eslintrc` (be warned: it overrides an existing file) - -6. If you're OK with local dependencies and config, do (5) without `-g` and `~/` -7. Fire up the IDE and open a _Settings_/_Preferences_ screen (choose between project and default settings accordingly to your preference) -8. Under `Editor > Code Style > JavaScript` change `Scheme` to `Standard` -9. Under `Editor > Inspections > JavaScript > Code style issues` untick `Unterminated statement` -10. Under `Languages & Frameworks > JavaScript > Code Quality Tools > ESLint` just select `Enable`, only in rare cases you'll have to configure `ESLint package` path +Both WebStorm and PhpStorm can be [configured for Standard Style][webstorm-2]. [webstorm-1]: https://www.jetbrains.com/webstorm/ -[webstorm-2]: https://www.jetbrains.com/webstorm/help/project-and-ide-settings.html +[webstorm-2]: docs/webstorm.md ### What you might do if you're clever diff --git a/docs/webstorm.md b/docs/webstorm.md new file mode 100644 index 000000000..6d15ece51 --- /dev/null +++ b/docs/webstorm.md @@ -0,0 +1,44 @@ +# [WebStorm/PhpStorm][webstorm-1] configuration for Standard Style + +1. Turn off your IDE +2. [Figure out where your configuration lives][webstorm-2] (_IDE Settings_ section) +3. Navigate to `your-config-dir/codestyles` +4. Create a `Standard.xml` file: + + ```xml + + + + + + + + + ``` + +5. If you don't want to clutter your project with extra dependencies and config files, then go global: + + - `npm install -g eslint eslint-config-standard eslint-plugin-standard` (`sudo` might be required) + - `echo '{"extends": ["standard"]}' > ~/.eslintrc` (be warned: it overrides an existing file) + +6. If you're OK with local dependencies and config, do (5) without `-g` and `~/` +7. Fire up the IDE and open a _Settings_/_Preferences_ screen (choose between project and default settings accordingly to your preference) +8. Under `Editor > Code Style > JavaScript` change `Scheme` to `Standard` +9. Under `Editor > Inspections > JavaScript > Code style issues` untick `Unterminated statement` +10. Under `Languages & Frameworks > JavaScript > Code Quality Tools > ESLint` just select `Enable`, only in rare cases you'll have to configure `ESLint package` path + +[webstorm-1]: https://www.jetbrains.com/webstorm/ +[webstorm-2]: https://www.jetbrains.com/webstorm/help/project-and-ide-settings.html