Skip to content

Commit

Permalink
feat: Update ESLint rules to include '@typescript-eslint/no-extra-sem…
Browse files Browse the repository at this point in the history
…i' and disable 'no-extra-semi', update Angular packages to version 18.0.3 and Capacitor to version 6.1.0 and update various packages to their latest versions
  • Loading branch information
silicia-apps committed Jun 18, 2024
1 parent 69cac20 commit 282db51
Show file tree
Hide file tree
Showing 7 changed files with 5,232 additions and 4,012 deletions.
10 changes: 8 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ Thumbs.db

.angular

.nx/cache
.nx/cache
.nx/workspace-data
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
/coverage
.angular

/.nx/cache
/.nx/cache
/.nx/workspace-data
120 changes: 50 additions & 70 deletions libs/core/src/lib/core.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '@angular/core';

import { CommonModule } from '@angular/common';
import { HttpClientModule, HttpClient } from '@angular/common/http';
import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';

import { IonicModule } from '@ionic/angular';
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
Expand Down Expand Up @@ -51,83 +51,63 @@ export function createTranslateLoader(http: HttpClient) {
return new TranslateHttpLoader(http);
}

@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [...SioCoreComponents],
imports: [
HttpClientModule,
CommonModule,
FormsModule,
RouterModule,
MaskitoModule,
ReactiveFormsModule,
IonicModule,
ScrollingModule,
TranslateModule.forChild({
extend: true,
loader: {
provide: TranslateLoader,
useFactory: createTranslateLoader,
deps: [HttpClient],
},
}),
NgxsFormPluginModule,
],
exports: [...SioCoreComponents, IonicModule, TranslateModule],
})
@NgModule({ schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [...SioCoreComponents],
exports: [...SioCoreComponents, IonicModule, TranslateModule], imports: [CommonModule,
FormsModule,
RouterModule,
MaskitoModule,
ReactiveFormsModule,
IonicModule,
ScrollingModule,
TranslateModule.forChild({
extend: true,
loader: {
provide: TranslateLoader,
useFactory: createTranslateLoader,
deps: [HttpClient],
},
}),
NgxsFormPluginModule], providers: [provideHttpClient(withInterceptorsFromDi())] })
export class SioCommonModule {

}

@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [],
imports: [
HttpClientModule,
CommonModule,
FormsModule,
RouterModule,
ReactiveFormsModule,
IonicModule,
TranslateModule.forChild({
extend: true,
loader: {
provide: TranslateLoader,
useFactory: createTranslateLoader,
deps: [HttpClient],
},
}),
NgxsFormPluginModule,
],
exports: [IonicModule, TranslateModule],
})
@NgModule({ schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [],
exports: [IonicModule, TranslateModule], imports: [CommonModule,
FormsModule,
RouterModule,
ReactiveFormsModule,
IonicModule,
TranslateModule.forChild({
extend: true,
loader: {
provide: TranslateLoader,
useFactory: createTranslateLoader,
deps: [HttpClient],
},
}),
NgxsFormPluginModule], providers: [provideHttpClient(withInterceptorsFromDi())] })
export class SioMinimalModule {

}

