0.1.2 • Published 2 years ago

@pagemaker.io/eslint-plugin v0.1.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Pagemaker.io Eslint Plugin

Installation

  1. You'll first need to install ESLint:
$ npm i eslint --save-dev
  1. Next, Install @pagemaker.io/eslint-plugin:
$ npm i @pagemaker.io/eslint-plugin --save-dev
  1. Next Install VSCode Eslint Extension

For having rules highlighted in text editor with error highlighting and integration of eslint configuration into vscode

vscode-extension-eslint

Installation process Ends Here. Let's move to VSCode.

Usage

  1. Add pagemaker to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
  "plugins": ["@pagemaker.io"]
}
  1. 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"
}