Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add eslint support #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

davelsan
Copy link

@davelsan davelsan commented Sep 9, 2020

Issue

Related to graphql-server-model-codegen #150.

Description

Added support for ESLint.

Implementation

The eslintrc config extends eslint:recommended, with a few additions / modifications:

  • The parser is set to use babel-eslint.
  • Standard rules for indent, linebreak-style, quotes, and semi have been set.
  • Rule no-unused-vars has been set to warn for everything but function args.
  • Code-generated folders are ignored using .eslintignore rules, except for the few files within that are provided statically.

Blocks

None.

Notes

  • Using babel-eslint allows us to use features already supported by NodeJS latest (e.g. static-class-props). When Babel v8 is released this module will be deprecated in favor of @babel/eslint-parser. The migration will likely require a few additional configuration changes.

@davelsan davelsan self-assigned this Sep 9, 2020
@davelsan davelsan added the enhancement New feature or request label Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant