Skip to content

Commit

Permalink
chore: upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
haiweilian committed Jan 6, 2024
1 parent 2c159fe commit f0c3e1b
Show file tree
Hide file tree
Showing 22 changed files with 139 additions and 262 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint:lint-staged": "lint-staged",
"lint:eslint": "eslint --fix --cache \"**/*.{js,jsx,ts,tsx,vue}\"",
"lint:stylelint": "stylelint --fix --cache \"**/*.{css,scss,less,styl,vue}\"",
"lint:prettier": "prettier --write \"**/*.{css,scss,less,styl,js,jsx,ts,tsx,vue}\"",
"lint:prettier": "prettier --write \"**/*.{css,scss,less,styl,js,jsx,ts,tsx,vue}\"",
"version-packages": "changeset version",
"release": "changeset publish"
},
Expand Down
6 changes: 6 additions & 0 deletions packages/create-lint/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @bfehub/create-lint

## 2.1.0

### Minor Changes

- add vitest vue/react

## 2.0.2

### Patch Changes
Expand Down
4 changes: 3 additions & 1 deletion packages/create-lint/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ async function main() {
message: 'Pick a test preset',
choices: [
{ title: 'none', value: [] },
{ title: 'vitest-vue', value: ['test-jest-vue'] },
{ title: 'vitest-vue', value: ['test-vitest-vue'] },
{ title: 'vitest-react', value: ['test-vitest-react'] },
{ title: 'jest-vue', value: ['test-jest-vue'] },
{ title: 'jest-react', value: ['test-jest-react'] },
],
Expand All @@ -85,6 +86,7 @@ async function main() {
const config = require(path.resolve(tplPath, configPath, 'config.js'))
return config(options)
})
if (!configs.length) return