@NgModule({
imports: [
CommonModule,
HttpClientModule,
TranslateModule.forRoot(),
LoggerModule.forRoot(),
FormsModule,
ReactiveFormsModule,
IonicModule.forRoot(),
NgxsModule.forRoot(sioCoreStates, {
developmentMode: true,
executionStrategy: NoopNgxsExecutionStrategy,
}),
NgxsLoggerPluginModule.forRoot(),
NgxsDataPluginModule.forRoot(),
NgxsReduxDevtoolsPluginModule.forRoot(),
NgxsRouterPluginModule.forRoot(),
NgxsFormPluginModule.forRoot(),

],
providers: [],
exports: [TranslateModule],
})
@NgModule({ exports: [TranslateModule], imports: [CommonModule,
TranslateModule.forRoot(),
LoggerModule.forRoot(),
FormsModule,
ReactiveFormsModule,
IonicModule.forRoot(),
NgxsModule.forRoot(sioCoreStates, {
developmentMode: true,
executionStrategy: NoopNgxsExecutionStrategy,
}),
NgxsLoggerPluginModule.forRoot(),
NgxsDataPluginModule.forRoot(),
NgxsReduxDevtoolsPluginModule.forRoot(),
NgxsRouterPluginModule.forRoot(),
NgxsFormPluginModule.forRoot()], providers: [provideHttpClient(withInterceptorsFromDi())] })
export class SioCoreModule extends EnsureModuleLoadedOnceGuard {
constructor(@Optional() @SkipSelf() parentModule: SioCoreModule) {
super(parentModule);
Expand Down
76 changes: 70 additions & 6 deletions migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,78 @@
"migrations": [
{
"cli": "nx",
"version": "18.2.0-beta.0",
"version": "19.2.0-beta.2",
"description": "Updates the default workspace data directory to .nx/workspace-data",
"implementation": "./src/migrations/update-19-2-0/move-workspace-data-directory",
"package": "nx",
"name": "19-2-0-move-graph-cache-directory"
},
{
"cli": "nx",
"version": "19.2.2-beta.0",
"description": "Updates the nx wrapper.",
"implementation": "./src/migrations/update-17-3-0/update-nxw",
"package": "nx",
"name": "19-2-2-update-nx-wrapper"
},
{
"version": "19.2.4-beta.0",
"description": "Set project name in nx.json explicitly",
"implementation": "./src/migrations/update-19-2-4/set-project-name",
"x-repair-skip": true,
"package": "nx",
"name": "19-2-4-set-project-name"
},
{
"cli": "nx",
"version": "19.1.0-beta.6",
"description": "Migrate no-extra-semi rules into user config, out of nx extendable configs",
"implementation": "./src/migrations/update-19-1-0-migrate-no-extra-semi/migrate-no-extra-semi",
"package": "@nx/eslint-plugin",
"name": "update-19-1-0-rename-no-extra-semi"
},
{
"cli": "nx",
"version": "19.1.0-beta.2",
"requires": {
"@angular/core": ">=17.3.0"
"@angular/core": ">=18.0.0"
},
"description": "Update the @angular/cli package version to ~17.3.0.",
"factory": "./src/migrations/update-18-2-0/update-angular-cli",
"description": "Update the @angular/cli package version to ~18.0.0.",
"factory": "./src/migrations/update-19-1-0/update-angular-cli",
"package": "@nx/angular",
"name": "update-angular-cli-version-17-3-0"
"name": "update-angular-cli-version-18-0-0"
},
{
"cli": "nx",
"version": "19.2.1-beta.0",
"requires": {
"@angular-eslint/eslint-plugin": ">=18.0.0"
},
"description": "Installs the '@typescript-eslint/utils' package when having installed '@angular-eslint/eslint-plugin' or '@angular-eslint/eslint-plugin-template' with version >=18.0.0.",
"factory": "./src/migrations/update-19-2-1/add-typescript-eslint-utils",
"package": "@nx/angular",
"name": "add-typescript-eslint-utils"
},
{
"version": "18.0.0",
"description": "Updates two-way bindings that have an invalid expression to use the longform expression instead.",
"factory": "./migrations/invalid-two-way-bindings/bundle",
"package": "@angular/core",
"name": "invalid-two-way-bindings"
},
{
"version": "18.0.0",
"description": "Replace deprecated HTTP related modules with provider functions",
"factory": "./migrations/http-providers/bundle",
"package": "@angular/core",
"name": "migration-http-providers"
},
{
"version": "18.0.0-0",
"description": "Updates the Angular CDK to v18",
"factory": "./ng-update/index#updateToV18",
"package": "@angular/cdk",
"name": "migration-v18"
}
]
}
}
Loading

0 comments on commit 282db51

Please sign in to comment.