-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
143 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
pageClass: rule-details | ||
sidebarDepth: 0 | ||
title: mpx/no-deprecated-lifecycle | ||
description: pageShow/pageHide废弃的生命周期 | ||
--- | ||
# mpx/no-deprecated-lifecycle | ||
> pageShow/pageHide废弃的生命周期 | ||
- :gear: 这条规则包含在`"plugin:mpx/composition-api-essential"`。 | ||
|
||
## :book: 规则详情 | ||
|
||
mpx升级2.8版本之后,pageShow/pageHide将废弃 | ||
|
||
<eslint-code-block :rules="{'mpx/no-deprecated-lifecycle': ['error']}"> | ||
|
||
```vue | ||
<script> | ||
/* ✓ GOOD */ | ||
createComponent({ | ||
pageLifetimes: { | ||
show() {}, | ||
hide() {} | ||
} | ||
}) | ||
/* ✗ BAD */ | ||
createComponent({ | ||
pageShow () {}, | ||
pageHide () {} | ||
}) | ||
</script> | ||
``` | ||
|
||
</eslint-code-block> | ||
|
||
## :wrench: 选项 | ||
|
||
无 | ||
|
||
## :mag: 具体实现 | ||
|
||
- [规则](https://github.com/mpx-ecology/eslint-plugin-mpx/blob/master/lib/rules/no-deprecated-lifecycle.js) | ||
- [测试](https://github.com/mpx-ecology/eslint-plugin-mpx/blob/master/tests/lib/rules/no-deprecated-lifecycle.js) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
pageClass: rule-details | ||
sidebarDepth: 0 | ||
title: mpx/no-deprecated-mpx-createfunction | ||
description: mpx.create调用方式已经被废弃 | ||
--- | ||
# mpx/no-deprecated-mpx-createfunction | ||
> mpx.create调用方式已经被废弃 | ||
- :gear: 这条规则包含在`"plugin:composition-api-essential"`。 | ||
|
||
## :book: 规则详情 | ||
|
||
mpx升级2.8版本之后,mpx.create*调用方式已经被废弃 | ||
|
||
<eslint-code-block :rules="{'mpx/no-deprecated-mpx-createfunction': ['error']}"> | ||
|
||
```vue | ||
<script> | ||
import { createComponent } from '@mpxjs/core' | ||
/* ✓ GOOD */ | ||
createComponent({}) | ||
/* ✗ BAD */ | ||
mpx.createComponent({}) | ||
</script> | ||
``` | ||
|
||
</eslint-code-block> | ||
|
||
## :wrench: 选项 | ||
|
||
无 | ||
|
||
## :mag: 具体实现 | ||
|
||
- [规则](https://github.com/mpx-ecology/eslint-plugin-mpx/blob/master/lib/rules/no-deprecated-mpx-createfunction.js) | ||
- [测试](https://github.com/mpx-ecology/eslint-plugin-mpx/blob/master/tests/lib/rules/no-deprecated-mpx-createfunction.js) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
pageClass: rule-details | ||
sidebarDepth: 0 | ||
title: mpx/no-deprecated-watch-second-param | ||
description: watch第二个参数统一为函数,不再提供对象方式 | ||
--- | ||
# mpx/no-deprecated-watch-second-param | ||
> watch第二个参数统一为函数,不再提供对象方式 | ||
- :gear: 这条规则包含在`"plugin:mpx/composition-api-essential"`。 | ||
|
||
## :book: 规则详情 | ||
|
||
mpx升级2.8版本之后,watch第二个参数统一为函数,不再提供对象方式 | ||
|
||
<eslint-code-block :rules="{'mpx/no-deprecated-watch-second-param': ['error']}"> | ||
|
||
```vue | ||
<script setup> | ||
import { ref, watch } from '@mpxjs/core' | ||
const refValue = ref('') | ||
/* ✓ GOOD */ | ||
watch(refValue, () => {}) | ||
const handler = () => {} | ||
watch(refValue, handler) | ||
watch(refValue, () => {}, { immediate: true }) | ||
/* ✗ BAD */ | ||
watch(refValue, { handler() {} }) | ||
</script> | ||
``` | ||
|
||
</eslint-code-block> | ||
|
||
## :wrench: 选项 | ||
|
||
无 | ||
|
||
## :mag: 具体实现 | ||
|
||
- [规则](https://github.com/mpx-ecology/eslint-plugin-mpx/blob/master/lib/rules/no-deprecated-watch-second-param.js) | ||
- [测试](https://github.com/mpx-ecology/eslint-plugin-mpx/blob/master/tests/lib/rules/no-deprecated-watch-second-param.js) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters