diff --git a/libs/ui/.babelrc b/libs/ui/.babelrc deleted file mode 100644 index 1ea870ea..00000000 --- a/libs/ui/.babelrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "presets": [ - [ - "@nx/react/babel", - { - "runtime": "automatic", - "useBuiltIns": "usage" - } - ] - ], - "plugins": [] -} diff --git a/libs/ui/.eslintrc.json b/libs/ui/.eslintrc.json index a39ac5d0..052a5874 100644 --- a/libs/ui/.eslintrc.json +++ b/libs/ui/.eslintrc.json @@ -1,18 +1,4 @@ { - "extends": ["plugin:@nx/react", "../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - } - ] + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"] } diff --git a/libs/ui/README.md b/libs/ui/README.md index d01cabf1..51bea601 100644 --- a/libs/ui/README.md +++ b/libs/ui/README.md @@ -1,7 +1,3 @@ -# ui +# UI -This library was generated with [Nx](https://nx.dev). - -## Running unit tests - -Run `nx test ui` to execute the unit tests via [Vitest](https://vitest.dev/). +A library of user interface (UI) components. diff --git a/libs/ui/package.json b/libs/ui/package.json new file mode 100644 index 00000000..5057e383 --- /dev/null +++ b/libs/ui/package.json @@ -0,0 +1,12 @@ +{ + "name": "ui", + "version": "0.1.0", + "description": "A library of user interface (UI) components.", + "scripts": { + "lint": "eslint . --ext .ts,.tsx", + "typecheck": "tsc --project ./tsconfig.json --noEmit" + }, + "license": "EUPL-1.2", + "private": true, + "type": "module" +} diff --git a/libs/ui/project.json b/libs/ui/project.json deleted file mode 100644 index 2e3e7d0e..00000000 --- a/libs/ui/project.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "ui", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "libs/ui/src", - "projectType": "library", - "tags": [], - "targets": { - "stylelint": { - "executor": "nx-stylelint:lint", - "outputs": ["{options.outputFile}"], - "options": { - "lintFilePatterns": ["libs/ui/**/*.css"] - } - }, - "typecheck": { - "executor": "nx:run-commands", - "options": { - "command": "tsc -p tsconfig.lib.json --noEmit && tsc -p tsconfig.spec.json --noEmit", - "cwd": "libs/ui", - "forwardAllArgs": false - } - } - } -} diff --git a/libs/ui/tsconfig.json b/libs/ui/tsconfig.json index 3c41f10f..fc0817c0 100644 --- a/libs/ui/tsconfig.json +++ b/libs/ui/tsconfig.json @@ -1,20 +1,11 @@ { + "extends": "../../tsconfig.base.json", "compilerOptions": { + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, "jsx": "react-jsx", - "allowJs": false, - "esModuleInterop": false, - "allowSyntheticDefaultImports": true, - "strict": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.lib.json" - }, - { - "path": "./tsconfig.spec.json" - } - ], - "extends": "../../tsconfig.base.json" + "resolveJsonModule": true, + "strict": true, + "types": ["../../typings/cssmodules.d.ts"] + } } diff --git a/libs/ui/tsconfig.lib.json b/libs/ui/tsconfig.lib.json deleted file mode 100644 index 141b67d1..00000000 --- a/libs/ui/tsconfig.lib.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["node", "@nx/react/typings/cssmodule.d.ts", "@nx/react/typings/image.d.ts"] - }, - "exclude": [ - "**/*.spec.ts", - "**/*.test.ts", - "**/*.spec.tsx", - "**/*.test.tsx", - "**/*.spec.js", - "**/*.test.js", - "**/*.spec.jsx", - "**/*.test.jsx" - ], - "include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"] -} diff --git a/libs/ui/tsconfig.spec.json b/libs/ui/tsconfig.spec.json deleted file mode 100644 index 0edf3f2f..00000000 --- a/libs/ui/tsconfig.spec.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["vitest/globals", "vitest/importMeta", "vite/client", "node", "vitest"] - }, - "include": [ - "vite.config.ts", - "vitest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.test.tsx", - "src/**/*.spec.tsx", - "src/**/*.test.js", - "src/**/*.spec.js", - "src/**/*.test.jsx", - "src/**/*.spec.jsx", - "src/**/*.d.ts" - ] -} diff --git a/libs/ui/vite.config.ts b/libs/ui/vite.config.ts deleted file mode 100644 index bc467a3b..00000000 --- a/libs/ui/vite.config.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin' -import react from '@vitejs/plugin-react' -import { defineConfig } from 'vite' - -export default defineConfig({ - root: __dirname, - cacheDir: '../../node_modules/.vite/libs/ui', - - plugins: [react(), nxViteTsPaths()], - - // Uncomment this if you are using workers. - // worker: { - // plugins: [ nxViteTsPaths() ], - // }, - - test: { - globals: true, - cache: { - dir: '../../node_modules/.vitest', - }, - environment: 'jsdom', - include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], - reporters: ['default'], - coverage: { - reportsDirectory: '../../coverage/libs/ui', - provider: 'v8', - }, - watch: false, - }, -}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 30ed60e7..c54ce14b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -283,6 +283,8 @@ importers: libs/form-renderer: {} + libs/ui: {} + packages: '@adobe/css-tools@4.3.3': diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 24c4e4e1..41a84541 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,5 @@ packages: - - 'libs/form-renderer' - 'libs/form-builder' + - 'libs/form-renderer' + - 'libs/ui' - 'apps/*'