Skip to content

Commit

Permalink
feat(deps): angular 19 upgrade
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Requires `@angular/core@>=19.0.0`.
  • Loading branch information
bbortt committed Dec 8, 2024
1 parent bd951a6 commit fc596ee
Show file tree
Hide file tree
Showing 46 changed files with 3,676 additions and 3,181 deletions.
13 changes: 0 additions & 13 deletions .editorconfig

This file was deleted.

51 changes: 0 additions & 51 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx --no-install commitlint --edit .git/COMMIT_EDITMSG
commitlint --edit .git/COMMIT_EDITMSG
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx --no-install lint-staged
lint-staged
5 changes: 1 addition & 4 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"{,e2e/**/,projects/**/,src/**/}*.{js,ts,tsx,css}": [
"eslint --fix",
"prettier --write -u"
],
"{,e2e/**/,projects/**/,src/**/}*.{js,ts,tsx,css}": ["prettier --write -u"],
"{,e2e/**/,projects/**/,src/**/}*.{md,json,html,css,scss}": [
"prettier --write -u"
]
Expand Down
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,24 @@ imports: [
<form [formGroup]="group">
<mat-form-field>
<mat-placeholder>Start DateTime</mat-placeholder>
<mat-datetimepicker-toggle [for]="datetimePicker" matSuffix></mat-datetimepicker-toggle>
<mat-datetimepicker #datetimePicker type="datetime" openOnFocus="true" timeInterval="5"> </mat-datetimepicker>
<input matInput formControlName="start" [matDatetimepicker]="datetimePicker" required autocomplete="false" />
<mat-datetimepicker-toggle
[for]="datetimePicker"
matSuffix
></mat-datetimepicker-toggle>
<mat-datetimepicker
#datetimePicker
type="datetime"
openOnFocus="true"
timeInterval="5"
>
</mat-datetimepicker>
<input
matInput
formControlName="start"
[matDatetimepicker]="datetimePicker"
required
autocomplete="false"
/>
</mat-form-field>
</form>
```
Expand Down Expand Up @@ -178,10 +193,10 @@ providers: [
## Theming

```scss
@import '@mat-datetimepicker/core/datetimepicker/datetimepicker-theme.scss';
@use '@mat-datetimepicker/core/datetimepicker/datetimepicker-theme.scss';

// Using the $theme variable from the pre-built theme you can call the theming function
@include mat-datetimepicker-theme($theme);
@include datetimepicker-theme.mat-datetimepicker-theme($theme);
```

@see [src/styles.scss](src/styles.scss)
Expand Down
10 changes: 6 additions & 4 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"root": "projects/core",
"sourceRoot": "projects/core/src",
"projectType": "library",
"prefix": "lib",
"prefix": "mat-datetimepicker",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
Expand Down Expand Up @@ -131,7 +131,8 @@
"lintFilePatterns": [
"projects/core/**/*.ts",
"projects/core/**/*.html"
]
],
"eslintConfig": "projects/core/eslint.config.js"
}
}
}
Expand All @@ -140,7 +141,7 @@
"root": "projects/moment",
"sourceRoot": "projects/moment/src",
"projectType": "library",
"prefix": "lib",
"prefix": "mat-datetimepicker-moment",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
Expand Down Expand Up @@ -168,7 +169,8 @@
"lintFilePatterns": [
"projects/moment/**/*.ts",
"projects/moment/**/*.html"
]
],
"eslintConfig": "projects/moment/eslint.config.js"
}
}
}
Expand Down
52 changes: 52 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// @ts-check
const eslint = require('@eslint/js');
const tseslint = require('typescript-eslint');
const angular = require('angular-eslint');
const simpleImportSort = require('eslint-plugin-simple-import-sort');

module.exports = tseslint.config(
{
files: ['**/*.ts'],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
...angular.configs.tsRecommended,
],
plugins: {
'simple-import-sort': simpleImportSort,
},
processor: angular.processInlineTemplates,
rules: {
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'app',
style: 'camelCase',
},
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'app',
style: 'kebab-case',
},
],
'@typescript-eslint/no-explicit-any': ['off'],
'simple-import-sort/imports': ['error'],
'simple-import-sort/exports': ['error'],
},
},
{
files: ['**/*.html'],
extends: [
...angular.configs.templateRecommended,
...angular.configs.templateAccessibility,
],
rules: {
'@angular-eslint/template/interactive-supports-focus': ['warn'],
},
}
);
Loading

0 comments on commit fc596ee

Please sign in to comment.