I think it could be beneficial for the team to add ESLint to both graphql-server and graphql-server-model-codegen projects. ESLint has integrations with popular IDEs and can make development more pleasant.
I would start with a set of minimalESLint rules and see how it works for us. If there are any intrusive rules, we can disable or override them.
Implementation
Add eslint to devDependencies.
Extend eslint:recommended.
Add indent and semi to auto-fix indentation and semi-colons.
Add quotes style to maintain consistency.
Modify no-unused-vars to either off or warn during development.
Integrations
Microsoft's vscode has an ESLint extension available that provides visual feedback in the editor and can be configured to fix all errors on save.
Description
I think it could be beneficial for the team to add ESLint to both
graphql-server
andgraphql-server-model-codegen
projects. ESLint has integrations with popular IDEs and can make development more pleasant.I would start with a set of minimal ESLint rules and see how it works for us. If there are any intrusive rules, we can disable or override them.
Implementation
eslint
todevDependencies
.eslint:recommended
.indent
andsemi
to auto-fix indentation and semi-colons.quotes
style to maintain consistency.no-unused-vars
to eitheroff
orwarn
during development.Integrations
Microsoft's
vscode
has an ESLint extension available that provides visual feedback in the editor and can be configured to fix all errors on save.The command
eslint.executeAutofix
can also be mapped as a keyboard shortcut, either using the interface via config: