Skip to content

Commit

Permalink
feat: update Nx
Browse files Browse the repository at this point in the history
  • Loading branch information
Lonli-Lokli committed Jun 5, 2024
1 parent 7c7120f commit 38c2fe3
Show file tree
Hide file tree
Showing 15 changed files with 10,776 additions and 14,493 deletions.
18 changes: 12 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
Expand All @@ -23,13 +23,19 @@
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"rules": {}
"extends": ["plugin:@nx/typescript"],
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
"extends": ["plugin:@nx/javascript"],
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ testem.log
# System Files
.DS_Store
Thumbs.db

.nx/cache
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

/dist
/coverage

/.nx/cache
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ pending.unwrap({ failure: () => new Error('Custom')}); // throws custom (Error)
#### `Result#fold`
```typescript
function fold<F, S, D>(onInitial: () => D, onPending: () => D, onFailure: (failure: F) => D, onSuccess: (success: S) => D): S;
function fold<D>(onInitial: () => D, onPending: () => D, onFailure: (failure: F) => D, onSuccess: (success: S) => D): S;
```
- Extracts value from `Result` and converts it to `D` based on the factory
Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getJestProjects } from '@nrwl/jest';
import { getJestProjects } from '@nx/jest';

export default {
projects: getJestProjects(),
Expand Down
2 changes: 1 addition & 1 deletion jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const nxPreset = require('@nrwl/jest/preset').default;
const nxPreset = require('@nx/jest/preset').default;

module.exports = {
...nxPreset,
Expand Down
42 changes: 23 additions & 19 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"npmScope": "lonli-lokli",
"affected": {
"defaultBase": "master"
},
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"]
}
}
},
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
"inputs": ["production", "^production"],
"cache": true
},
"lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"]
"@nx/jest:jest": {
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"cache": true,
"options": {
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
}
},
"test": {
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"]
"@nx/eslint:lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
"cache": true
}
},
"namedInputs": {
Expand All @@ -31,12 +31,16 @@
"!{projectRoot}/.eslintrc.json",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
"!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/jest.config.[jt]s"
"!{projectRoot}/jest.config.[jt]s",
"!{projectRoot}/src/test-setup.[jt]s"
],
"sharedGlobals": []
},
"workspaceLayout": {
"appsDir": "packages",
"libsDir": "packages"
}
},
"nxCloudAccessToken": "MTljYTJkNjktYWI3YS00ZWIyLTlmZTktYjUzMzI5NTI3NTAzfHJlYWQtd3JpdGU=",
"useInferencePlugins": false,
"defaultBase": "master"
}
Loading

0 comments on commit 38c2fe3

Please sign in to comment.