Skip to content
This repository has been archived by the owner on Sep 23, 2022. It is now read-only.

eramdam/eslint-plugin-top

Repository files navigation

eslint-plugin-top

Disallow side effects at the top level of files

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-top:

npm install eslint-plugin-top --save-dev

Usage

Add top to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["top"]
}

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

{
  "rules": {
    "top/no-top-level-variables": 2,
    "top/no-top-level-side-effect": 2
  }
}

Supported Rules

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published