JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4913341
  • Score
    100M100P100Q205994F
  • License MIT

ESLint plugin about ECMAScript syntactic features.

Package Exports

  • eslint-plugin-es

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-plugin-es) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

eslint-plugin-es

npm version Downloads/month Build Status Coverage Status Dependency Status

ESLint plugin about ECMAScript syntactic features.

🏁 Goal

Espree, the default parser of ESLint, has supported ecmaVersion option. However, it doesn't support to enable each syntactic feature individually.

This plugin lets us disable each syntactic feature individually. So we can enable arbitrary syntactic features with the combination of ecmaVersion and this plugin.

💿 Installation

Use npm or yarn.

npm install --save-dev eslint eslint-plugin-es

Requirements

  • Node.js 6.5.0 or newer.
  • ESLint 4.19.1 or newer.

📖 Usage

Configure your .eslintrc.* file.

For example, to enable only Rest/Spread Properties in ES2018, as similar to legacy experimentalObjectRestSpread option:

{
    "plugins": ["es"],
    "parserOptions": {
        "ecmaVersion": 2018
    },
    "rules": {
        "es/no-async-iteration": "error",
        "es/no-malformed-template-literals": "error",
        "es/no-regexp-lookbehind-assertions": "error",
        "es/no-regexp-named-capture-groups": "error",
        "es/no-regexp-s-flag": "error",
        "es/no-regexp-unicode-property-escapes": "error"
    }
}

Rules

This plugin provides the following rules.

ES2018

Rule ID Description
es/no-async-iteration disallow async iteration.
es/no-malformed-template-literals disallow template literals with invalid escape sequences.
es/no-regexp-lookbehind-assertions disallow RegExp lookbehind assertions.
es/no-regexp-named-capture-groups disallow RegExp named capture groups.
es/no-regexp-s-flag disallow RegExp s flag.
es/no-regexp-unicode-property-escapes disallow RegExp Unicode property escape sequences.
es/no-rest-spread-properties disallow rest/spread properties.

ES2017

Rule ID Description
es/no-async-functions disallow async function declarations.
es/no-trailing-function-commas disallow trailing function commas.

ES2016

Rule ID Description
es/no-exponential-operators disallow exponential operators.

ES2015

Rule ID Description
es/no-arrow-functions disallow arrow function expressions.
es/no-binary-numeric-literals disallow binary numeric literals.
es/no-block-scoped-functions disallow block-scoped function declarations.
es/no-block-scoped-variables disallow block-scoped variable declarations.
es/no-classes disallow class declarations.
es/no-computed-properties disallow computed properties.
es/no-default-parameters disallow default parameters.
es/no-destructuring disallow destructuring.
es/no-for-of-loops disallow for-of statements.
es/no-generators disallow generator function declarations.
es/no-modules disallow modules.
es/no-new-target disallow new.target meta property.
es/no-octal-numeric-literals disallow octal numeric literals.
es/no-property-shorthands disallow property shorthands.
es/no-regexp-u-flag disallow RegExp u flag.
es/no-regexp-y-flag disallow RegExp y flag.
es/no-rest-parameters disallow rest parameters.
es/no-spread-elements disallow spread elements.
es/no-template-literals disallow template literals.
es/no-unicode-codepoint-escapes disallow Unicode code point escape sequences.

🚥 Semantic Versioning Policy

eslint-plugin-es follows semantic versioning and ESLint's semantic versioning policy.

📰 Changelog

See releases.

❤️ Contributing

Welcome contributing!

Please use GitHub's Issues/PRs.

Development Tools

  • npm test runs tests and measures coverage.
  • npm run clean removes the coverage result of npm test command.
  • npm run coverage shows the coverage result of npm test command.
  • npm run watch runs tests on each file change.