0.1.2 • Published 9 years ago

eslint-plugin-filesize v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

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
  2. 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