JSPM

  • Created
  • Published
  • Downloads 3553804
  • Score
    100M100P100Q191379F
  • License MIT

Additional ESLint's rules for Node.js

Package Exports

  • eslint-plugin-node
  • eslint-plugin-node/package.json

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-node) 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-node

Build Status Coverage Status Dependency Status npm version

Additional ESLint's rules for Node.js

Install & Usage

> npm install --save-dev eslint eslint-plugin-node

.eslintrc

{
    "extends": "eslint:recommended",
    "plugins": ["node"],
    "env": {
        "node": true
    },
    "rules": {
        "node/no-missing-import": 2,
        "node/no-missing-require": 2,
        "node/no-unpublished-import": 2,
        "node/no-unpublished-require": 2,
        "node/no-unsupported-features": [2, {"version": 4}],
        "node/shebang": 2
    }
}

Rules

Some rules are slow because it searches package.json and opens it.

FAQ

Q: The no-missing-import / no-missing-require rules don't work with nested folders in SublimeLinter-eslint

A: See context.getFilename() in rule returns relative path in the SublimeLinter-eslint FAQ.