Skip to content

Commit 20f744b

Browse files
committed
fix(igx-ts): update igx-ts templates
1 parent 9252ef3 commit 20f744b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+263
-308
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true,
4+
"overrides": [
5+
{
6+
"files": "*.html",
7+
"options": {
8+
"parser": "angular"
9+
}
10+
}
11+
]
12+
}

packages/igx-templates/igx-ts/projects/_base/files/angular.json

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
33
"version": 1,
4+
"cli": {
5+
"packageManager": "npm",
6+
"schematicCollections": ["angular-eslint"]
7+
},
48
"newProjectRoot": "projects",
59
"projects": {
610
"<%=dashName%>": {
@@ -20,9 +24,7 @@
2024
"outputPath": "dist/<%=dashName%>",
2125
"index": "src/index.html",
2226
"browser": "src/main.ts",
23-
"polyfills": [
24-
"zone.js"
25-
],
27+
"polyfills": ["zone.js"],
2628
"tsConfig": "tsconfig.app.json",
2729
"inlineStyleLanguage": "scss",
2830
"assets": [
@@ -32,13 +34,9 @@
3234
"styles": [
3335
"src/styles.scss"<%=DefaultTheme%>
3436
],
35-
"scripts": [
36-
"./node_modules/hammerjs/hammer.min.js"
37-
],
37+
"scripts": ["./node_modules/hammerjs/hammer.min.js"],
3838
"stylePreprocessorOptions": {
39-
"includePaths": [
40-
"node_modules"
41-
]
39+
"includePaths": ["node_modules"]
4240
}
4341
},
4442
"configurations": {
@@ -90,43 +88,15 @@
9088
}
9189
},
9290
"test": {
93-
"builder": "@angular/build:karma",
94-
"options": {
95-
"polyfills": [
96-
"zone.js",
97-
"zone.js/testing"
98-
],
99-
"tsConfig": "tsconfig.spec.json",
100-
"inlineStyleLanguage": "scss",
101-
"assets": [
102-
"src/favicon.ico",
103-
"src/assets"
104-
],
105-
"styles": [
106-
"src/styles.scss"
107-
],
108-
"stylePreprocessorOptions": {
109-
"includePaths": [
110-
"node_modules"
111-
]
112-
}
113-
}
91+
"builder": "@angular/build:unit-test"
11492
},
11593
"lint": {
11694
"builder": "@angular-eslint/builder:lint",
11795
"options": {
118-
"lintFilePatterns": [
119-
"src/**/*.ts",
120-
"src/**/*.html"
121-
]
96+
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
12297
}
12398
}
12499
}
125100
}
126-
},
127-
"cli": {
128-
"schematicCollections": [
129-
"angular-eslint"
130-
]
131101
}
132102
}
Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// @ts-check
2-
const eslint = require("@eslint/js");
3-
const { defineConfig } = require("eslint/config");
4-
const tseslint = require("typescript-eslint");
5-
const angular = require("angular-eslint");
2+
const eslint = require('@eslint/js');
3+
const { defineConfig } = require('eslint/config');
4+
const tseslint = require('typescript-eslint');
5+
const angular = require('angular-eslint');
66

