eslint-plugin-filesize
v0.1.2
Published
An eslint plugin that limits the minified + gzipped size of a file.
Downloads
13
Maintainers
Readme
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: [
"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