// 安装依赖包
const pkgNames = Array.from(
Expand Down
4 changes: 2 additions & 2 deletions packages/create-lint/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@bfehub/create-lint",
"type": "commonjs",
"version": "2.0.2",
"version": "2.1.0",
"description": "lint cli",
"author": "haiweilian <haiweilian@foxmail.com>",
"homepage": "https://github.com/bfehub/lint",
Expand All @@ -14,7 +14,7 @@
"access": "public"
},
"dependencies": {
"@antfu/install-pkg": "^0.3.1",
"@antfu/install-pkg": "^0.1.0",
"fs-extra": "^11.2.0",
"kolorist": "^1.8.0",
"prompts": "^2.4.2",
Expand Down
2 changes: 2 additions & 0 deletions packages/create-lint/template/test-jest-react/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ module.exports = (options) => {
pkg: [
'jest',
'ts-jest',
'ts-node',
'jest-transform-stub',
'jest-environment-jsdom',
'@types/jest',
'@testing-library/react',
'@testing-library/jest-dom',
Expand Down
2 changes: 2 additions & 0 deletions packages/create-lint/template/test-jest-vue/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ module.exports = (options) => {
pkg: [
'jest',
'ts-jest',
'ts-node',
'jest-transform-stub',
'jest-environment-jsdom',
'@types/jest',
'@vue/vue3-jest',
'@vue/test-utils',
Expand Down
26 changes: 26 additions & 0 deletions packages/create-lint/template/test-vitest-react/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const { setPkg } = require('../../utils/index')

// https://github.com/vitest-dev/vitest
// https://github.com/testing-library/react-testing-library
module.exports = (options) => {
return {
pkg: [
'vitest',
'@vitest/ui',
'@vitest/coverage-v8',
'@vitejs/plugin-react',
'@testing-library/react',
'happy-dom',
],
configFile: ['test-vitest-react/vitest.config.ts'],
async afterInstall() {
await setPkg(options.cwd, {
scripts: {
test: 'vitest',
'test:ui': 'vitest --ui',
'test:coverage': 'vitest run --coverage',
},
})
},
}
}
11 changes: 11 additions & 0 deletions packages/create-lint/template/test-vitest-react/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from '@vitejs/plugin-react'
import { defineConfig } from 'vitest/config'

// https://cn.vitest.dev/config/
// Can write vite.config.ts if it already exists
export default defineConfig({
plugins: [React()],
test: {
environment: 'happy-dom',
},
})
3 changes: 1 addition & 2 deletions packages/create-lint/template/test-vitest-vue/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ module.exports = (options) => {
pkg: [
'vitest',
'@vitest/ui',
'@vitest/coverage-v8',
'@vitejs/plugin-vue',
'@vitejs/plugin-vue-jsx',
'@vue/test-utils',
'c8',
'happy-dom',
],
configFile: ['test-vitest-vue/vitest.config.ts'],
Expand Down
11 changes: 2 additions & 9 deletions packages/create-lint/template/test-vitest-vue/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
import Vue from '@vitejs/plugin-vue'
import VueJsx from '@vitejs/plugin-vue-jsx'
import { defineConfig } from 'vitest/config'

// https://cn.vitest.dev/config/
// Can write vite.config.ts if it already exists
export default defineConfig({
plugins: [Vue(), VueJsx()],
optimizeDeps: {
disabled: true,
},
plugins: [Vue()],
test: {
clearMocks: true,
environment: 'happy-dom',
transformMode: {
web: [/\.[jt]sx$/],
},
},
})
6 changes: 6 additions & 0 deletions packages/eslint-config-basic/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @bfehub/eslint-config-basic

## 2.1.0

### Minor Changes

- add vitest vue/react

## 2.0.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-basic/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@bfehub/eslint-config-basic",
"type": "commonjs",
"version": "2.0.2",
"version": "2.1.0",
"description": "eslint basic",
"author": "haiweilian <haiweilian@foxmail.com>",
"homepage": "https://github.com/bfehub/lint",
Expand Down
11 changes: 11 additions & 0 deletions packages/eslint-config-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @bfehub/eslint-config-react

## 2.1.0

### Minor Changes

- add vitest vue/react

### Patch Changes

- Updated dependencies
- @bfehub/eslint-config-typescript@2.1.0

## 2.0.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@bfehub/eslint-config-react",
"type": "commonjs",
"version": "2.0.2",
"version": "2.1.0",
"description": "eslint react",
"author": "haiweilian <haiweilian@foxmail.com>",
"homepage": "https://github.com/bfehub/lint",
Expand Down
11 changes: 11 additions & 0 deletions packages/eslint-config-typescript/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @bfehub/eslint-config-typescript

## 2.1.0

### Minor Changes

- add vitest vue/react

### Patch Changes

- Updated dependencies
- @bfehub/eslint-config-basic@2.1.0

## 2.0.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@bfehub/eslint-config-typescript",
"type": "commonjs",
"version": "2.0.2",
"version": "2.1.0",
"description": "eslint typescript",
"author": "haiweilian <haiweilian@foxmail.com>",
"homepage": "https://github.com/bfehub/lint",
Expand Down
11 changes: 11 additions & 0 deletions packages/eslint-config-vue/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @bfehub/eslint-config-vue

## 2.1.0

### Minor Changes

- add vitest vue/react

### Patch Changes

- Updated dependencies
- @bfehub/eslint-config-typescript@2.1.0

## 2.0.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@bfehub/eslint-config-vue",
"type": "commonjs",
"version": "2.0.2",
"version": "2.1.0",
"description": "eslint vue",
"author": "haiweilian <haiweilian@foxmail.com>",
"homepage": "https://github.com/bfehub/lint",
Expand Down
6 changes: 6 additions & 0 deletions packages/stylelint-config-basic/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @bfehub/stylelint-config-basic

## 2.1.0

### Minor Changes

- add vitest vue/react

## 2.0.2

### Patch Changes
Expand Down
8 changes: 6 additions & 2 deletions packages/stylelint-config-basic/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
// https://stylelint.io/user-guide/get-started
module.exports = {
// https://github.com/ota-meshi/postcss-html
// customSyntax: 'postcss-html',
overrides: [
{
files: ['**/*.scss'],
customSyntax: 'postcss-scss',
rules: {
'import-notation': 'string',
},
},
{
files: ['**/*.less'],
customSyntax: 'postcss-less',
rules: {
'import-notation': 'string',
},
},
],
extends: [
Expand Down
2 changes: 1 addition & 1 deletion packages/stylelint-config-basic/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@bfehub/stylelint-config-basic",
"type": "commonjs",
"version": "2.0.2",
"version": "2.1.0",
"description": "stylelint basic",
"author": "haiweilian <haiweilian@foxmail.com>",
"homepage": "https://github.com/bfehub/lint",
Expand Down
Loading

0 comments on commit f0c3e1b

Please sign in to comment.