Skip to content

Commit 0f8cc6b

Browse files
committed
chore: migrate workspace to Nx 23.1
Squash of the Nx 23.1 migration commits: - checkpoint before running migrations (dependency updates) - 23-0-0-add-migrate-runs-to-git-ignore - change-detection-eager - http-xhr-backend - strict-templates-default - strict-safe-navigation-narrow - update-23-1-0-convert-to-flat-config - update-23-1-0-remove-conflicting-extended-diagnostics Instead of keeping the 23-1-0-add-ignore-deprecations-for-ts6 migration's "ignoreDeprecations": "6.0" suppressions, the TS6-deprecated options are fixed directly: baseUrl removed (paths made explicitly relative), tools target bumped es5 -> es2022, and the esModuleInterop: false pin dropped in favor of the TS6 default. The generated migrations.json and tools/ai-migrations docs are not kept.
1 parent 9d74f02 commit 0f8cc6b

29 files changed

Lines changed: 23863 additions & 18516 deletions

.eslintrc.json

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

.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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"baseUrl": ".",
66
"outDir": "../../dist/out-tsc",
77
"paths": {
8-
"~/*": ["src/*"],
8+
"~/*": ["./src/*"],
99
"@nativescript/angular": ["../../packages/angular/src/index.ts"],
1010
"@nativescript/angular/*": ["../../packages/angular/src/*"],
1111
"@nativescript/angular/testing": ["../../packages/angular/testing/src/index.ts"],

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"types": ["node", "jasmine"],
77
"outDir": "../../dist/out-tsc",
88
"paths": {
9-
"~/*": ["src/*"],
9+
"~/*": ["./src/*"],
1010
"@nativescript/angular": ["../../packages/angular/src/index.ts"],
1111
"@nativescript/angular/*": ["../../packages/angular/src/*"],
1212
"@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)