1.1.2 ā€¢ Published 3 years ago

eslint-plugin-enterprise-extras v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

eslint-plugin-enterprise-extras

This plugin adds extra ESLint rules that may be more suitable for an enterprise environment. The rules were created for use within Buildertrend, but feel free to request or propose any ESLint rules that may fall under this umbrella.


Installation

Install this ESLint plugin as a dev dependency:

npm install --save-dev eslint-plugin-enterprise-extras

Usage

Edit your project's .eslintrc.js configuration to load the plugin:

module.exports = {
    plugins: ["enterprise-extras"],
    rules: {
        // "enterprise-extras/no-href-assignment": "error"
        // ...
        // "enterprise-extras/...": "..."
    }
}

Alternatively, you could use the recommended or all preset rule configurations:

module.exports = {
    extends: ["plugin:enterprise-extras/recommended"],
    // extends: ["plugin:enterprise-extras/all"],
    rules: {
        // You can override the recommended rules here
    }
}

Supported Rules

āœ… = Recommended šŸ”§ = Auto-fixable | Name | āœ… | šŸ”§ | Description | | -------------------------------------------------- | - | - | ----------- | | no-href-assignment | āœ… | šŸ”§ | Prefers location.assign instead of location.href = | | private-component-methods | āœ… | šŸ”§ | Requires that all methods of react components are private (except reserved lifecycle methods) | | no-unhandled-scheduling | āœ… | | setTimeout and setInterval calls should be cleared |

LICENSE

MIT