Linter configurations for linting micro plugins #2952
Andriamanitra
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Micro plugins are written in Lua for which there are two decent linters that I know of: Luacheck and selene. Luacheck is older and hasn't been updated in a number of years but it can still be useful. Selene is more modern (it was originally developed to support Roblox development) and it's still getting regular updates. If you're unsure which one you want to use you can check out comparison of the two in selene docs.
A small issue with both of these linters is that by default they are unaware of variables and functions that micro editor provides or uses (such as
import
andinit
). Here are the configuration files that I have been using to stop the linters from complaining about those functions. Maybe they can save someone a few minutes of reading linter docs and messing with configuration files.Luacheck (https://github.com/mpeterv/luacheck)
.luacheckrc
Selene (https://github.com/Kampfkarren/selene)
selene.toml:
micro.yml:
Beta Was this translation helpful? Give feedback.
All reactions