Highly opinionated, ESLint plugin with custom rules to produce beautiful, readable JavaScript.
$ npm i eslint eslint-plugin-get-off-my-lawn --save-dev
$ yarn add eslint eslint-plugin-get-off-my-lawn --dev
Create an ESLint config in your package.json
or .eslintrc.js
file.
This plugin exports a recommended
config that enforces good practices. You can optionally enable it or explicitly add rules yourself.
{
"name": "my-awesome-project",
"eslintConfig": {
"extends": ["plugin:get-off-my-lawn/recommended"], // (optional)
"plugins": ["get-off-my-lawn"],
"rules": {
// enable additional rules, override rule options, or disable rules
}
}
}
module.exports = {
extends: ['plugin:get-off-my-lawn/recommended'], // (optional)
plugins: ['get-off-my-lawn']
rules: {
// enable additional rules, override rule options, or disable rules
},
};
Name | Description | Recommended | Fixable |
---|---|---|---|
get-off-my-lawn/prefer-arrow-functions | Prefer using arrow function over traditional functions. | ✅ | ❌ |
get-off-my-lawn/prefer-length-truthiness | Prefer length truthiness instead of explicitly checking for zero. | ❌ | ✅ |
- eslint-config-get-off-my-lawn - A highly opinionated, sharable config of ESLint rules to produce beautiful, readable JavaScript.
- prettier-config-get-off-my-lawn - A highly opinionated, sharable config of Prettier rules to produce beautiful, readable code.
- stylelint-config-get-off-my-lawn - A highly opinionated, sharable config of stylelint rules to produce beautiful, readable CSS and Sass.
MIT © Michael Novotny