GithubHelp home page GithubHelp logo

flay's Introduction

flay - filesystem layout linter

Usage:

In the root of your JavaScript project:

  yarn add -D git://github.com/mzedeler/flay
  yarn flay .

This will then lint your filesystem according to the following rules:

Compound directories must contain an index file

Ok:

  MyFancyComponent
    +-- index.ts
    +-- MyFancyComponent.tsx
    +-- MyFancyComponent.test.tsx

Not ok:

  MyFancyComponent
    +-- MyFancyComponent.tsx
    +-- MyFancyComponent.test.tsx

Collection directories must not contain an index file

Ok:

  components
    +-- MyFancyComponent.tsx
    +-- MyOtherFancyComponent.tsx

Not qk:

  components
    +-- index.ts
    +-- MyFancyComponent.tsx
    +-- MyOtherFancyComponent.tsx

Definitions

Currently, compound directories are defined as any directory with a capital letter in the name.

Any non-compound directory is classified as a collection.

Ignore file

It is possible to skip validation of a directory by adding it to .flayignore, but this only works if you add the exact path of every directory you want to ignore:

To ignore foo/bar here:

  foo
    +-- bar

Put foo/bar in a top level .flayignore file or but bar in a .flayignore file in foo.

Contributors

Michael Zedeler [email protected]

flay's People

Contributors

mzedeler avatar

Stargazers

Kræn Hansen avatar Kristian Dupont avatar

Watchers

 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.