# @antstudiocz/eslint-plugin-ant-rules

> Internal ANT eslint rules

Latest version **1.0.0** (published 2019-09-27) · 0 weekly downloads

## Install

```sh
npm install @antstudiocz/eslint-plugin-ant-rules
pnpm add @antstudiocz/eslint-plugin-ant-rules
yarn add @antstudiocz/eslint-plugin-ant-rules
bun add @antstudiocz/eslint-plugin-ant-rules
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-09-27 |
| First published | 2019-09-27 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | alesmraz, dbalik, sirpole |
| Keywords | eslint, eslintplugin, eslint-plugin |

## Links

- npm: https://www.npmjs.com/package/@antstudiocz/eslint-plugin-ant-rules
- npm.io page: https://npm.io/package/@antstudiocz/eslint-plugin-ant-rules

## Dependencies (1)

- [requireindex](https://npm.io/package/requireindex.md) ~1.2.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-09-27

## README

# eslint-plugin-ant-rules

Internal ANT eslint rules

## Installation

You'll first need to install [ESLint](http://eslint.org):

```
$ npm install eslint --save-dev
```

Next, install `eslint-plugin-ant-rules`:

```
$ npm install @antstudiocz/eslint-plugin-ant-rules --save-dev
```

## Usage

Add `ant-rules` to the plugins section of your `package.json` or `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
    "plugins": [
        "ant-rules"
    ]
}
```


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

**rule output option:**
- 0 = disable output
- 1 = danger only
- 2 = error

**Config object**: define danger function. - _not required_

TRUE = validation
FALSE = no validation

```json
{
    "rules": {
        "ant-rules/rule-name": [
         	1,
         	{
         		"innerHTML" : true,
         		"outerHTML" : true,
         		"write"     : true,
         		"writeln"   : true,
         		"src"       : true,
         		"open"      : true
         	}
         ]
    }
}
```

Function list: 
- innerHTML
- outerHTML
- write
- writeln
- src
- open

## How to add new rules

make sure you have install Yeoman globally:

```
$ npm i -g yo
```

then install generator-eslint:
```
$ npm i -g generator-eslint
```
with this tool you can ease create new rule or new plugin for eslint - https://github.com/eslint/generator-eslint

If you want to create a new ESLint rule, make sure you're in the top-level (eg. front/js/eslint-plugin-ant-rules) directory of an ESLint repo clone or an ESLint plugin and type:

```
$ yo eslint:rule
```
You'll be prompted for some information and then it will generate the files necessary for a new rule, including the source file, a test file, and a documentation file.
After that remove unnecessary code in rule and if is possible rewrite it into ES6

---
_Source: https://npm.io/package/@antstudiocz/eslint-plugin-ant-rules · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
