From 41b5fb1145c56015fb7bd9bd26f60d142133e984 Mon Sep 17 00:00:00 2001 From: higoka Date: Fri, 21 Jun 2019 19:51:44 +0200 Subject: [PATCH] Code cleanup --- CHANGELOG.md | 8 +++++++- README.md | 6 +++--- extension.js | 6 +++--- package.json | 8 ++++---- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 035a74d..837e0f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.0.7] - 2019-06-21 +### Changed +- Description for some configurations +- Code cleanup + ## [0.0.6] - 2019-06-19 ### Added - Extension Icon @@ -32,7 +37,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.0.1] - 2019-06-19 - Initial release -[Unreleased]: https://github.com/higoka/php-cs-fixer/compare/v0.0.6...HEAD +[Unreleased]: https://github.com/higoka/php-cs-fixer/compare/v0.0.7...HEAD +[0.0.7]: https://github.com/higoka/php-cs-fixer/releases/tag/v0.0.7 [0.0.6]: https://github.com/higoka/php-cs-fixer/releases/tag/v0.0.6 [0.0.5]: https://github.com/higoka/php-cs-fixer/releases/tag/v0.0.5 [0.0.4]: https://github.com/higoka/php-cs-fixer/releases/tag/v0.0.4 diff --git a/README.md b/README.md index 24197f2..428f1f8 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,9 @@ For more information please visit: https://cs.symfony.com/ ## Configuration -* `php-cs-fixer.executable`: Path to the php-cs-fixer executable. -* `php-cs-fixer.configFile`: Path to the php-cs-fixer config. -* `php-cs-fixer.pathMode`: Appends the "--path-mode" parameter. +* `php-cs-fixer.executable`: Path to php-cs-fixer executable. +* `php-cs-fixer.configFile`: Path to php-cs-fixer config. +* `php-cs-fixer.pathMode`: Set "--path-mode" parameter. * `php-cs-fixer.onSave`: Execute command on save. ## Error Handling diff --git a/extension.js b/extension.js index fb55ce2..6d3c4c0 100644 --- a/extension.js +++ b/extension.js @@ -8,7 +8,7 @@ function activate(context) { const config = vscode.workspace.getConfiguration('php-cs-fixer') - context.subscriptions.push(vscode.commands.registerCommand('php-cs-fixer.fix', function () { + context.subscriptions.push(vscode.commands.registerCommand('php-cs-fixer.fix', () => { const param = [] if (config.executable) { @@ -27,7 +27,7 @@ function activate(context) { // console.log(param.join(' ')) - exec(param.join(' '), function (err, stdout, stderr) { + exec(param.join(' '), (err, stdout, stderr) => { if (err) { vscode.window.showErrorMessage('PHP-CS-Fixer: An error occurred.') throw err @@ -37,7 +37,7 @@ function activate(context) { }) })) - context.subscriptions.push(vscode.workspace.onWillSaveTextDocument(function (e) { + context.subscriptions.push(vscode.workspace.onWillSaveTextDocument((e) => { if (e.document.languageId === 'php' && config.onSave) { e.waitUntil(vscode.commands.executeCommand('php-cs-fixer.fix')) } diff --git a/package.json b/package.json index d83a3d7..028b291 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "php-cs-fixer", "displayName": "PHP-CS-Fixer", "description": "Integrates PHP-CS-Fixer into Visual Studio Code.", - "version": "0.0.6", + "version": "0.0.7", "publisher": "higoka", "author": { "name": "higoka", @@ -39,17 +39,17 @@ "title": "PHP-CS-Fixer", "properties": { "php-cs-fixer.executable": { - "description": "Path to the php-cs-fixer executable.", + "description": "Path to php-cs-fixer executable.", "type": "string", "default": "/usr/local/bin/php-cs-fixer" }, "php-cs-fixer.configFile": { - "description": "Path to the php-cs-fixer config.", + "description": "Path to php-cs-fixer config.", "type": "string", "default": "" }, "php-cs-fixer.pathMode": { - "description": "Appends the \"--path-mode\" parameter", + "description": "Set \"--path-mode\" parameter.", "type": "string", "enum": [ "override",