Skip to content

Commit 780e666

Browse files
authored
feat: nx 23 and angular 22 (#175)
1 parent 9d74f02 commit 780e666

30 files changed

Lines changed: 23864 additions & 18540 deletions

.eslintrc.json

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

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
# NativeScript CLI (provides the `ns` binary the nx test executor spawns)
1414
NS_CLI_VERSION: latest
1515
# iOS (runner label is set on the job's `runs-on`, it can't read env)
16-
XCODE_VERSION: "^16.0"
16+
XCODE_VERSION: "^26.0"
1717
# Android
1818
JAVA_VERSION: "21"
1919
ANDROID_API: "34"

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,5 @@ Thumbs.db
5454

5555
.claude/worktrees
5656
.nx/polygraph
57-
.nx/self-healing
57+
.nx/self-healing
58+
.nx/migrate-runs

apps/nativescript-demo-ng/.eslintrc.json

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import baseConfig from '../../eslint.config.mjs';
2+
import nx from '@nx/eslint-plugin';
3+
4+
export default [
5+
...baseConfig,
6+
...nx.configs['flat/angular'],
7+
{
8+
files: ['**/*.ts'],
9+
rules: {
10+
'@angular-eslint/directive-selector': [
11+
'warn',
12+
{
13+
type: 'attribute',
14+
prefix: '',
15+
style: 'camelCase',
16+
},
17+
],
18+
'@angular-eslint/component-selector': [
19+
'warn',
20+
{
21+
type: 'element',
22+
prefix: '',
23+
style: 'kebab-case',
24+
},
25+
],
26+
'@typescript-eslint/no-explicit-any': 'warn',
27+
'@typescript-eslint/no-unused-vars': 'warn',
28+
},
29+
languageOptions: {
30+
parserOptions: {
31+
project: ['/apps/nativescript-demo-ng/tsconfig.*?.json'],
32+
},
33+
},
34+
},
35+
...nx.configs['flat/angular-template'],
36+
{
37+
files: ['**/*.html'],
38+
rules: {
39+
// Newly enabled by the angular-eslint v22 template preset (flat
40+
// config); not enforced before the ESLint v9 migration, and NativeScript
41+
// UI components (e.g. Label) are not DOM form elements.
42+
'@angular-eslint/template/label-has-associated-control': 'off',
43+
'@angular-eslint/template/elements-content': 'off',
44+
},
45+
},
46+
{
47+
// Use `**/`-prefixed patterns so the ignores apply regardless of the base
48+
// path ESLint resolves them against (the `@nx/eslint:lint` executor runs
49+
// ESLint from the workspace root with this file as an override config,
50+
// which makes project-root-relative patterns like `platforms/**/*` miss).
51+
ignores: ['**/node_modules/**', '**/platforms/**'],
52+
},
53+
];

apps/nativescript-demo-ng/project.json

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,14 @@
3333
},
3434
"debug": {
3535
"executor": "@nativescript/nx:debug",
36+
"dependsOn": ["^build"],
3637
"options": {
3738
"noHmr": true,
3839
"uglify": false,
3940
"release": false,
4041
"forDevice": false,
4142
"prepare": false
42-
},
43-
"dependsOn": [
44-
"^build"
45-
]
43+
}
4644
},
4745
"clean": {
4846
"executor": "@nativescript/nx:clean",
@@ -53,16 +51,12 @@
5351
},
5452
"test": {
5553
"executor": "@nativescript/nx:test",
56-
"outputs": [
57-
"{workspaceRoot}/coverage/apps/nativescript-demo-ng"
58-
],
54+
"outputs": ["{workspaceRoot}/coverage/apps/nativescript-demo-ng"],
55+
"dependsOn": ["^build"],
5956
"options": {
6057
"coverage": false
6158
},
62-
"dependsOn": [
63-
"^build"
64-
],
6559
"configurations": {}
6660
}
6761
}
68-
}
62+
}

apps/nativescript-demo-ng/tsconfig.app.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"target": "es2020",
5-
"baseUrl": ".",
65
"outDir": "../../dist/out-tsc",
76
"paths": {
8-
"~/*": ["src/*"],
7+
"~/*": ["./src/*"],
98
"@nativescript/angular": ["../../packages/angular/src/index.ts"],
109
"@nativescript/angular/*": ["../../packages/angular/src/*"],
1110
"@nativescript/angular/testing": ["../../packages/angular/testing/src/index.ts"],

apps/nativescript-demo-ng/tsconfig.spec.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"target": "es2020",
5-
"baseUrl": ".",
65
"types": ["node", "jasmine"],
76
"outDir": "../../dist/out-tsc",
87
"paths": {
9-
"~/*": ["src/*"],
8+
"~/*": ["./src/*"],
109
"@nativescript/angular": ["../../packages/angular/src/index.ts"],
1110
"@nativescript/angular/*": ["../../packages/angular/src/*"],
1211
"@nativescript/angular/testing": ["../../packages/angular/testing/src/index.ts"],

eslint.config.mjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import nx from '@nx/eslint-plugin';
2+
3+
export default [
4+
...nx.configs['flat/base'],
5+
{
6+
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
7+
// Override or add rules here
8+
rules: {},
9+
languageOptions: {
10+
parserOptions: {},
11+
},
12+
},
13+
...nx.configs['flat/typescript'],
14+
{
15+
files: ['**/*.ts', '**/*.tsx'],
16+
rules: {
17+
'@typescript-eslint/no-inferrable-types': 'off',
18+
},
19+
},
20+
...nx.configs['flat/javascript'],
21+
];

nx.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
}
4343
},
4444
"@nx/eslint:lint": {
45-
"inputs": ["default", "^default", "{workspaceRoot}/.eslintrc.json", "{workspaceRoot}/tools/eslint-rules/**/*"],
45+
"inputs": ["default", "^default", "{workspaceRoot}/eslint.config.mjs", "{workspaceRoot}/tools/eslint-rules/**/*"],
4646
"cache": true
4747
}
4848
},
@@ -56,7 +56,7 @@
5656
],
5757
"production": [
5858
"default",
59-
"!{projectRoot}/.eslintrc.json",
59+
"!{projectRoot}/eslint.config.mjs",
6060
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
6161
"!{projectRoot}/tsconfig.spec.json",
6262
"!{projectRoot}/jest.config.[jt]s",

0 commit comments

Comments
 (0)