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

Update Lint and TypeScript Settings #64

Closed
wants to merge 5 commits into from

Conversation

wolfendale
Copy link

Changes:

This updates some eslint and TypeScript settings, and resolves some eslint errors, also adds dist to .gitignore

I have removed the webfiles projects from the scope of TypeScript compilation for now as they should likely be their own compiled projects

eslint

  • Separates eslint configuration into 3 parts:
    1. eslint for server JavaScript files
    2. eslint for server TypeScript files (this extends 1. but includes extra TypeScript specific rules)
    3. eslint for projects in the webfiles directory
  • Addresses all remaining eslint errors, most of which were simple
  • A few of the eslint errors related to potential bugs that I've provided a fix for:
    1. this commit adds offset as a skip parameter to the mongo query, and updates the link sent as a response so that pagination should work properly. I assume this is what was intended
    2. src/utils.js was using sharp without importing it, so I've added an import for that

I have also disabled eslint for all projects in the webfiles directory temporarily as the eslint settings that were being applied were likely inappropriate. I have also included a separate eslint configuration file for these projects with an initial attempt as a sensible configuration. However, there are some questions before I can finish this:

  1. Are these all one project or should they really have their own separate eslint configs? One reason I'm thinking this is that they all appear to use a variety of globals that I'm not sure are applicable to every one of the projects.
  2. What version of ES should we be aiming for in each of these projects?

TypeScript

  • Adds required types modules to allow the project to compile properly
  • Changes TypeScript config to exclude webfiles sources

Tasks

@wolfendale
Copy link
Author

Superseded by #65

@wolfendale wolfendale closed this May 22, 2024
@wolfendale wolfendale deleted the eslint-changes-dev branch May 22, 2024 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant