@snsw/eslint-plugin-var

0.0.8 • Public • Published

eslint-plugin-var

eslint rules - Vouchers and Rebates

Installation

Install typescript-eslint:

yarn add -D eslint typescript@~3.9.7 @typescript-eslint/parser @typescript-eslint/eslint-plugin

Next, install eslint-plugin-var:

$ yarn add -D eslint-plugin-var

Configs

  • recommended: the default set of rules
  • toolkit: used for the UI's toolkit folders
  • journey-tests: used for journey tests (usually .js)
  • tsJsRuleToggles: ensures TypeScript-specific rules are run only against .ts[x] files, e.g. @typescript-eslint/explicit-function-return-type
  • indents: standard indentation rules

Usage

Add @snsw/var to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "root": true,
  "plugins": [
    "@snsw/var"
  ],
  "extends": [
    "plugin:@snsw/var/recommended"
  ]
}

Toolkits use both the @snsw/var/recommended and @snsw/var/toolkit configs:

{
  "plugins": [
    "@snsw/var"
  ],
  "extends": [
    "plugin:@snsw/var/recommended",
    "plugin:@snsw/var/toolkit"
  ]
}

Journey tests use both the @snsw/var/recommended and @snsw/var/journeyTests configs:

{
  "root": true,
  "plugins": [
    "@snsw/var"
  ],
  "extends": [
    "plugin:@snsw/var/recommended",
    "plugin:@snsw/var/journeyTests"
  ]
}

Supported Rules

  • TBD

Package Sidebar

Install

npm i @snsw/eslint-plugin-var

Weekly Downloads

9

Version

0.0.8

License

none

Unpacked Size

5.81 kB

Total Files

10

Last publish

Collaborators

  • service-jw
  • service-ea
  • liu.xin.snsw
  • momin.aitizaz.snsw
  • ejap
  • shaun.wen
  • ivar.volt.snsw
  • matthew.holmes.service.nsw.gov.au
  • sagar.bhandari.snsw