feat(MQ-001): initialize pnpm workspace with strict TS lint and vitest
This commit is contained in:
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
node_modules
|
||||
.pnpm-store
|
||||
coverage
|
||||
*.log
|
||||
.env
|
||||
.env.*
|
||||
packages/*/dist
|
||||
32
eslint.config.mjs
Normal file
32
eslint.config.mjs
Normal file
@@ -0,0 +1,32 @@
|
||||
import tseslintPlugin from '@typescript-eslint/eslint-plugin';
|
||||
import tseslintParser from '@typescript-eslint/parser';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['**/dist/**', '**/node_modules/**', '**/coverage/**'],
|
||||
},
|
||||
{
|
||||
files: ['**/*.ts'],
|
||||
languageOptions: {
|
||||
parser: tseslintParser,
|
||||
parserOptions: {
|
||||
projectService: true,
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
'@typescript-eslint': tseslintPlugin,
|
||||
},
|
||||
rules: {
|
||||
...tseslintPlugin.configs['recommended-type-checked'].rules,
|
||||
...tseslintPlugin.configs['stylistic-type-checked'].rules,
|
||||
'@typescript-eslint/consistent-type-imports': [
|
||||
'error',
|
||||
{
|
||||
prefer: 'type-imports',
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-floating-promises': 'error',
|
||||
},
|
||||
},
|
||||
];
|
||||
18
package.json
Normal file
18
package.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "mosaic-queue-workspace",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@10.6.2",
|
||||
"scripts": {
|
||||
"lint": "pnpm -r --if-present lint",
|
||||
"build": "pnpm -r --if-present build",
|
||||
"test": "pnpm -r --if-present test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.13.10",
|
||||
"@typescript-eslint/eslint-plugin": "^8.27.0",
|
||||
"@typescript-eslint/parser": "^8.27.0",
|
||||
"eslint": "^9.22.0",
|
||||
"typescript": "^5.8.2",
|
||||
"vitest": "^3.0.8"
|
||||
}
|
||||
}
|
||||
16
packages/queue/package.json
Normal file
16
packages/queue/package.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "@mosaic/queue",
|
||||
"version": "0.0.1",
|
||||
"description": "Valkey-backed task queue exposed via CLI and MCP",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" \"vitest.config.ts\"",
|
||||
"build": "tsc -p tsconfig.build.json",
|
||||
"test": "vitest run"
|
||||
}
|
||||
}
|
||||
1
packages/queue/src/index.ts
Normal file
1
packages/queue/src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const packageVersion = '0.0.1';
|
||||
9
packages/queue/tests/smoke.test.ts
Normal file
9
packages/queue/tests/smoke.test.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { packageVersion } from '../src/index.js';
|
||||
|
||||
describe('package bootstrap', () => {
|
||||
it('exposes package version constant', () => {
|
||||
expect(packageVersion).toBe('0.0.1');
|
||||
});
|
||||
});
|
||||
10
packages/queue/tsconfig.build.json
Normal file
10
packages/queue/tsconfig.build.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": false,
|
||||
"rootDir": "src",
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["tests/**/*"]
|
||||
}
|
||||
8
packages/queue/tsconfig.json
Normal file
8
packages/queue/tsconfig.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"rootDir": "."
|
||||
},
|
||||
"include": ["src/**/*.ts", "tests/**/*.ts", "vitest.config.ts"]
|
||||
}
|
||||
8
packages/queue/vitest.config.ts
Normal file
8
packages/queue/vitest.config.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
environment: 'node',
|
||||
include: ['tests/**/*.test.ts'],
|
||||
},
|
||||
});
|
||||
1854
pnpm-lock.yaml
generated
Normal file
1854
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
2
pnpm-workspace.yaml
Normal file
2
pnpm-workspace.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
- packages/*
|
||||
19
tsconfig.base.json
Normal file
19
tsconfig.base.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"strict": true,
|
||||
"noImplicitOverride": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"exactOptionalPropertyTypes": true,
|
||||
"useUnknownInCatchVariables": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"resolveJsonModule": true,
|
||||
"declaration": true,
|
||||
"sourceMap": true,
|
||||
"types": ["node"]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user