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

[cleanup] Bump dependency version and fix new linter errors #267

Merged
merged 1 commit into from Aug 29, 2019

Conversation

SamChou19815
Copy link
Contributor

@SamChou19815 SamChou19815 commented Aug 28, 2019

Inside This PR

Bump dependencies to their latest version.

Notes

Since there is a linter version bump, I also fixed all the new linter errors. I suppressed some types of linter errors, and added the rationale in my review comments.

Checklist:

  • My code follows the code style of this project.
  • I tested affected functionality.
  • I resolved any merge conflicts.
  • My PR is ready for review.

@@ -17,12 +17,17 @@
"ExportDeclaration": { "minProperties": 10, "multiline": true, "consistent": true }
}
],
"react/prop-types": "off",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We already have TS. This is unnecessary

@@ -17,12 +17,17 @@
"ExportDeclaration": { "minProperties": 10, "multiline": true, "consistent": true }
}
],
"react/prop-types": "off",
"react/jsx-props-no-spreading": "warn",
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 think it may become harmful in the future due to this React commit and we eventually want to fix it. Therefore, I change the level to warning.

"react/jsx-filename-extension": ["error", { "extensions": [".jsx", ".tsx"] }],
"import/extensions": [".js", ".mjs", ".jsx", ".ts", ".tsx"],
"react/state-in-constructor": "off",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't work well with

class A extends React.Component {
  state =  { foo: 'bar' };
}

"react/jsx-filename-extension": ["error", { "extensions": [".jsx", ".tsx"] }],
"import/extensions": [".js", ".mjs", ".jsx", ".ts", ".tsx"],
"react/state-in-constructor": "off",
"import/extensions": "off",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't like json extension

"indent": "off",
"@typescript-eslint/ban-ts-ignore": "warn",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's better to have warnings so we can fix it eventually.

"@typescript-eslint/indent": ["error", 2],
"@typescript-eslint/prefer-interface": "off",
"@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }],
"@typescript-eslint/no-angle-bracket-type-assertion": "off",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deprecated in @typescript-eslint v2. Have to keep it and set to off since create-react-app still uses V1. There is a pull request that tries to fix it: facebook/create-react-app#7540

@SamChou19815 SamChou19815 changed the title [cleanup] Bump dependency version and perform code cleanup [cleanup] Bump dependency version and fix new linter errors Aug 28, 2019
Copy link
Member

@mt-xing mt-xing 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

@SamChou19815 SamChou19815 merged commit 8ee8df4 into master Aug 29, 2019
@SamChou19815 SamChou19815 deleted the bump-version-code-cleanup branch August 29, 2019 00:01
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