Skip to content

Commit

Permalink
chore(ci): Updating Prettier Version (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
shameerrehman authored Aug 29, 2023
1 parent f2ed611 commit 9faddfa
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 36 deletions.
19 changes: 3 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@ import { Component } from "@angular/core";

@Component({
selector: "my-app",
template: `<ngx-turnstile
[siteKey]="siteKey"
(resolved)="sendCaptchaResponse($event)"
theme="auto"
[tabIndex]="0"
></ngx-turnstile>`,
template: `<ngx-turnstile [siteKey]="siteKey" (resolved)="sendCaptchaResponse($event)" theme="auto" [tabIndex]="0"></ngx-turnstile>`,
})
export class MyApp {
sendCaptchaResponse(captchaResponse: string) {
Expand All @@ -68,21 +63,13 @@ You can then use the ngModel, formControl or formControlName directives on the c
### Reactive Form Example

```html
<ngx-turnstile
[siteKey]="siteKey"
theme="auto"
[formControl]="tokenControl"
></ngx-turnstile>
<ngx-turnstile [siteKey]="siteKey" theme="auto" [formControl]="tokenControl"></ngx-turnstile>
```

### Template Driven Form Example

```html
<ngx-turnstile
[siteKey]="siteKey"
theme="light"
[(ngModel)]="token"
></ngx-turnstile>
<ngx-turnstile [siteKey]="siteKey" theme="light" [(ngModel)]="token"></ngx-turnstile>
```

The component is read-only, meaning that you should not update the control with a custom value. Updating the control value will reset the component
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"ng-packagr": "^14.2.0",
"prettier": "^2.7.1",
"prettier": "^3.0.3",
"typescript": "~4.7.2"
}
}
2 changes: 1 addition & 1 deletion projects/ngx-turnstile-demo/src/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
4 changes: 2 additions & 2 deletions projects/ngx-turnstile-demo/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
filter?: RegExp,
): {
<T>(id: string): T;
keys(): string[];
Expand All @@ -21,7 +21,7 @@ declare const require: {
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
platformBrowserDynamicTesting(),
);

// Then we find all the tests.
Expand Down
7 changes: 1 addition & 6 deletions projects/ngx-turnstile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@ import { Component } from "@angular/core";

@Component({
selector: "my-app",
template: `<ngx-turnstile
[siteKey]="siteKey"
(resolved)="sendCaptchaResponse($event)"
theme="auto"
[tabIndex]="0"
></ngx-turnstile>`,
template: `<ngx-turnstile [siteKey]="siteKey" (resolved)="sendCaptchaResponse($event)" theme="auto" [tabIndex]="0"></ngx-turnstile>`,
})
export class MyApp {
sendCaptchaResponse(captchaResponse: string) {
Expand Down
8 changes: 4 additions & 4 deletions projects/ngx-turnstile/src/lib/ngx-turnstile.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ declare global {
turnstile: {
render: (
idOrContainer: string | HTMLElement,
options: TurnstileOptions
options: TurnstileOptions,
) => string;
reset: (widgetIdOrContainer: string | HTMLElement) => void;
getResponse: (
widgetIdOrContainer: string | HTMLElement
widgetIdOrContainer: string | HTMLElement,
) => string | undefined;
remove: (widgetIdOrContainer: string | HTMLElement) => void;
};
Expand Down Expand Up @@ -50,7 +50,7 @@ export class NgxTurnstileComponent implements AfterViewInit, OnDestroy {

constructor(
private elementRef: ElementRef<HTMLElement>,
private zone: NgZone
private zone: NgZone,
) {}

private _getCloudflareTurnstileUrl(): string {
Expand Down Expand Up @@ -86,7 +86,7 @@ export class NgxTurnstileComponent implements AfterViewInit, OnDestroy {

this.widgetId = window.turnstile.render(
this.elementRef.nativeElement,
turnstileOptions
turnstileOptions,
);
};

Expand Down
4 changes: 2 additions & 2 deletions projects/ngx-turnstile/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
filter?: RegExp,
): {
<T>(id: string): T;
keys(): string[];
Expand All @@ -22,7 +22,7 @@ declare const require: {
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
platformBrowserDynamicTesting(),
);

// Then we find all the tests.
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5893,10 +5893,10 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==

prettier@^2.7.1:
version "2.7.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64"
integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==
prettier@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643"
integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==

pretty-bytes@^5.3.0:
version "5.6.0"
Expand Down

0 comments on commit 9faddfa

Please sign in to comment.