Skip to content

Commit

Permalink
Prettier format
Browse files Browse the repository at this point in the history
  • Loading branch information
dineeek committed Mar 5, 2023
1 parent eb01265 commit 7af227c
Show file tree
Hide file tree
Showing 27 changed files with 459 additions and 454 deletions.
5 changes: 4 additions & 1 deletion .prettierrc
Expand Up @@ -2,5 +2,8 @@
"arrowParens": "avoid",
"printWidth": 80,
"proseWrap": "always",
"singleQuote": true
"singleQuote": true,
"semi": false,
"trailingComma": "none",
"bracketSpacing": true
}
8 changes: 4 additions & 4 deletions apps/playground-e2e/cypress.config.ts
@@ -1,6 +1,6 @@
import { defineConfig } from 'cypress';
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
import { defineConfig } from 'cypress'
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset'

export default defineConfig({
e2e: nxE2EPreset(__dirname),
});
e2e: nxE2EPreset(__dirname)
})
12 changes: 6 additions & 6 deletions apps/playground-e2e/src/e2e/app.cy.ts
@@ -1,13 +1,13 @@
import { getGreeting } from '../support/app.po';
import { getGreeting } from '../support/app.po'

describe('playground', () => {
beforeEach(() => cy.visit('/'));
beforeEach(() => cy.visit('/'))

it('should display welcome message', () => {
// Custom command example, see `../support/commands.ts` file
cy.login('my-email@something.com', 'myPassword');
cy.login('my-email@something.com', 'myPassword')

// Function helper example, see `../support/app.po.ts` file
getGreeting().contains('Welcome playground');
});
});
getGreeting().contains('Welcome playground')
})
})
2 changes: 1 addition & 1 deletion apps/playground-e2e/src/support/app.po.ts
@@ -1 +1 @@
export const getGreeting = () => cy.get('h1');
export const getGreeting = () => cy.get('h1')
6 changes: 3 additions & 3 deletions apps/playground-e2e/src/support/commands.ts
Expand Up @@ -12,14 +12,14 @@
declare namespace Cypress {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface Chainable<Subject> {
login(email: string, password: string): void;
login(email: string, password: string): void
}
}
//
// -- This is a parent command --
Cypress.Commands.add('login', (email, password) => {
console.log('Custom command example: Login', email, password);
});
console.log('Custom command example: Login', email, password)
})
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
Expand Down
2 changes: 1 addition & 1 deletion apps/playground-e2e/src/support/e2e.ts
Expand Up @@ -14,4 +14,4 @@
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands';
import './commands'
12 changes: 6 additions & 6 deletions apps/playground/jest.config.ts
Expand Up @@ -6,17 +6,17 @@ export default {
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
stringifyContentPathRegex: '\\.(html|svg)$'
}
},
coverageDirectory: '../../coverage/apps/playground',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular'
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
};
'jest-preset-angular/build/serializers/html-comment'
]
}
12 changes: 6 additions & 6 deletions apps/playground/src/app/app-routing.module.ts
@@ -1,13 +1,13 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { PassCodeDemoComponent } from './demos/pass-code/pass-code-demo.component';
import { NgModule } from '@angular/core'
import { RouterModule, Routes } from '@angular/router'
import { PassCodeDemoComponent } from './demos/pass-code/pass-code-demo.component'

const routes: Routes = [
{ path: 'ngx-pass-code', component: PassCodeDemoComponent },
];
{ path: 'ngx-pass-code', component: PassCodeDemoComponent }
]

@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
exports: [RouterModule]
})
export class AppRoutingModule {}
4 changes: 2 additions & 2 deletions apps/playground/src/app/app.component.ts
@@ -1,8 +1,8 @@
import { Component } from '@angular/core';
import { Component } from '@angular/core'

