Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lint): 对齐模板 eslint 依赖版本 fix #14904 #15250

Merged
merged 3 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@
"@types/tapable": "^1",
"@types/webpack": "^4.41.26",
"@types/webpack-dev-server": "^3.11.3",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"babel-plugin-syntax-jsx": "6.18.0",
"babel-preset-power-assert": "3.0.0",
"babel-preset-taro": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-taro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
],
"dependencies": {
"@babel/eslint-parser": "^7.17.0",
"@typescript-eslint/parser": "^5.20.0"
"@typescript-eslint/parser": "^6.2.0"
},
"devDependencies": {
"@babel/core": "^7.14.5",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"eslint": "^8.12.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-react": "^7.4.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MethodHandler } from '../../utils/handler'

/**
* 获取用户的当前设置
*
*
* @canUse getSetting
* @__object [withSubscriptions]
* @__success [authSetting, subscriptionsSetting, miniprogramAuthSetting]
Expand All @@ -14,7 +14,7 @@ export const getSetting: typeof Taro.getSetting = function (options) {
const name = 'getSetting'

// options must be an Object
const isValid = shouldBeObject(options).flag || typeof options === undefined
const isValid = shouldBeObject(options).flag || typeof options === 'undefined'
if (!isValid) {
const res = { errMsg: `${name}:fail invalid params` }
console.error(res.errMsg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import { MethodHandler } from '../../utils/handler'

/**
* 调起客户端小程序设置界面,返回用户设置的操作结果
*
*
* @canUse openSetting
* @__object [withSubscriptions]
* @__success [authSetting, subscriptionsSetting]
*/
export const openSetting: typeof Taro.openSetting = function (options) {
const name = 'openSetting'
// options must be an Object
const isValid = shouldBeObject(options).flag || typeof options === undefined
const isValid = shouldBeObject(options).flag || typeof options === 'undefined'
if (!isValid) {
const res = { errMsg: `${name}:fail invalid params` }
console.error(res.errMsg)
Expand Down
1 change: 1 addition & 0 deletions packages/taro-runtime/src/dom-external/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export function cloneNode (this: TaroNode, isDeep = false) {

for (const key in this) {
const value: any = this[key]
// eslint-disable-next-line valid-typeof
if ([PROPS, DATASET].includes(key) && typeof value === OBJECT) {
newNode[key] = { ...value }
} else if (key === '_value') {
Expand Down
1 change: 1 addition & 0 deletions packages/taro-runtime/src/interface/event-target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface AddEventListenerOptions extends EventListenerOptions {
passive?: boolean
}

// eslint-disable-next-line @typescript-eslint/ban-types
export interface EventHandler extends Function {
_stop?: boolean
}
Loading
Loading