0.1.2 • Published 2 years ago
@pagemaker.io/eslint-plugin v0.1.2
Pagemaker.io Eslint Plugin
Installation
- You'll first need to install ESLint:
$ npm i eslint --save-dev
- Next, Install
@pagemaker.io/eslint-plugin
:
$ npm i @pagemaker.io/eslint-plugin --save-dev
- Next Install VSCode Eslint Extension
For having rules highlighted in text editor
with error highlighting and integration of eslint configuration into vscode
Installation process Ends Here. Let's move to VSCode.
Usage
- Add
pagemaker
to the plugins section of your.eslintrc
configuration file. You can omit theeslint-plugin-
prefix:
{
"plugins": ["@pagemaker.io"]
}
- If you don't want to specify individual rules then use Default Configuration
extends:[ "plugin:@pagemaker.io/essential", ]
That's It. You can now Reload VSCode and check.
How to check entire project with Eslint
$ eslint ./**
Rule Configuration ( Optional ) .
{
"rules": {
"@pagemaker.io/rule-name": 2
}
}
Supported Rules
- Fill in provided rules here
{
"@pagemaker.io/require-ref": "error"
}
Default Rules Enabled in configuration
{
"@pagemaker.io/require-ref": "error",
"@pagemaker.io/require-ref-index": "error"
}