# eslint-plugin-es5

> ESLint plugin for ES5 users.

Latest version **1.5.0** (published 2020-02-01) · MIT license · 0 weekly downloads

## Install

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

## 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.5.0 |
| Published | 2020-02-01 |
| First published | 2017-01-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 29.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 55 |
| Author | Nikita Gusakov |
| Maintainers | nkt |
| Keywords | eslint, eslintplugin, es5, es2015 |

## Links

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

## 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

- 1.5.0 (latest) — 2020-02-01
- 1.4.1 — 2019-06-04
- 1.4.0 — 2019-06-03
- 1.3.1 — 2018-04-01
- 1.3.0 — 2018-03-31
- 1.2.0 — 2018-01-02
- 1.1.0 — 2017-05-30
- 1.0.1 — 2017-01-04
- 1.0.0 — 2017-01-04
- 0.3.0 — 2017-01-03
- 0.2.1 — 2017-01-03
- 0.2.0 — 2017-01-03
- 0.1.1 — 2017-01-03
- 0.1.0 — 2017-01-03

## README

eslint-plugin-es5
=================

![Build Status](https://github.com/nkt/eslint-plugin-es5/workflows/Test/badge.svg)
[![Cult Of Martians](http://cultofmartians.com/assets/badges/badge.svg)](http://cultofmartians.com/tasks/eslint-es5.html)

ESLint plugin for ES5 users.

Why?
----

Sometimes someone doesn't want to or can't use Babel.
Even if you support modern browsers or node.js, JS engines have bugs
like broken [block-scoping](http://stackoverflow.com/q/32665347).
Maybe you only want to forbid usage of `for-of` in your project.

If this concerns you, this plugin should help you.

Installation
------------

```
npm install --save-dev eslint-plugin-es5
```

Usage
-----

Add the plugin to your `.eslintrc`:

```json
{
  "plugins": [
    "es5"
  ]
}
```

And then any of the rules [listed below](#list-of-supported-rules) like this:

```json
{
  "rules": {
    "es5/no-arrow-functions": "error"
  }
}
```

Also you can extend one of presets:
```json
{
  "extends": [
    "eslint:recommended",
    "plugin:es5/no-es2015"
  ]
}
```

Available presets:

  - `plugin:es5/no-es2015`: Forbid ES2015 usage.
  - `plugin:es5/no-es2016`: Forbid ES2016 usage.

List of supported rules
-----------------------

  - `es5/no-es6-methods` Forbid ES2015 [methods](http://babeljs.io/learn-es2015/#math--number--string--object-apis) for `Array` and `String`
  - `es5/no-es6-static-methods` Forbid ES2015 [static methods](http://babeljs.io/learn-es2015/#math--number--string--object-apis) for `Array`, `Math`, `Number`, and `Object`. You can enable specific functions: `"es5/no-es6-static-methods": ["error", { exceptMethods: ["Math.imul"] }]`
  - `es5/no-arrow-functions`:wrench:: Forbid [arrow-functions](https://babeljs.io/learn-es2015/#ecmascript-2015-features-arrows-and-lexical-this).
  - `es5/no-binary-and-octal-literals`:wrench:: Forbid [binary and octal literals](https://babeljs.io/learn-es2015/#binary-and-octal-literals).
  - `es5/no-block-scoping`: Forbid `let` and `const` declarations. You can enable them using options: `"es5/no-block-scoping": ["error", { "let": true }]`
  - `es5/no-classes`: Forbid [ES2015 classes](https://babeljs.io/learn-es2015/#ecmascript-2015-features-classes).
  - `es5/no-computed-properties`: Forbid [computed properties](https://babeljs.io/learn-es2015/#ecmascript-2015-features-enhanced-object-literals).
  - `es5/no-default-parameters`: Forbid [default parameters](https://babeljs.io/learn-es2015/#ecmascript-2015-features-default-rest-spread).
  - `es5/no-destructuring`:wrench:: Forbid [destructuring statements](https://babeljs.io/learn-es2015/#ecmascript-2015-features-destructuring).
  - `es5/no-exponentiation-operator`: Forbid exponentiation operator `a ** b` usage.
  - `es5/no-for-of`: Forbid [`for-of` statements](https://babeljs.io/learn-es2015/#ecmascript-2015-features-iterators-for-of).
  - `es5/no-generators`: Forbid [generators](https://babeljs.io/learn-es2015/#ecmascript-2015-features-generators) usage.
  - `es5/no-modules`: Forbid ES2015 [modules](https://babeljs.io/learn-es2015/#ecmascript-2015-features-modules) usage.
  - `es5/no-object-super`: Forbid `super`/`super.foo()` calls.
  - `es5/no-rest-parameters`: Forbid [rest parameters](https://babeljs.io/learn-es2015/#ecmascript-2015-features-default-rest-spread).
  - `es5/no-shorthand-properties`:wrench:: Forbid [shorthand properties](https://babeljs.io/learn-es2015/#ecmascript-2015-features-enhanced-object-literals).
  - `es5/no-spread`:wrench:: Forbid [...spread expressions](https://babeljs.io/learn-es2015/#ecmascript-2015-features-default-rest-spread).
  - `es5/no-template-literals`:wrench:: Forbid [template strings](https://babeljs.io/learn-es2015/#ecmascript-2015-features-template-strings) usage.
  - `es5/no-typeof-symbol`: Forbid `typeof foo === 'symbol'` [checks](https://babeljs.io/learn-es2015/#ecmascript-2015-features-symbols).
  - `es5/no-unicode-code-point-escape`:wrench:: Forbid [Unicode support](https://babeljs.io/learn-es2015/#unicode) in code point escape.
  - `es5/no-unicode-regex`: Forbid [Unicode support](https://babeljs.io/learn-es2015/#ecmascript-2015-features-unicode) in RegExp.

License
-------
[MIT](LICENSE)

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