Skip to content

Commit

Permalink
feat: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Badisi committed Sep 2, 2024
1 parent 1e7d09c commit 2aa36f0
Show file tree
Hide file tree
Showing 85 changed files with 1,182 additions and 319 deletions.
9 changes: 3 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"root": true,
"extends": ["@hug/eslint-config/recommended"],
"rules": {
// Use destroyRef and takeUntilDestroyed
"rxjs-angular/prefer-takeuntil": "off"
// "deprecation/deprecation": "warn"
}
"extends": [
"@hug/eslint-config/recommended"
]
}
13 changes: 0 additions & 13 deletions .hintrc

This file was deleted.

21 changes: 9 additions & 12 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# Ignore all JS and TS files:
**/*.js
**/*.ts
**/*.md

/node_modules/
/.angular/
/.husky/
/.vscode/
/dist/
/.angular
/.git
/.nx
/node_modules
/dist

/projects/**/package.json
/projects/**/ng-package.json
package-lock.json

**/*.md
**/*.js
**/*.ts
16 changes: 9 additions & 7 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"trailingComma": "all",
"tabWidth": 4,
"useTabs": false,
"$schema": "https://json.schemastore.org/prettierrc.json",
"plugins": [
"prettier-plugin-multiline-arrays"
],
"singleQuote": true,
"bracketSameLine": true,
"tabWidth": 4,
"printWidth": 120,
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "ignore",
"proseWrap": "never",
"endOfLine": "lf",
"singleAttributePerLine": false,
"printWidth": 800,
"singleQuote": true
"multilineArraysWrapThreshold": 0
}
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"recommendations": [
"angular.ng-template",
"sibiraj-s.vscode-scss-formatter",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"pkief.material-icon-theme"
]
}
36 changes: 18 additions & 18 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "pwa-chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http://localhost:9876/debug.html"
}
]
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http://localhost:9876/debug.html"
}
]
}
21 changes: 15 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,28 @@
"workbench.iconTheme": "material-icon-theme",
"material-icon-theme.folders.theme": "none",
"material-icon-theme.opacity": 0.6,
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.formatOnSave": true,
"eslint.format.enable": true,
"html.format.wrapAttributes": "force-aligned",
"html.format.wrapLineLength": 120,
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"npm.exclude": "**/{dist,tmp}{,/**}",
"npm.scriptExplorerExclude": [
"install"
Expand Down
82 changes: 72 additions & 10 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@
"polyfills": "projects/demo-app/src/polyfills.ts",
"tsConfig": "projects/demo-app/tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": ["projects/demo-app/src/favicon.ico", "projects/demo-app/src/assets"],
"styles": ["./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", "projects/demo-app/src/styles.scss"],
"assets": [
"projects/demo-app/src/favicon.ico",
"projects/demo-app/src/assets"
],
"styles": [
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"projects/demo-app/src/styles.scss"
],
"scripts": []
},
"configurations": {
Expand Down Expand Up @@ -86,8 +92,14 @@
"tsConfig": "projects/demo-app/tsconfig.spec.json",
"karmaConfig": "projects/demo-app/karma.conf.js",
"inlineStyleLanguage": "scss",
"assets": ["projects/demo-app/src/favicon.ico", "projects/demo-app/src/assets"],
"styles": ["./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", "projects/demo-app/src/styles.scss"],
"assets": [
"projects/demo-app/src/favicon.ico",
"projects/demo-app/src/assets"
],
"styles": [
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"projects/demo-app/src/styles.scss"
],
"scripts": []
}
}
Expand Down Expand Up @@ -128,9 +140,29 @@
"configDir": "projects/storybook/.storybook",
"browserTarget": "storybook:build",
"compodoc": true,
"compodocArgs": ["-e", "json", "-d", "projects/storybook"],
"compodocArgs": [
"-e",
"json",
"-d",
"projects/storybook"
],
"port": 6006,
"styles": ["@angular/material/prebuilt-themes/indigo-pink.css", "@fontsource/roboto/300.css", "@fontsource/roboto/400.css", "@fontsource/roboto/500.css", "@fontsource/roboto/700.css", "@fontsource/material-icons", "./projects/storybook/src/stories/layout/layout.scss", "./projects/storybook/src/stories/user-card/user-card.scss", "./projects/storybook/src/stories/list-loader/list-loader.scss", "./projects/storybook/src/stories/search-container/search-container.scss", "./projects/storybook/src/stories/status/status.scss", "./projects/storybook/src/stories/overlay/overlay.scss", "./projects/storybook/src/stories/message-box/message-box.scss", "./projects/storybook/src/stories/splitter/splitter.scss"]
"styles": [
"@angular/material/prebuilt-themes/indigo-pink.css",
"@fontsource/roboto/300.css",
"@fontsource/roboto/400.css",
"@fontsource/roboto/500.css",
"@fontsource/roboto/700.css",
"@fontsource/material-icons",
"./projects/storybook/src/stories/layout/layout.scss",
"./projects/storybook/src/stories/user-card/user-card.scss",
"./projects/storybook/src/stories/list-loader/list-loader.scss",
"./projects/storybook/src/stories/search-container/search-container.scss",
"./projects/storybook/src/stories/status/status.scss",
"./projects/storybook/src/stories/overlay/overlay.scss",
"./projects/storybook/src/stories/message-box/message-box.scss",
"./projects/storybook/src/stories/splitter/splitter.scss"
]
}
},
"build-storybook": {
Expand All @@ -139,9 +171,29 @@
"configDir": "projects/storybook/.storybook",
"browserTarget": "storybook:build",
"compodoc": true,
"compodocArgs": ["-e", "json", "-d", "projects/storybook"],
"compodocArgs": [
"-e",
"json",
"-d",
"projects/storybook"
],
"outputDir": "dist/storybook/storybook",
"styles": ["@angular/material/prebuilt-themes/indigo-pink.css", "@fontsource/roboto/300.css", "@fontsource/roboto/400.css", "@fontsource/roboto/500.css", "@fontsource/roboto/700.css", "@fontsource/material-icons", "./projects/storybook/src/stories/layout/layout.scss", "./projects/storybook/src/stories/user-card/user-card.scss", "./projects/storybook/src/stories/list-loader/list-loader.scss", "./projects/storybook/src/stories/search-container/search-container.scss", "./projects/storybook/src/stories/status/status.scss", "./projects/storybook/src/stories/overlay/overlay.scss", "./projects/storybook/src/stories/message-box/message-box.scss", "./projects/storybook/src/stories/splitter/splitter.scss"]
"styles": [
"@angular/material/prebuilt-themes/indigo-pink.css",
"@fontsource/roboto/300.css",
"@fontsource/roboto/400.css",
"@fontsource/roboto/500.css",
"@fontsource/roboto/700.css",
"@fontsource/material-icons",
"./projects/storybook/src/stories/layout/layout.scss",
"./projects/storybook/src/stories/user-card/user-card.scss",
"./projects/storybook/src/stories/list-loader/list-loader.scss",
"./projects/storybook/src/stories/search-container/search-container.scss",
"./projects/storybook/src/stories/status/status.scss",
"./projects/storybook/src/stories/overlay/overlay.scss",
"./projects/storybook/src/stories/message-box/message-box.scss",
"./projects/storybook/src/stories/splitter/splitter.scss"
]
}
}
}
Expand Down Expand Up @@ -181,7 +233,12 @@
"configDir": "projects/numeric-stepper/.storybook",
"browserTarget": "numeric-stepper:build",
"compodoc": true,
"compodocArgs": ["-e", "json", "-d", "projects/numeric-stepper"],
"compodocArgs": [
"-e",
"json",
"-d",
"projects/numeric-stepper"
],
"port": 6006
}
},
Expand All @@ -191,7 +248,12 @@
"configDir": "projects/numeric-stepper/.storybook",
"browserTarget": "numeric-stepper:build",
"compodoc": true,
"compodocArgs": ["-e", "json", "-d", "projects/numeric-stepper"],
"compodocArgs": [
"-e",
"json",
"-d",
"projects/numeric-stepper"
],
"outputDir": "dist/storybook/numeric-stepper"
}
}
Expand Down
4 changes: 3 additions & 1 deletion nx_remettre_apres_avoir_generer_tout_storybook.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"targetDefaults": {
"build:ng": {
"dependsOn": ["^build:ng"]
"dependsOn": [
"^build:ng"
]
}
},
"release": {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@
"ng-packagr": "~18.1.0",
"nx": "^19.3.2",
"patch-package": "^8.0.0",
"prettier": "3.3.2",
"prettier": "3.3.3",
"prettier-plugin-multiline-arrays": "^3.0.6",
"storybook": "^8.2.8",
"typescript": "~5.4.5"
},
Expand Down
5 changes: 4 additions & 1 deletion projects/core/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"inlineSources": true,
"types": []
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}
13 changes: 10 additions & 3 deletions projects/core/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": ["jasmine"]
"types": [
"jasmine"
]
},
"files": ["src/test.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
"files": [
"src/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}
4 changes: 3 additions & 1 deletion projects/date-picker/ng-package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/ngx-date-picker",
"assets": ["CHANGELOG.md"],
"assets": [
"CHANGELOG.md"
],
"lib": {
"entryFile": "src/index.ts"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,32 @@
<button *ngIf="!hideClear" data-cy="dtp-clear" [disabled]="forInput.disabled" mat-icon-button class="ngx-date-picker-button" matTooltip="effacer" type="button" (click)="setValue($event, false)">
<button
*ngIf="!hideClear"
data-cy="dtp-clear"
[disabled]="forInput.disabled"
mat-icon-button
class="ngx-date-picker-button"
matTooltip="effacer"
type="button"
(click)="setValue($event, false)">
<mat-icon>close</mat-icon>
</button>
<button *ngIf="!hideToday" data-cy="dtp-today" [disabled]="forInput.disabled" mat-icon-button class="ngx-date-picker-button" matTooltip="aujourd'hui" type="button" (click)="setValue($event, true)">
<button
*ngIf="!hideToday"
data-cy="dtp-today"
[disabled]="forInput.disabled"
mat-icon-button
class="ngx-date-picker-button"
matTooltip="aujourd'hui"
type="button"
(click)="setValue($event, true)">
<mat-icon>today</mat-icon>
</button>
<button data-cy="dtp-open" [disabled]="forInput.disabled" mat-icon-button class="ngx-date-picker-button" matTooltip="ouvrir le calendrier" type="button" (click)="openCalendar()">
<button
data-cy="dtp-open"
[disabled]="forInput.disabled"
mat-icon-button
class="ngx-date-picker-button"
matTooltip="ouvrir le calendrier"
type="button"
(click)="openCalendar()">
<mat-icon>date_range</mat-icon>
</button>
5 changes: 4 additions & 1 deletion projects/date-picker/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"inlineSources": true,
"types": []
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}
Loading

0 comments on commit 2aa36f0

Please sign in to comment.