@sharegate/eslint-plugin-apricot

ShareGate Apricot's custom ESLint plugin.

Usage no npm install needed!

<script type="module">
  import sharegateEslintPluginApricot from 'https://cdn.skypack.dev/@sharegate/eslint-plugin-apricot';
</script>

README

sg-apricot-eslint

Sharegate Apricot's custom ESLint plugin.

Installation

Install the ShareGate recommended ESLint configuration packages.

With NPM:

npm i -D eslint babel-eslint @sharegate/eslint-plugin-apricot

Usage

Add apricot to the plugins section of your .eslintrc.js configuration file.

{
    "plugins": [
        "@sharegate/apricot"
    ]
}

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

{
    "rules": {
        "@sharegate/apricot/rule-name": "warn"
    }
}

Plugin-Provided Rules

Sharegate's plugin provides the following custom rules, which are included as appropriate in all core linting configs:

Maintainers

The following documentation is only for the maintainers of this repository.

Rule Creation

In order to create a new rule, you must manually create 3 new files :

  • The rule's definition : lib/rules/RULE_ID.js
  • The rule's test file : tests/lib/rules/RULE_ID.test.js
  • The rule's documentation: docs/rules/RULE_ID.md

You must also :

  • Add the rule's documentation in this README in the Plugin-Provided Rules section.

License

Copyright © 2019, GSoft inc. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/gsoft-inc/gsoft-license/blob/master/LICENSE.