Skip to content

vue/no-this-in-before-route-enter ​

disallow this usage in a beforeRouteEnter method

📖 Rule Details ​

this is not available in beforeRouteEnter (docs). This behavior isn't obvious, so it's easy to cause a TypeError, especially during a refactor.

Now loading...
Now loading...

🔧 Options ​

Nothing.

🔇 When Not To Use It ​

When vue-router is not installed.

📚 Further Reading ​

vue-router - in-component-guards

🚀 Version ​

This rule was introduced in eslint-plugin-vue v7.11.0

🔍 Implementation ​