Skip to content

Commit 098947f

Browse files
committed
chore(nx): Upgrade to Nx 18 - align js/tsc configs
1 parent de8079b commit 098947f

23 files changed

+84
-102
lines changed

libs/mf/.eslintrc.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"extends": "../../.eslintrc.json",
2+
"extends": ["../../.eslintrc.base.json"],
33
"ignorePatterns": ["!**/*"],
4-
"rules": {},
54
"overrides": [
65
{
76
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
@@ -14,6 +13,13 @@
1413
{
1514
"files": ["*.js", "*.jsx"],
1615
"rules": {}
16+
},
17+
{
18+
"files": ["*.json"],
19+
"parser": "jsonc-eslint-parser",
20+
"rules": {
21+
"@nx/dependency-checks": "error"
22+
}
1723
}
1824
]
1925
}

libs/mf/jest.config.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
export default {
33
displayName: 'mf',
44
preset: '../../jest.preset.js',
5-
globals: {},
5+
testEnvironment: 'node',
66
transform: {
7-
'^.+\\.[tj]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
7+
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
88
},
9-
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
10-
coverageDirectory: '../../coverage/packages/mf',
11-
testEnvironment: 'node',
9+
moduleFileExtensions: ['ts', 'js', 'html'],
10+
coverageDirectory: '../../coverage/libs/mf',
1211
};

libs/mf/project.json

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@
44
"sourceRoot": "libs/mf/src",
55
"projectType": "library",
66
"targets": {
7-
"lint": {
8-
"executor": "@nx/eslint:lint",
9-
"outputs": ["{options.outputFile}"]
10-
},
11-
"test": {
12-
"executor": "@nx/jest:jest",
13-
"outputs": ["{workspaceRoot}/coverage/libs/mf"],
14-
"options": {
15-
"jestConfig": "libs/mf/jest.config.ts"
16-
}
17-
},
187
"build": {
198
"executor": "@nx/js:tsc",
209
"outputs": ["{options.outputPath}"],

libs/mf/tsconfig.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
{
22
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"module": "commonjs",
5+
"forceConsistentCasingInFileNames": true,
6+
"strict": true,
7+
"noImplicitOverride": true,
8+
"noPropertyAccessFromIndexSignature": true,
9+
"noImplicitReturns": true,
10+
"noFallthroughCasesInSwitch": true
11+
},
312
"files": [],
413
"include": [],
514
"references": [

libs/mf/tsconfig.lib.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4-
"module": "CommonJS",
54
"outDir": "../../dist/out-tsc",
65
"declaration": true,
76
"types": ["node"]
87
},
9-
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"],
10-
"include": ["**/*.ts"]
8+
"include": ["src/**/*.ts"],
9+
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
1110
}

libs/mf/tsconfig.spec.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,9 @@
66
"types": ["jest", "node"]
77
},
88
"include": [
9-
"**/*.spec.ts",
10-
"**/*.test.ts",
11-
"**/*.spec.tsx",
12-
"**/*.test.tsx",
13-
"**/*.spec.js",
14-
"**/*.test.js",
15-
"**/*.spec.jsx",
16-
"**/*.test.jsx",
17-
"**/*.d.ts",
18-
"jest.config.ts"
9+
"jest.config.ts",
10+
"src/**/*.test.ts",
11+
"src/**/*.spec.ts",
12+
"src/**/*.d.ts"
1913
]
2014
}

libs/native-federation-core/.eslintrc.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": ["../../.eslintrc.json"],
2+
"extends": ["../../.eslintrc.base.json"],
33
"ignorePatterns": ["!**/*"],
44
"overrides": [
55
{
@@ -13,6 +13,13 @@
1313
{
1414
"files": ["*.js", "*.jsx"],
1515
"rules": {}
16+
},
17+
{
18+
"files": ["*.json"],
19+
"parser": "jsonc-eslint-parser",
20+
"rules": {
21+
"@nx/dependency-checks": "error"
22+
}
1623
}
1724
]
1825
}

libs/native-federation-core/jest.config.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22
export default {
33
displayName: 'native-federation-core',
44
preset: '../../jest.preset.js',
5-
globals: {},
5+
testEnvironment: 'node',
66
transform: {
7-
'^.+\\.[tj]s$': [
8-
'ts-jest',
9-
{
10-
tsconfig: '<rootDir>/tsconfig.spec.json',
11-
},
12-
],
7+
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
138
},
149
moduleFileExtensions: ['ts', 'js', 'html'],
1510
coverageDirectory: '../../coverage/libs/native-federation-core',

libs/native-federation-core/project.json

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,6 @@
2727
"target": "build"
2828
}
2929
]
30-
},
31-
"lint": {
32-
"executor": "@nx/eslint:lint",
33-
"outputs": ["{options.outputFile}"]
34-
},
35-
"test": {
36-
"executor": "@nx/jest:jest",
37-
"outputs": ["{workspaceRoot}/coverage/libs/native-federation-core"],
38-
"options": {
39-
"jestConfig": "libs/native-federation-core/jest.config.ts"
40-
}
4130
}
4231
},
4332
"tags": []

libs/native-federation-core/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"noImplicitOverride": true,
88
"noPropertyAccessFromIndexSignature": true,
99
"noImplicitReturns": true,
10-
"noFallthroughCasesInSwitch": true,
11-
"esModuleInterop": true
10+
"noFallthroughCasesInSwitch": true
1211
},
1312
"files": [],
1413
"include": [],

0 commit comments

Comments
 (0)