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

Made ESLint lint all TypeScript files and fix a few linter errors #273

Merged
merged 11 commits into from
Apr 6, 2022

Conversation

jaller94
Copy link
Contributor

@jaller94 jaller94 commented Apr 3, 2022

  • Lint all files by quoting the paths in package.json. Currently, *.ts files directly in the src folder are not linted on all operating systems because ** resolves to folder names.
  • Lint the test and web folder with slightly adapted rules.
  • Fix all ESLint errors
  • Fix a few ESLint warnings.

Copy link
Contributor

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, we must include the preact imports in preact code or the compilation will fail. Eslint doesn't know that it's needed.

There is possibly a linter rule exemltion we need to import for this, I've not checked

@jaller94 jaller94 changed the title Remove unused imports Made ESLint lint all TypeScript files and fix a few linter errors Apr 4, 2022
package.json Show resolved Hide resolved
Comment on lines +49 to +52
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": ["error"],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't figure out why the regular eslint rules were still being used.
Only the TypeScript variants make sense for this code base.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, suppose we can come back to this one when it poses a problem for us. The linter seems happy for the moment.

@jaller94 jaller94 requested a review from Half-Shot April 4, 2022 12:56
Copy link
Contributor

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks a ton for cleaning up the .eslintrc.js file :)

.eslintrc.js Outdated Show resolved Hide resolved
Comment on lines +49 to +52
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": ["error"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, suppose we can come back to this one when it poses a problem for us. The linter seems happy for the moment.

@Half-Shot Half-Shot merged commit 7df772c into main Apr 6, 2022
@Half-Shot Half-Shot deleted the j94/unused-imports branch April 6, 2022 14:25
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.

None yet

2 participants