# eslint-plugin-hackmud2

> Linting rules for hackmud player-scripts

Latest version **0.3.1** (published 2019-01-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-hackmud2
pnpm add eslint-plugin-hackmud2
yarn add eslint-plugin-hackmud2
bun add eslint-plugin-hackmud2
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2019-01-21 |
| First published | 2017-05-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 0 |
| Unpacked size | 30.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Adam Bosco |
| Maintainers | aniketos |
| Keywords | eslint, eslintplugin, eslint-plugin, hackmud |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-hackmud2
- Repository: https://github.com/KuroTsuto/eslint-plugin-hackmud
- Homepage: https://github.com/KuroTsuto/eslint-plugin-hackmud#readme
- Issues: https://github.com/KuroTsuto/eslint-plugin-hackmud/issues
- npm.io page: https://npm.io/package/eslint-plugin-hackmud2

## 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
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 0.3.1 (latest) — 2019-01-21
- 0.3.0 — 2017-10-29
- 0.2.1 — 2017-07-08
- 0.1.9 — 2017-05-27
- 0.1.8 — 2017-05-24
- 0.1.7 — 2017-05-24
- 0.1.6 — 2017-05-24
- 0.1.5 — 2017-05-24
- 0.1.4 — 2017-05-24
- 0.1.3 — 2017-05-24
- 0.1.2 — 2017-05-24
- 0.1.1 — 2017-05-24
- 0.1.0 — 2017-05-24

## README

# eslint-plugin-hackmud2

[![npm](https://img.shields.io/npm/v/eslint-plugin-hackmud2.svg?style=plastic)](https://www.npmjs.com/package/eslint-plugin-hackmud2) [![license](https://img.shields.io/github/license/KuroTsuto/eslint-plugin-hackmud.svg?style=plastic)](https://github.com/KuroTsuto/eslint-plugin-hackmud/blob/master/LICENSE.md) [![npm](https://img.shields.io/npm/dt/eslint-plugin-hackmud2.svg?style=plastic)](https://www.npmjs.com/package/eslint-plugin-hackmud2) 

Linting rules for hackmud scripts.

## Features

 - Permits and validates code enclosure in single top-level anonymous function
 - Permits subscript syntax `#fs.user.script()`, `#f4.user.script()`
 - Limited validation of subscript syntax
 - Permits `#db` calls
 - Defines hackmud globals `_START`, `_TIMEOUT`, `_ST`, `_TO`, `_END`
 - Permits `#D`, `#G`, and `#FMCL` preprocessor directives

This plugin is somewhat hackish, at the moment - the largest caveat is that linted scripts should not contain `$S_`, `$DB_`, `$G`, `$D`, or `$FMCL`.

## Installation

Install the [ESLint](http://eslint.org) linter and `eslint-plugin-hackmud2`, either locally (in the directory containing your scripts, or an ancestor of it) or globally - if you don't know the difference I recommend the latter:

```
$ npm install --global eslint eslint-plugin-hackmud2
```

## Usage

To activate `eslint-plugin-hackmud2`, create a `.eslintrc.json` configuration file in the root work directories containing the script sources which you'd like to lint (or configure your linter/editor's linter plugin to use the configuration file in the location of your choice).

Add `hackmud2` to the plugins section of your `.eslintrc.json` configuration file, and `"plugin:hackmud2/recommended"` as the base configuration:

```json
{
  "plugins": [
    "hackmud2"
  ],
  "extends": "plugin:hackmud2/recommended"
}
```

If your scripts reside in the standard `hackmud/{user}/scripts` directories, most ESLint consumers should pick up on a single configuration file in the common `hackmud` directory.

### Command line usage
```
$ eslint myscript.js
```

### IDE Support
Many popular editors and IDEs support ESLint integration to provide visual indicators for validation rules. Try searching for how to enable ESLint support for your editor if it is not listed below.

#### Atom
Install the [Linter](https://atom.io/packages/linter) and [linter-eslint](https://atom.io/packages/linter-eslint) packages:

```
$ apm install linter
$ apm install linter-eslint
```

If you installed `eslint`/`eslint-plugin-hackmud2` globally, check the "Use global ESLint installation" option in Settings > Packages > linter-eslint > Settings.

#### Visual Studio Code
Enable ESLint linting in your Workspace's settings - I also recommend disabling VSCode's TypeScript validation engine to suppress extraneous warnings. If it doesn't exist already, create a `.vscode` directory in your workspace root containing a `settings.json` file. Add the following lines:

```json
{
    "javascript.validate.enable": false,
    "eslint.enable": true
}
```

## Supported Rules

## TODO

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