GithubHelp home page GithubHelp logo

pewww / eslint-plugin-consistent-default-export-name Goto Github PK

View Code? Open in Web Editor NEW

This project forked from minseoksuh/eslint-plugin-consistent-default-export-name

0.0 2.0 0.0 109 KB

License: MIT License

JavaScript 100.00%

eslint-plugin-consistent-default-export-name's Introduction

eslint-plugin-consistent-default-export-name

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

This plugin is basically a repackaging of two rules, each from two separate plugins:

  1. default-export-match-filename: checks when filename does not match its default export name

  2. default-import-match-filename: checks when default import name does not match its source filename

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

I DID NOT WRITE THE RULES

  • 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 elint-plugin-import

How To Use

  1. either extend config which enables both rules

    {
        "extends": ["plugin:consistent-default-export-name/fixed"]
    }

    which, sets below

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

    {
        "rules": {
            "consistent-default-export-name/default-export-match-filename": "error",
        }
    }

Rule Option & Documentation

Installation

npm install eslint-plugin-consistent-default-export-name --save-dev
yarn add -D eslint-plugin-consistent-default-export-name

Supported Rules

  • default-export-match-filename
  • default-import-match-filename

Github

https://github.com/minseoksuh/eslint-plugin-consistent-default-export-name/edit/main/README.md

eslint-plugin-consistent-default-export-name's People

Contributors

joao-paulo-parity avatar kizmo04 avatar minseoksuh avatar pewww avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.