77
module.exports = defineConfig([
88
{
9-
files: ["**/*.ts"],
9+
files: ['**/*.ts'],
1010
extends: [
1111
eslint.configs.recommended,
1212
tseslint.configs.recommended,
@@ -15,35 +15,33 @@ module.exports = defineConfig([
1515
],
1616
processor: angular.processInlineTemplates,
1717
rules: {
18-
"@angular-eslint/directive-selector": [
19-
"error",
18+
'@angular-eslint/directive-selector': [
19+
'error',
2020
{
21-
type: "attribute",
22-
prefix: "app",
23-
style: "camelCase",
21+
type: 'attribute',
22+
prefix: 'app',
23+
style: 'camelCase',
2424
},
2525
],
26-
"@angular-eslint/component-selector": [
27-
"error",
26+
'@angular-eslint/component-selector': [
27+
'error',
2828
{
29-
type: "element",
30-
prefix: "app",
31-
style: "kebab-case",
29+
type: 'element',
30+
prefix: 'app',
31+
style: 'kebab-case',
3232
},
3333
],
3434
// Relax rules
35-
"@typescript-eslint/no-explicit-any": "off",
36-
"@angular-eslint/prefer-inject": "off",
35+
'@typescript-eslint/no-explicit-any': 'off',
36+
'@angular-eslint/prefer-inject': 'off',
3737
},
3838
},
3939
{
40-
files: ["**/*.html"],
41-
extends: [
42-
angular.configs.templateRecommended
43-
],
40+
files: ['**/*.html'],
41+
extends: [angular.configs.templateRecommended],
4442
rules: {
4543
// Relax rules
46-
"@angular-eslint/template/eqeqeq": "off"
44+
'@angular-eslint/template/eqeqeq': 'off'
4745
},
4846
}
4947
]);

packages/igx-templates/igx-ts/projects/_base/files/package.json

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,6 @@
99
"test": "node --max-old-space-size=8192 ./node_modules/@angular/cli/bin/ng test",
1010
"lint": "ng lint"
1111
},
12-
"prettier": {
13-
"printWidth": 100,
14-
"singleQuote": true,
15-
"overrides": [
16-
{
17-
"files": "*.html",
18-
"options": {
19-
"parser": "angular"
20-
}
21-
}
22-
]
23-
},
2412
"private": true,
2513
"dependencies": {
2614
"@angular/animations": "~21.2.0",
@@ -36,23 +24,20 @@
3624
"minireset.css": "~0.0.7",
3725
"rxjs": "~7.8.1",
3826
"tslib": "~2.8.1",
39-
"zone.js": "~0.15.0"
27+
"zone.js": "~0.16.0"
4028
},
4129
"devDependencies": {
42-
"@angular/build": "~21.2.0",
43-
"@angular/cli": "~21.2.0",
30+
"@angular/build": "~21.2.1",
31+
"@angular/cli": "~21.2.1",
4432
"@angular/compiler-cli": "~21.2.0",
45-
"@types/jasmine": "~5.1.4",
46-
"angular-eslint": "~21.2.0",
47-
"eslint": "~9.39.1",
33+
"@eslint/js": "^10.0.1",
34+
"angular-eslint": "~21.3.0",
35+
"eslint": "^10.0.2",
4836
"igniteui-cli": "~<%=cliVersion%>",
49-
"jasmine-core": "~5.12.1",
50-
"karma": "~6.4.4",
51-
"karma-chrome-launcher": "~3.2.0",
52-
"karma-coverage": "~2.2.1",
53-
"karma-jasmine": "~5.1.0",
54-
"karma-jasmine-html-reporter": "~2.1.0",
55-
"typescript": "~5.9.3",
56-
"typescript-eslint": "~8.47.0"
37+
"jsdom": "^28.0.0",
38+
"prettier": "^3.8.1",
39+
"typescript": "~5.9.2",
40+
"typescript-eslint": "8.56.1",
41+
"vitest": "^4.0.8"
5742
}
5843
}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<!doctype html>
22
<html lang="en">
3-
<head>
4-
<meta charset="utf-8">
5-
<title>Ignite UI for Angular</title>
6-
<base href="/">
7-
<meta name="viewport" content="width=device-width, initial-scale=1">
8-
<link rel="icon" type="image/x-icon" href="favicon.ico">
9-
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
10-
</head>
11-
<body class="ig-typography ig-scrollbar">
12-
<app-root></app-root>
13-
</body>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Ignite UI for Angular</title>
6+
<base href="/">
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
<link rel="icon" type="image/x-icon" href="favicon.ico">
9+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
10+
</head>
11+
<body class="ig-typography ig-scrollbar">
12+
<app-root></app-root>
13+
</body>
1414
</html>

packages/igx-templates/igx-ts/projects/_base/files/tsconfig.app.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
1+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
23
{
34
"extends": "./tsconfig.json",
45
"compilerOptions": {

packages/igx-templates/igx-ts/projects/_base/files/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
1+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
23
{
34
"compileOnSave": false,
45
"compilerOptions": {

packages/igx-templates/igx-ts/projects/_base/files/tsconfig.spec.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
1+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
23
{
34
"extends": "./tsconfig.json",
45
"compilerOptions": {
56
"outDir": "./out-tsc/spec",
67
"types": [
7-
"jasmine"
8+
"vitest/globals"
89
]
910
},
1011
"include": [
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { Routes } from '@angular/router';
2-
import { HomeComponent } from './home/home.component';
2+
import { Home } from './home/home';
33
import { NotFound } from './error-routing/not-found/not-found';
44
import { UncaughtError } from './error-routing/error/uncaught-error';
55

66
export const routes: Routes = [
77
{ path: '', redirectTo: '/home', pathMatch: 'full'},
8-
{ path: 'home', component: HomeComponent, data: { text: 'Home' }},
8+
{ path: 'home', component: Home, data: { text: 'Home' }},
99
{ path: 'error', component: UncaughtError },
1010
{ path: '**', component: NotFound } // must always be last
1111
];

packages/igx-templates/igx-ts/projects/_base_with_home/files/src/app/home/home.component.spec.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)