@Component({
selector: 'ngx-libs-workspace-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
styleUrls: ['./app.component.scss']
})
export class AppComponent {}
18 changes: 9 additions & 9 deletions apps/playground/src/app/app.module.ts
@@ -1,21 +1,21 @@
import { NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { NgxPassCodeModule } from 'ngx-pass-code';
import { NgModule } from '@angular/core'
import { ReactiveFormsModule } from '@angular/forms'
import { BrowserModule } from '@angular/platform-browser'
import { NgxPassCodeModule } from 'ngx-pass-code'

import { AppComponent } from './app.component';
import { AppComponent } from './app.component'

import { AppRoutingModule } from './app-routing.module';
import { PassCodeDemoComponent } from './demos/pass-code/pass-code-demo.component';
import { AppRoutingModule } from './app-routing.module'
import { PassCodeDemoComponent } from './demos/pass-code/pass-code-demo.component'

@NgModule({
declarations: [AppComponent, PassCodeDemoComponent],
imports: [
BrowserModule,
AppRoutingModule,
ReactiveFormsModule,
NgxPassCodeModule,
NgxPassCodeModule
],
bootstrap: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule {}
@@ -1,20 +1,20 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { ChangeDetectionStrategy, Component } from '@angular/core'
import { FormControl, FormGroup, Validators } from '@angular/forms'

@Component({
selector: 'ngx-libs-workspace-pass-code-demo',
templateUrl: './pass-code.component.html',
styleUrls: ['./pass-code.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
changeDetection: ChangeDetectionStrategy.OnPush
})
export class PassCodeDemoComponent {
form = new FormGroup({
textCode: new FormControl('76', { validators: [Validators.required] }),
numberCode: new FormControl(''),
passwordCode: new FormControl('mypass1'),
});
passwordCode: new FormControl('mypass1')
})

textCode = this.form.get('textCode') as FormControl;
numberCode = this.form.get('numberCode') as FormControl;
passwordCode = this.form.get('passwordCode') as FormControl;
textCode = this.form.get('textCode') as FormControl
numberCode = this.form.get('numberCode') as FormControl
passwordCode = this.form.get('passwordCode') as FormControl
}
4 changes: 2 additions & 2 deletions apps/playground/src/environments/environment.prod.ts
@@ -1,3 +1,3 @@
export const environment = {
production: true,
};
production: true
}
4 changes: 2 additions & 2 deletions apps/playground/src/environments/environment.ts
Expand Up @@ -3,8 +3,8 @@
// The list of file replacements can be found in `angular.json`.

export const environment = {
production: false,
};
production: false
}

/*
* For easier debugging in development mode, you can import the following file
Expand Down
12 changes: 6 additions & 6 deletions apps/playground/src/main.ts
@@ -1,13 +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));
.catch(err => console.error(err))
2 changes: 1 addition & 1 deletion apps/playground/src/polyfills.ts
Expand Up @@ -45,7 +45,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js'; // Included with Angular CLI.
import 'zone.js' // Included with Angular CLI.

/***************************************************************************************************
* APPLICATION IMPORTS
Expand Down
2 changes: 1 addition & 1 deletion apps/playground/src/test-setup.ts
@@ -1 +1 @@
import 'jest-preset-angular/setup-jest';
import 'jest-preset-angular/setup-jest'
6 changes: 3 additions & 3 deletions jest.config.ts
@@ -1,5 +1,5 @@
import { getJestProjects } from '@nrwl/jest';
import { getJestProjects } from '@nrwl/jest'

export default {
projects: getJestProjects(),
};
projects: getJestProjects()
}
12 changes: 6 additions & 6 deletions libs/ngx-pass-code/jest.config.ts
Expand Up @@ -6,17 +6,17 @@ export default {
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
stringifyContentPathRegex: '\\.(html|svg)$'
}
},
coverageDirectory: '../../coverage/libs/ngx-pass-code',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular'
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
};
'jest-preset-angular/build/serializers/html-comment'
]
}
4 changes: 2 additions & 2 deletions libs/ngx-pass-code/src/index.ts
@@ -1,2 +1,2 @@
export { PassCodeComponent } from './lib/component/pass-code.component';
export * from './lib/ngx-pass-code.module';
export { PassCodeComponent } from './lib/component/pass-code.component'
export * from './lib/ngx-pass-code.module'

0 comments on commit 7af227c

Please sign in to comment.