Skip to content

Commit 5514163

Browse files
committed
chore: remove format command
Formatting does not align with the style guide. Fixes angular#765
1 parent f7ae81f commit 5514163

File tree

9 files changed

+5
-53
lines changed

9 files changed

+5
-53
lines changed

CONTRIBUTING.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ To ensure consistency throughout the source code, keep these rules in mind as yo
140140
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
141141
* All public API methods **must be documented**. (Details TBC).
142142
* We follow [Google's JavaScript Style Guide][js-style-guide], but wrap all code at
143-
**100 characters**. An automated formatter is available, see
144-
[DEVELOPER.md](DEVELOPER.md#clang-format).
143+
**100 characters**.
145144

146145
## <a name="commit"></a> Commit Message Guidelines
147146

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ of pushing to `gh-pages`, since user and organization pages require this.
187187

188188
### Linting and formatting code
189189

190-
You can lint or format your app code by running `ng lint` or `ng format` respectively.
191-
This will use the `lint`/`format` npm script that in generated projects uses `tslint`/`clang-format`.
190+
You can lint your app code by running `ng lint`.
191+
This will use the `lint` npm script that in generated projects uses `tslint`.
192192

193193
You can modify the these scripts in `package.json` to run whatever tool you prefer.
194194

addon/ng2/blueprints/ng2/files/package.json

-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"start": "ng server",
88
"postinstall": "typings install",
99
"lint": "tslint \"<%= sourceDir %>/**/*.ts\"",
10-
"format": "clang-format -i -style=file --glob=<%= sourceDir %>/**/*.ts",
1110
"test": "ng test",
1211
"pree2e": "webdriver-manager update",
1312
"e2e": "protractor"
@@ -36,7 +35,6 @@
3635
"angular2-universal-polyfills": "^0.4.1",
3736
"preboot": "^2.0.10",<% } %>
3837
"angular-cli": "^<%= version %>",
39-
"clang-format": "^1.0.35",
4038
"codelyzer": "0.0.14",
4139
"ember-cli-inject-live-reload": "^1.4.0",
4240
"jasmine-core": "^2.4.1",

addon/ng2/commands/format.js

-21
This file was deleted.

addon/ng2/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ module.exports = {
1818
'test': require('./commands/test'),
1919
'e2e': require('./commands/e2e'),
2020
'lint': require('./commands/lint'),
21-
'format': require('./commands/format'),
2221
'version': require('./commands/version'),
2322
'completion': require('./commands/completion'),
2423
'doc': require('./commands/doc'),

addon/ng2/tasks/format.js

-22
This file was deleted.

addon/ng2/utilities/completion.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Installation: ng completion >> ~/.bashrc (or ~/.zshrc)
66
#
77

8-
ng_opts='new init build serve generate autocomplete e2e format lint test version'
8+
ng_opts='new init build serve generate autocomplete e2e lint test version'
99
init_opts='--dry-run --verbose --blueprint --skip-npm --skip-bower --name'
1010
new_opts='--dry-run --verbose --blueprint --skip-npm --skip-bower --skip-git --directory'
1111
build_opts='--environment --output-path --watch --watcher'

docs/design/ngConfig.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Since the data is static, we only need to keep it in a static store somewhere.
1616

1717
One solution would be to keep the data in the `package.json`. Unfortunately, the metadata contains too much data and the `package.json` file would become unmanageable.
1818

19-
Instead of polluting the package file, a `angular-cli.json` file will be created that contains all the values. Access to that file will be allowed to the user if he knows the structure of the file (unknown keys will be kept but ignored), and it's easy to read and write. We can also keep the file formatted.
19+
Instead of polluting the package file, a `angular-cli.json` file will be created that contains all the values. Access to that file will be allowed to the user if he knows the structure of the file (unknown keys will be kept but ignored), and it's easy to read and write.
2020

2121

2222
## Fallback

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
},
6464
"devDependencies": {
6565
"chai": "^3.5.0",
66-
"clang-format": "^1.0.38",
6766
"eslint": "^2.8.0",
6867
"exists-sync": "0.0.3",
6968
"minimatch": "^3.0.0",

0 commit comments

Comments
 (0)