Skip to content

scayle/eslint-plugin-vue-composable

Repository files navigation

@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-await disallow asynchronously called composable functions in composables
no-computed-after-await disallow asynchronously registered computed in composables
no-lifecycle-after-await disallow asynchronously registered lifecycle hooks in composables
no-watch-after-await disallow asynchronously registered watch and watchEffect in composables

License

Licensed under the MIT License

About

Rules to avoid unpleasant composable problems

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
THIRD_PARTY_LICENSE

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •