eslint-plugin-filesize
An eslint plugin that limits the minified + gzipped size of a file.
Usage
- Install
eslint-plugin-filesize
as a dev-dependency:
$ npm install --save-dev eslint-plugin-filesize
- Enable the plugin by adding it to your .eslintrc:
plugins:
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:
As standard in eslint, set that first element to 1 to make this a warning instead of an error.
License
MIT © Andrew Morris