-
Notifications
You must be signed in to change notification settings - Fork 40
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
Linting refactor and enable GitHub actions #3179
Conversation
Annotated or removed as needed.
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.
Partial review. Will finish tomorrow.
"packages/openneuro-app/pluralize-esm.js", | ||
"packages/openneuro-app/src/scripts/utils/schema-validator.js", |
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.
Might be helpful to future readers to know why we're ignoring these. I think this is the reason?
"packages/openneuro-app/pluralize-esm.js", | |
"packages/openneuro-app/src/scripts/utils/schema-validator.js", | |
// Generated from external sources | |
"packages/openneuro-app/pluralize-esm.js", | |
"packages/openneuro-app/src/scripts/utils/schema-validator.js", |
"packages/**/*.ts", | ||
"packages/**/*.tsx", | ||
"packages/**/*.jsx", | ||
"packages/**/*.js", |
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.
Is it reasonable for this thing to lint itself?
"packages/**/*.js", | |
"packages/**/*.js", | |
"eslint.config.mjs", |
@@ -80,7 +79,6 @@ const DatasetHistory = ({ datasetId }) => { | |||
</div> | |||
<div className="col-lg col col-2 grid actions"> | |||
<Revalidate datasetId={datasetId} revision={commit.id} /> | |||
<UpdateRef datasetId={datasetId} revision={commit.id} /> |
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.
Why are we removing this feature? I have occasionally used it.
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.
The mutation it uses hasn't worked since 2022. It would move the HEAD reference in MongoDB but we no longer do that, always following the git repo HEAD reference instead. The git version would be more destructive and I think it's better handled via the git interface itself.
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.
Do we allow force-pushes to revert? If not, then it's just logging into the worker and manually doing the job.
Anyway, if it hasn't worked, then this is no loss, so no further objections.
Finished review. Main concern is dropping the |
The linter hasn't been run on CI in a while and some of the rules in use do not make sense for the current version of the project. This PR replaces the linting config and includes all the required fixes for the new ruleset.
This also adds the new react-compiler beta linter, which can do a better job of catching misuse of React and in the future may be useful for automatic memoization of component rendering.
TODO: