Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uninstall nx and remove related packages and files #672

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 6 additions & 24 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": "*.json",
Expand All @@ -16,15 +15,9 @@
"parser": "@typescript-eslint/parser",
"project": "./tsconfig.json"
},
"overrides": [
{
"files": ["vite.config.ts"],
"rules": {
"import/no-default-export": "off"
}
}
],

"rules": {
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/consistent-type-imports": "error",
"import/no-extraneous-dependencies": "off",
"import/order": [
Expand All @@ -48,21 +41,10 @@
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
"env": {
"jest": true
},
"rules": {}
"files": ["**/vite.config.ts"],
"rules": {
"import/no-default-export": "off"
}
}
]
}
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,10 @@ testem.log
.DS_Store
Thumbs.db

.nx/cache

# Next.js
.next
out

# Nx
.nx

# Files that (sometimes) contain secrets
*.der
*.key
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ build
coverage
dist
tmp
.nx/cache
.next

# The indentation of dependency JSON files should only be updated by `yarn` and
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/tsconfig.json
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alimpens do you know if it is necessary that the admin has its own ts.config.ts file?

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"types": ["vite/client", "jest", "node"],
"strict": true
},
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx", "./vite.config.ts", "./vitest.setup.ts"]
}
2 changes: 1 addition & 1 deletion apps/admin/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
},
test: {
coverage: {
enabled: true,
provider: 'istanbul',
},
globals: true,
environment: 'jsdom',
Expand Down
14 changes: 4 additions & 10 deletions docs/0006-monorepo-tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,11 @@ You can find our internal libraries in the `/libs` directory.
By separating our code like this, we hope to stimulate organizing our source code and logic into smaller,
more focused and highly cohesive units.

## Nx
## PNPM

We use [Nx](https://nx.dev/) to stay on top of the different apps and libs in this project.
Nx does a lot of things, but we mainly use it for these reasons:

- It’s easy to scaffold a new app or lib, with a preconfigured setup for things like linting and testing.
- Because it’s easy to start a new lib, it is easier to move code out of your apps and into libs,
resulting in a more modular organisation of our code.
[Nx recommends having roughly 20% of your code in apps, and 80% in libs](https://nx.dev/concepts/more-concepts/applications-and-libraries#mental-model).
- It allows you to easily define scripts in the root which you can run for all apps.
- Nx caches builds and linting and testing runs, which means you spend less time waiting for these to finish.
We use [PNPM](https://pnpm.io/) as package manager of our monorepo. It uses workspaces to manage dependecies
and let them interact with each other. Previously we used NX to manage our monorepo but faced a lot of issues
and inconsistencies with it. Therefore we moved to PNPM.

### Importing from local libraries

Expand Down
5 changes: 0 additions & 5 deletions jest.config.ts

This file was deleted.

3 changes: 0 additions & 3 deletions jest.preset.js

This file was deleted.

72 changes: 0 additions & 72 deletions nx.json

This file was deleted.

13 changes: 2 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/alimpens/meldingen-frontend-nx.git"
"url": "git+https://github.com/amsterdam/meldingen-frontend.git"
},
"scripts": {
"build": "pnpm run /^build:/",
Expand Down Expand Up @@ -52,14 +52,6 @@
"@babel/core": "7.26.0",
"@babel/preset-react": "7.26.3",
"@hey-api/openapi-ts": "0.61.2",
"@nx/eslint": "20.3.1",
"@nx/eslint-plugin": "20.3.1",
"@nx/jest": "20.3.1",
"@nx/js": "20.3.1",
"@nx/react": "20.3.1",
"@nx/vite": "20.3.1",
"@nx/web": "20.3.1",
"@nx/workspace": "20.3.1",
"@swc-node/register": "1.10.9",
"@swc/core": "1.10.7",
"@swc/helpers": "0.5.15",
Expand Down Expand Up @@ -89,12 +81,11 @@
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"jsdom": "26.0.0",
"jsonc-eslint-parser": "2.4.0",
"lint-staged": "15.3.0",
"markdownlint-cli": "0.43.0",
"msw": "2.7.0",
"npm-check-updates": "17.1.13",
"nx": "20.3.1",
"nx-stylelint": "18.0.0",
"prettier": "3.4.2",
"stylelint": "16.13.2",
"stylelint-config-css-modules": "4.4.0",
Expand Down
Loading
Loading