0.0.4 • Published 2 years ago

@steelbrain/eslint-plugin-consistent-modules v0.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

eslint-plugin-consistent-modules

Adds rules to help use consistent "default export" names throughout the project.

If both rules are activated, default names will be consistent overall.

I DID NOT WRITE THE RULES

Forked from @minseoksuh

  • Thanks to @selaux who wrote the rule (filenames/match-exported) and made eslint-plugin-filenames
  • Thanks to @golopot who wrote the rule and made PR to eslint-plugin-import

Installation

npm install @steelbrain/consistent-modules --save-dev
yarn add -D @steelbrain/consistent-modules

Rule Option & Documentation

How To Use

  1. either extend config which enables both rules

    {
        "extends": ["plugin:@steelbrain/consistent-modules/recommended"]
    }

    which, sets below

    {
        "rules": {
            "@steelbrain/consistent-modules/default-export-match-filename": "error",
            "@steelbrain/consistent-modules/default-import-match-filename": "error"
        }
    }
  2. or set rules inidividually

    {
        "rules": {
            "@steelbrain/consistent-modules/default-export-match-filename": "error",
        }
    }