0.2.1 • Published 2 years ago

@scayle/eslint-plugin-vue-composable v0.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@scayle/eslint-plugin-vue-composable

npm version npm downloads License

Rules to avoid unpleasant composable problems

Installation

You'll need to install ESLint along with this package:

# Using pnpm
pnpm add --dev eslint @scayle/eslint-plugin-vue-composable

# Using yarn
yarn add --dev eslint @scayle/eslint-plugin-vue-composable

# Using npm
npm install --save-dev eslint @scayle/eslint-plugin-vue-composable

Usage

Add @scayle/eslint-plugin-vue-composable to the plugins section of your .eslintrc configuration file.

{
  "plugins": [
    "@scayle/vue-composable"
  ]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "@scayle/vue-composable/no-composable-after-await": "warn",
    "@scayle/vue-composable/no-lifecycle-after-await": "error",
    "@scayle/vue-composable/no-watch-after-await": "error",
    "@scayle/vue-composable/no-computed-after-await": "error"
  }
}

Rules

Name                     Description
no-composable-after-awaitdisallow asynchronously called composable functions in composables
no-computed-after-awaitdisallow asynchronously registered computed in composables
no-lifecycle-after-awaitdisallow asynchronously registered lifecycle hooks in composables
no-watch-after-awaitdisallow asynchronously registered watch and watchEffect in composables

License

Licensed under the MIT License

0.2.1

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago