Skip to content

Refactor codebase to follow standard structure #160

Open
@bradzacher

Description

@bradzacher

The codebase is pretty unwieldy as is - all the code is defined across two files.
It'd be good (and less intimidating for new contributors) if the code could be refactored to more of a "best practice" structure.

A good example is either https://github.com/benmosher/eslint-plugin-import, or https://github.com/nzakas/eslint-plugin-typescript.

Both of these roughly structure the code into:

/
|
+ - + src/
    |
    + - rules/ # each rule, defined in its own file
    |
    + - settings/ # config for the shared plugin settings
    |
    + - index.js # import all of the rule defs and export a "rules" object mapping the names to the configs.

At the same time, could address #157, so that the plugin config is "decoupled" from the rule config.

Considering there is also already babel running as part of the build, would it be worth instead converting the codebase to typescript?
Considering apollo is a typescript shop, it seems like it would be a good fit.

Issue Labels

  • has-reproduction
  • feature
  • docs
  • blocking
  • good first issue

/label refactor
/label discussion

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions