eslint-plugin-ir

0.2.14 • Public • Published

eslint-plugin-ir

An eslint plugin for Runcook-ir

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-ir:

npm install eslint-plugin-ir --save-dev

Usage

  1. you can using recommended config to enable all rules, so you don't have to enable them all manually (recommend)
//.eslintrc.js

// in your config file, you shoule add these two config

{
 plugins: ['ir'],
  extends: ['plugin:ir/recommended'],
}
 

or if you using @iceworks/spec , you can config like this

const { getESLintConfig } = require('@iceworks/spec');

module.exports = getESLintConfig('rax', {
  plugins: ['ir'],
  extends: ['plugin:ir/recommended'],
});
  1. config manually

Add ir to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "ir"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "ir/rule-name": 2
    }
}

enable auto fix

  1. ensure you have installed eslint plugin
  2. open setting.json, put this config in your setting
  • command(ctrl) + shift + p
  • typing setting.json then enter the first menu
    // eslint
    "eslint.format.enable": true,
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },

Supported Rules

you can check all rules here

Package Sidebar

Install

npm i eslint-plugin-ir

Weekly Downloads

0

Version

0.2.14

License

ISC

Unpacked Size

18.1 kB

Total Files

27

Last publish

Collaborators

  • homy