-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(): added commitlint, husky and prettier
- Loading branch information
Showing
14 changed files
with
9,672 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
# Editor configuration, see https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
indent_style = space | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
|
||
[*.ts] | ||
quote_type = single | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
{ | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"semi": false, | ||
"singleQuote": true, | ||
"arrowParens": "avoid" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = { extends: ["@commitlint/config-conventional"] }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,64 @@ | ||
{ | ||
"name": "enva", | ||
"version": "0.0.0", | ||
"author": { | ||
"name": "Romullo", | ||
"email": "[email protected]", | ||
"url": "https://hiukky.com" | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/hiukky/enva/issues" | ||
}, | ||
"homepage": "https://github.com/hiukky/enva#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/hiukky/enva" | ||
}, | ||
"scripts": { | ||
"ng": "ng", | ||
"start": "ng serve", | ||
"build": "ng build", | ||
"test": "ng test", | ||
"lint": "ng lint", | ||
"e2e": "ng e2e" | ||
"e2e": "ng e2e", | ||
"format": "prettier --write \"./src/**/*.{ts,js}\"" | ||
}, | ||
"private": true, | ||
"dependencies": { | ||
"@angular/animations": "~11.0.1", | ||
"@angular/common": "~11.0.1", | ||
"@angular/compiler": "~11.0.1", | ||
"@angular/core": "~11.0.1", | ||
"@angular/forms": "~11.0.1", | ||
"@angular/platform-browser": "~11.0.1", | ||
"@angular/platform-browser-dynamic": "~11.0.1", | ||
"@angular/router": "~11.0.1", | ||
"rxjs": "~6.6.0", | ||
"tslib": "^2.0.0", | ||
"zone.js": "~0.10.2" | ||
"@angular/animations": "~11.0.2", | ||
"@angular/common": "~11.0.2", | ||
"@angular/compiler": "~11.0.2", | ||
"@angular/core": "~11.0.2", | ||
"@angular/forms": "~11.0.2", | ||
"@angular/platform-browser": "~11.0.2", | ||
"@angular/platform-browser-dynamic": "~11.0.2", | ||
"@angular/router": "~11.0.2", | ||
"rxjs": "~6.6.3", | ||
"tslib": "^2.0.3", | ||
"zone.js": "~0.11.3" | ||
}, | ||
"devDependencies": { | ||
"@angular-devkit/build-angular": "~0.1100.2", | ||
"@angular/cli": "~11.0.2", | ||
"@angular/compiler-cli": "~11.0.1", | ||
"@types/jasmine": "~3.6.0", | ||
"@types/node": "^12.11.1", | ||
"codelyzer": "^6.0.0", | ||
"@angular/compiler-cli": "~11.0.2", | ||
"@commitlint/cli": "^11.0.0", | ||
"@commitlint/config-conventional": "^11.0.0", | ||
"@types/jasmine": "~3.6.2", | ||
"@types/node": "^14.14.9", | ||
"codelyzer": "^6.0.1", | ||
"husky": "^4.3.0", | ||
"jasmine-core": "~3.6.0", | ||
"jasmine-spec-reporter": "~5.0.0", | ||
"karma": "~5.1.0", | ||
"jasmine-spec-reporter": "~6.0.0", | ||
"karma": "~5.2.3", | ||
"karma-chrome-launcher": "~3.1.0", | ||
"karma-coverage": "~2.0.3", | ||
"karma-jasmine": "~4.0.0", | ||
"karma-jasmine-html-reporter": "^1.5.0", | ||
"karma-jasmine": "~4.0.1", | ||
"karma-jasmine-html-reporter": "^1.5.4", | ||
"prettier": "^2.2.0", | ||
"protractor": "~7.0.0", | ||
"ts-node": "~8.3.0", | ||
"tslint": "~6.1.0", | ||
"typescript": "~4.0.2" | ||
"ts-node": "~9.0.0", | ||
"tslint": "~6.1.3", | ||
"typescript": "~4.1.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
import { AppComponent } from './app.component'; | ||
import { TestBed } from '@angular/core/testing' | ||
import { AppComponent } from './app.component' | ||
|
||
describe('AppComponent', () => { | ||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ | ||
AppComponent | ||
], | ||
}).compileComponents(); | ||
}); | ||
declarations: [AppComponent], | ||
}).compileComponents() | ||
}) | ||
|
||
it('should create the app', () => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.componentInstance; | ||
expect(app).toBeTruthy(); | ||
}); | ||
const fixture = TestBed.createComponent(AppComponent) | ||
const app = fixture.componentInstance | ||
expect(app).toBeTruthy() | ||
}) | ||
|
||
it(`should have as title 'enva'`, () => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.componentInstance; | ||
expect(app.title).toEqual('enva'); | ||
}); | ||
const fixture = TestBed.createComponent(AppComponent) | ||
const app = fixture.componentInstance | ||
expect(app.title).toEqual('enva') | ||
}) | ||
|
||
it('should render title', () => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
fixture.detectChanges(); | ||
const compiled = fixture.nativeElement; | ||
expect(compiled.querySelector('.content span').textContent).toContain('enva app is running!'); | ||
}); | ||
}); | ||
const fixture = TestBed.createComponent(AppComponent) | ||
fixture.detectChanges() | ||
const compiled = fixture.nativeElement | ||
expect(compiled.querySelector('.content span').textContent).toContain( | ||
'enva app is running!', | ||
) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Component } from '@angular/core'; | ||
import { Component } from '@angular/core' | ||
|
||
@Component({ | ||
selector: 'app-root', | ||
templateUrl: './app.component.html', | ||
styleUrls: ['./app.component.css'] | ||
styleUrls: ['./app.component.css'], | ||
}) | ||
export class AppComponent { | ||
title = 'enva'; | ||
title = 'enva' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { NgModule } from '@angular/core'; | ||
import { BrowserModule } from '@angular/platform-browser' | ||
import { NgModule } from '@angular/core' | ||
|
||
import { AppComponent } from './app.component'; | ||
import { AppComponent } from './app.component' | ||
|
||
@NgModule({ | ||
declarations: [ | ||
AppComponent | ||
], | ||
imports: [ | ||
BrowserModule | ||
], | ||
declarations: [AppComponent], | ||
imports: [BrowserModule], | ||
providers: [], | ||
bootstrap: [AppComponent] | ||
bootstrap: [AppComponent], | ||
}) | ||
export class AppModule { } | ||
export class AppModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export const environment = { | ||
production: true | ||
}; | ||
production: true, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import { enableProdMode } from '@angular/core'; | ||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | ||
import { enableProdMode } from '@angular/core' | ||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' | ||
|
||
import { AppModule } from './app/app.module'; | ||
import { environment } from './environments/environment'; | ||
import { AppModule } from './app/app.module' | ||
import { environment } from './environments/environment' | ||
|
||
if (environment.production) { | ||
enableProdMode(); | ||
enableProdMode() | ||
} | ||
|
||
platformBrowserDynamic().bootstrapModule(AppModule) | ||
.catch(err => console.error(err)); | ||
platformBrowserDynamic() | ||
.bootstrapModule(AppModule) | ||
.catch(err => console.error(err)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files | ||
|
||
import 'zone.js/dist/zone-testing'; | ||
import { getTestBed } from '@angular/core/testing'; | ||
import 'zone.js/dist/zone-testing' | ||
import { getTestBed } from '@angular/core/testing' | ||
import { | ||
BrowserDynamicTestingModule, | ||
platformBrowserDynamicTesting | ||
} from '@angular/platform-browser-dynamic/testing'; | ||
platformBrowserDynamicTesting, | ||
} from '@angular/platform-browser-dynamic/testing' | ||
|
||
declare const require: { | ||
context(path: string, deep?: boolean, filter?: RegExp): { | ||
keys(): string[]; | ||
<T>(id: string): T; | ||
}; | ||
}; | ||
context( | ||
path: string, | ||
deep?: boolean, | ||
filter?: RegExp, | ||
): { | ||
keys(): string[] | ||
<T>(id: string): T | ||
} | ||
} | ||
|
||
// First, initialize the Angular testing environment. | ||
getTestBed().initTestEnvironment( | ||
BrowserDynamicTestingModule, | ||
platformBrowserDynamicTesting() | ||
); | ||
platformBrowserDynamicTesting(), | ||
) | ||
// Then we find all the tests. | ||
const context = require.context('./', true, /\.spec\.ts$/); | ||
const context = require.context('./', true, /\.spec\.ts$/) | ||
// And load the modules. | ||
context.keys().map(context); | ||
context.keys().map(context) |
Oops, something went wrong.