eslint-plugin-filesize

0.1.2 • Public • Published

eslint-plugin-filesize NPM version Build Status Dependency Status Coverage percentage

An eslint plugin that limits the minified + gzipped size of a file.

Usage

  1. Install eslint-plugin-filesize as a dev-dependency:
$ npm install --save-dev eslint-plugin-filesize
  1. Enable the plugin by adding it to your .eslintrc:
plugins: [
  "filesize"
]

Configuration

By default the limit is to report an error when 1,536 bytes is exceeded. You can adjust this by setting the filesize/filesize rule in your .eslintrc:

rules: {
  "filesize/filesize": [2, {"limit": 800}]
}

As standard in eslint, set that first element to 1 to make this a warning instead of an error.

License

MIT © Andrew Morris

Package Sidebar

Install

npm i eslint-plugin-filesize

Weekly Downloads

4

Version

0.1.2

License

MIT

Last publish

Collaborators

  • voltrevo