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
Run Prettier and fix ESLint complaints #28
Conversation
@gwwatkin I turned off Also here are the last warnings I am having for LatticeView.tsx:
Since they are warnings they won't fail any CI we setup later on, but if you can fix it go ahead. |
Get this error running
Which is strange because, |
Ok found the problem the |
Tried this: import-js/eslint-plugin-import#1645 (comment) |
This is the only thing that fixes it, though it excludes js and jsx files from liniting diff --git a/package.json b/package.json
index 2828b95..8353fac 100644
--- a/package.json
+++ b/package.json
@@ -34,8 +34,8 @@
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
- "lint": "eslint src/**/*.{js,jsx,ts,tsx}",
- "lint:fix": "eslint --fix src/**/*.{js,jsx,ts,tsx}"
+ "lint": "eslint src/**/*.{ts,tsx}",
+ "lint:fix": "eslint --fix src/**/*.{ts,tsx}"
},
"browserslist": {
"production": [
|
Not that it's a big problem to excluding js and jsx from linting, but it would be nice to combine it with something that forbids Also if we do end up adding some plain js we can always just re enable the option. |
"lint": "eslint --no-error-on-unmatched-pattern src/**/*.{js,jsx,ts,tsx}", | ||
"lint:fix": "eslint --no-error-on-unmatched-pattern --fix src/**/*.{js,jsx,ts,tsx}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok it turns out I could just add this option here, sorry for the noise in the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem, nice to see that we have a fix for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some fixes
--no-error-on-unmatched-pattern
- null assertion warnings
- removed the ts-ignore directive
const windowWidth = $(window).width() ?? 1000 // Default width | ||
if (windowWidth > 991) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Keelando any idea if .width()
can ever return null?
As title