Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Official ESLint plugin for Vue.js

License

NotificationsYou must be signed in to change notification settings

vuejs/eslint-plugin-vue

 
 

Repository files navigation

NPM versionNPM downloadsCircleCILicense

Official ESLint plugin for Vue.js

📖 Documentation

Please refer to theofficial website.

⚓ Versioning Policy

This plugin followsSemantic Versioning andESLint's Semantic Versioning Policy.

📰 Releases

This project usesGitHub Releases.

🍻 Contribution Guide

Contributing is welcome! See theESLint Vue Plugin Developer Guide.

Working With Rules

Be sure to read theofficial ESLint guide before you start writing a new rule.

To see what an abstract syntax tree (AST) of your code looks like, you may useAST Explorer. After openingAST Explorer, selectVue as the syntax andvue-eslint-parser as the parser.

The default JavaScript parser must be replaced becauseVue.js single file components are not plain JavaScript, but a custom file format.vue-eslint-parser is a replacement parser that generates an enhanced AST with nodes that represent specific parts of the template syntax, as well as the contents of the<script> tag.

To learn more about certain nodes in a produced AST, see theESTree project page and thevue-eslint-parser AST documentation.

vue-eslint-parser provides a few useful parser services to help traverse the produced AST and access template tokens:

  • context.parserServices.defineTemplateBodyVisitor(visitor, scriptVisitor)
  • context.parserServices.getTemplateBodyTokenStore()

Check out anexample rule to see usage of these services.

Be aware that depending on the code samples you write in tests, theRuleTester parser property must be set accordingly (this can be done on a test by test basis). See anexample here.

If you're stuck, remember there are many rules available for reference. If you can't find the right solution, don't hesitate to reach out inissues – we're happy to help!

🔒 License

See theLICENSE file for license rights and limitations (MIT).


[8]ページ先頭

©2009-2025 Movatter.jp