Tools for easier Gridsome development
An official ESLint plugin is available: https://www.npmjs.com/package/eslint-plugin-gridsome
To configure this, first install the necessary plugins:
# NPM
npm i -D eslint eslint-plugin-gridsome vue-eslint-parser
# Yarn
yarn add -D eslint eslint-plugin-gridsome vue-eslint-parser
Then add this code to .eslintrc.js
:
module.exports = {
env: {
node: true,
es6: true
},
plugins: ["gridsome"],
rules: {
"gridsome/format-query-block": "error"
},
parser: "vue-eslint-parser"
}
Vetur is Vue tooling for VS Code.
Vetur works perfect with Gridsome.
<page-query>
and <static-query>
Detail is here
settings.json
{
... ,
"vetur.grammar.customBlocks": {
"page-query": "graphql",
"static-query": "graphql"
},
...
}
Vetur: Generate Grammar
Vetur has gridsome-helper-json since version 0.17.0
helper-json can autocomplete tag and attribute.
gridsome-helper-json support <g-image>
, <g-link>
and <Pager>
.