Skip to content

Commit

Permalink
fix: add missing scripts & fix biome config + add dummy test to pass ci
Browse files Browse the repository at this point in the history
  • Loading branch information
elcoosp committed Nov 28, 2024
1 parent b0360b8 commit bcf4523
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 17 deletions.
1 change: 1 addition & 0 deletions cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ words:
- lefthook
- oxlint
- repobeats
- tseslint
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
2 changes: 2 additions & 0 deletions packages/mm-rslib/dummy.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { test } from 'vitest'
test('index', () => {})
8 changes: 7 additions & 1 deletion packages/mm-rslib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion packages/mm-rslib/template/rslib.config.ts
Original file line number Diff line number Diff line change
@@ -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' }))
3 changes: 3 additions & 0 deletions packages/mm-vite-react/dummy.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { test } from 'vitest'

test('index', () => {})
8 changes: 7 additions & 1 deletion packages/mm-vite-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
4 changes: 1 addition & 3 deletions packages/mm-vite-react/template/biome.json
Original file line number Diff line number Diff line change
@@ -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"]
}
4 changes: 2 additions & 2 deletions packages/mm-vite-react/template/eslint.config.ts
Original file line number Diff line number Diff line change
@@ -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'] },
{
Expand Down
2 changes: 1 addition & 1 deletion packages/mm-vite-react/template/src/App.tsx
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion packages/mm-vite-react/template/vite.config.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bcf4523

Please sign in to comment.