Typescript Starter for Gridsome
This is a starter template for Gridsome using Typescript. It uses wotan for command line code analisys and tslint for integration with vscode. In order to work with Visual Studio Code, you'll need to install TSLint and TSLint Vue extensions for the editor.
1. Install Gridsome CLI tool if you don't have
npm install --global @gridsome/cli
2. Create a Gridsome project
gridsome create gridsome-ts https://github.com/cleitonper/gridsome-starter-typescript.git
to install this typescript startercd gridsome-ts
to open foldergridsome develop
to start local dev server athttp://localhost:8080
- happy coding
🎉 🙌
3. Static Code Analysis - Command Line
- edit the
tslint.json
file and add your favoritestslint rules
. - run
yarn lint:check
to see static analysis result - run
yarn lint:fix
to fix errors found bywotan
andtslint
4. Static Code Analysis - Visual Studio Code
As mentioned before, in order to lint your Typescript code in *.vue
Single File Components with vscode you'll need to install TSLint
and TSLint Vue
extensions for the editor.
Click in the links above to install it, or follow the steps below:
- With your vscode open, type
CTRL + SHIFT + X
- Search for TSLint (select the extension published by Microsoft)
- Select and install the extension
- Do same thing for TSLint Vue extension