Skip to content

Commit a65c72c

Browse files
johnpapaBrocco
authored andcommitted
feat: add .editorconfig to ng new
Closes $595
1 parent 59b890e commit a65c72c

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
max_line_length = 0
14+
trim_trailing_whitespace = false

tests/acceptance/new.spec.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ describe('Acceptance: ng new', function () {
8282
});
8383
});
8484

85+
it('ng new has a .editorconfig file', function () {
86+
return ng(['new', 'FooApp', '--skip-npm', '--skip-bower', '--skip-git']).then(function () {
87+
expect(!existsSync('FooApp'));
88+
89+
var editorConfig = fs.readFileSync('.editorconfig', 'utf8');
90+
expect(editorConfig).to.exist;
91+
});
92+
});
93+
8594
it('Cannot run ng new, inside of ember-cli project', function () {
8695
return ng(['new', 'foo', '--skip-npm', '--skip-bower', '--skip-git'])
8796
.then(function () {

0 commit comments

Comments
 (0)