diff --git a/cspell.yml b/cspell.yml index ec62941..1384dfd 100644 --- a/cspell.yml +++ b/cspell.yml @@ -9,3 +9,4 @@ words: - lefthook - oxlint - repobeats + - tseslint diff --git a/package.json b/package.json index 8f845b9..aafe5e7 100644 --- a/package.json +++ b/package.json @@ -19,14 +19,14 @@ "changeset": "changeset" }, "devDependencies": { - "turbo": "^2.3.2", - "@elcoosp-configs/rslib": "2", - "@elcoosp-configs/biome": "0", - "@rslib/core": "^0.1.0", - "vitest": "^2.1.6", "@biomejs/biome": "^1.9.3", "@changesets/changelog-github": "^0.5.0", "@changesets/cli": "^2.27.10", - "lefthook": "^1.8.4" + "@elcoosp-configs/biome": "^0.0.1", + "@elcoosp-configs/rslib": "2", + "@rslib/core": "^0.1.0", + "lefthook": "^1.8.4", + "turbo": "^2.3.2", + "vitest": "^2.1.6" } } diff --git a/packages/mm-rslib/dummy.test.ts b/packages/mm-rslib/dummy.test.ts new file mode 100644 index 0000000..9d9be0a --- /dev/null +++ b/packages/mm-rslib/dummy.test.ts @@ -0,0 +1,2 @@ +import { test } from 'vitest' +test('index', () => {}) diff --git a/packages/mm-rslib/package.json b/packages/mm-rslib/package.json index afea30d..751644a 100644 --- a/packages/mm-rslib/package.json +++ b/packages/mm-rslib/package.json @@ -6,6 +6,12 @@ "author": "", "license": "MIT", "scripts": { - "fmt": "biome format --write" + "build": "rslib build", + "dev": "rslib build --watch", + "check": "biome check --write", + "fmt": "biome format --write", + "test": "vitest run", + "test:cov": "vitest run --coverage", + "test:watch": "vitest run --watch" } } diff --git a/packages/mm-rslib/template/rslib.config.ts b/packages/mm-rslib/template/rslib.config.ts index 68d6628..0866477 100644 --- a/packages/mm-rslib/template/rslib.config.ts +++ b/packages/mm-rslib/template/rslib.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from '@rslib/core' import { createRsLibConfig } from '@elcoosp-configs/rslib' +import { defineConfig } from '@rslib/core' export default defineConfig(async () => createRsLibConfig({ preset: 'dual' })) diff --git a/packages/mm-vite-react/dummy.test.ts b/packages/mm-vite-react/dummy.test.ts new file mode 100644 index 0000000..8ba6708 --- /dev/null +++ b/packages/mm-vite-react/dummy.test.ts @@ -0,0 +1,3 @@ +import { test } from 'vitest' + +test('index', () => {}) diff --git a/packages/mm-vite-react/package.json b/packages/mm-vite-react/package.json index 625f2c7..6c4a952 100644 --- a/packages/mm-vite-react/package.json +++ b/packages/mm-vite-react/package.json @@ -6,6 +6,12 @@ "author": "", "license": "MIT", "scripts": { - "fmt": "biome format --write" + "build": "rslib build", + "dev": "rslib build --watch", + "check": "biome check --write", + "fmt": "biome format --write", + "test": "vitest run", + "test:cov": "vitest run --coverage", + "test:watch": "vitest run --watch" } } diff --git a/packages/mm-vite-react/template/biome.json b/packages/mm-vite-react/template/biome.json index ab31ad6..7701719 100644 --- a/packages/mm-vite-react/template/biome.json +++ b/packages/mm-vite-react/template/biome.json @@ -1,6 +1,4 @@ { "$schema": "https://biomejs.dev/schemas/1.8.0/schema.json", - "extends": [ - "https://github.com/elcoosp/elcoosp-configs/blob/main/packages/biome/src/fmt-base.json" - ] + "extends": ["node_modules/@elcoosp-configs/biome/src/fmt-base.json"] } diff --git a/packages/mm-vite-react/template/eslint.config.ts b/packages/mm-vite-react/template/eslint.config.ts index ee3baa1..b1ee96e 100644 --- a/packages/mm-vite-react/template/eslint.config.ts +++ b/packages/mm-vite-react/template/eslint.config.ts @@ -1,8 +1,8 @@ import js from '@eslint/js' -import globals from 'globals' -import tseslint from 'typescript-eslint' import reactHooks from 'eslint-plugin-react-hooks' import reactRefresh from 'eslint-plugin-react-refresh' +import globals from 'globals' +import tseslint from 'typescript-eslint' export default tseslint.config( { ignores: ['dist'] }, { diff --git a/packages/mm-vite-react/template/src/App.tsx b/packages/mm-vite-react/template/src/App.tsx index b8de93e..0b69a27 100644 --- a/packages/mm-vite-react/template/src/App.tsx +++ b/packages/mm-vite-react/template/src/App.tsx @@ -1,7 +1,7 @@ import './App.css' -import reactLogo from './assets/react.svg' import { useState } from 'react' import viteLogo from '/vite.svg' +import reactLogo from './assets/react.svg' function App() { const [count, setCount] = useState(0) diff --git a/packages/mm-vite-react/template/vite.config.ts b/packages/mm-vite-react/template/vite.config.ts index 8b0f57b..9982072 100644 --- a/packages/mm-vite-react/template/vite.config.ts +++ b/packages/mm-vite-react/template/vite.config.ts @@ -1,5 +1,5 @@ -import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' +import { defineConfig } from 'vite' // https://vite.dev/config/ export default defineConfig({ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 57d5904..1d9e329 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,7 +18,7 @@ importers: specifier: ^2.27.10 version: 2.27.10 '@elcoosp-configs/biome': - specifier: '0' + specifier: ^0.0.1 version: 0.0.1 '@elcoosp-configs/rslib': specifier: '2'