@scayle/eslint-plugin-vue-composable

0.2.1 • Public • Published

@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

Dependencies (0)

    Dev Dependencies (11)

    Package Sidebar

    Install

    npm i @scayle/eslint-plugin-vue-composable

    Weekly Downloads

    2,056

    Version

    0.2.1

    License

    MIT

    Unpacked Size

    25.7 kB

    Total Files

    15

    Last publish

    Collaborators

    • scayle-automation
    • hector_gonzalez_ay
    • ay-henribeck
    • cloud-panel-ay
    • kyosifov
    • marcel-domke-ay
    • louisa_schmidt_ay
    • connor-pearson-ay