@blumintinc/eslint-plugin-blumint

0.1.24 • Public • Published

@blumintinc/eslint-plugin-blumint

Custom eslint rules for use at BluMint

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install @blumintinc/eslint-plugin-blumint:

npm install @blumintinc/eslint-plugin-blumint --save-dev

Usage

Add @blumintinc/blumint to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "@blumintinc/blumint"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "blumint/rule-name": "error"
    }
}

Or use the recommended config:

{
    "extends": ["some-other-plugin", "plugin:@blumintinc/blumint/recommended"]
}

Rules

💼 Configurations enabled in.
⚠️ Configurations set to warn in.
✅ Set in the recommended configuration.
🔧 Automatically fixable by the --fix CLI option.

Name                             Description 💼 ⚠️ 🔧
array-methods-this-context Prevent misuse of Array methods in OOP
class-methods-read-top-to-bottom Ensures classes read linearly from top to bottom. 🔧
dynamic-https-errors Dynamic error details should only be in the third argument of the HttpsError constructor. The second argument is hashed to produce a unique id.
export-if-in-doubt All top-level const definitions, type definitions, and functions should be exported
extract-global-constants Extract constants/functions to the global scope when possible
generic-starts-with-t Enforce TypeScript generic types to start with T
no-async-array-filter Disallow async callbacks for Array.filter
no-async-foreach Disallow Array.forEach with an async callback function
no-conditional-literals-in-jsx Disallow use of conditional literals in JSX code
no-filter-without-return Disallow Array.filter callbacks without an explicit return (if part of a block statement)
no-misused-switch-case Prevent misuse of logical OR in switch case statements
no-unpinned-dependencies Enforces pinned dependencies 🔧
no-useless-fragment Prevent unnecessary use of React fragments 🔧
prefer-fragment-shorthand Prefer <> shorthand for <React.Fragment> 🔧
prefer-type-over-interface Prefer using type alias over interface 🔧
require-memo React components must be memoized 🔧

Package Sidebar

Install

npm i @blumintinc/eslint-plugin-blumint

Weekly Downloads

81

Version

0.1.24

License

ISC

Unpacked Size

88.7 kB

Total Files

41

Last publish

Collaborators

  • brodie-m
  • oconnorjoseph