Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
MellowCo committed Apr 9, 2024
1 parent 4bc9f8e commit d56c6da
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .eslintcache

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/rpxTranform/taro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ function toFixed(number: number, precision: number) {
/**
* taro: h5 px rpx 转 rem
* @param css
* @param taroWebpack
* @param designWidth
* @param deviceRatio
*/
export function taroH5CssRemTransform(css: UtilObject, taroWebpack: string, designWidth: number, deviceRatio: Record<number, number>) {
// h5 px rpx 转 rem
Expand All @@ -65,6 +68,8 @@ export function taroH5CssRemTransform(css: UtilObject, taroWebpack: string, desi
/**
* taro: 小程序 px 转 rpx
* @param css
* @param designWidth
* @param deviceRatio
*/
export function taroCssPxTransform(css: UtilObject, designWidth: number, deviceRatio: Record<number, number>) {
// h5 px rpx 转 rem
Expand Down
1 change: 1 addition & 0 deletions src/rpxTranform/uniapp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { cssRpxTransform, rpxRE } from '.'
/**
* uniapp postcss rpx 转换规则
* pkg: @dcloudio/vue-cli-plugin-uni/packages/postcss 37行
* @param size
*/
export function uniAppRpxTransform(size: string) {
return `%?${size}?%`
Expand Down
4 changes: 4 additions & 0 deletions src/rules/question-mark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import type { Rule } from '@unocss/core'
/**
* Used for debugging, only avaliable in development mode.
*
* @param _
* @param root0
* @param root0.constructCSS
* @param root0.generator
* @example `?` / `where`
*/
export const questionMark: Rule[] = [
Expand Down
2 changes: 1 addition & 1 deletion src/rules/transform.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { CSSValues, Rule, RuleContext } from '@unocss/core'
import { cacheRestoreSelector } from 'unplugin-transform-class/utils'
import type { Theme } from '../theme'
import { handler as h, makeGlobalStaticRules, positionMap, transformXYZ, xyzMap } from '../utils'
import { handler as h, makeGlobalStaticRules, positionMap, transformXYZ } from '../utils'

const transformValues = [
'translate',
Expand Down
12 changes: 6 additions & 6 deletions src/transformer/transformerAttributify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ export interface Options {
exclude?: FilterPattern

/**
* 需要转换的目标
* @default [/\.vue$/, /\.vue\?vue/]
*/
* 需要转换的目标
* @default [/\.vue$/, /\.vue\?vue/]
*/
include?: FilterPattern

/**
* 为生成的class选择器添加前缀
* @default ''
*/
* 为生成的class选择器添加前缀
* @default ''
*/
classPrefix?: string
}
```
Expand Down

0 comments on commit d56c6da

Please sign in to comment.