Skip to content

2.29.1

Compare
Choose a tag to compare
@robyngit robyngit released this 04 Jun 16:19
· 324 commits to main since this release
86cc49d

This release prioritizes enhancements in code quality and consistency within MetacatUI, without introducing new features or fixing bugs. These changes are aimed at supporting developers and contributors, and do not alter the functionality or user experience of MetacatUI.

We have incorporated linting and formatting tools into our development workflow, including a defined style guide and automated code quality checks. These tools will help standardize the codebase, identify issues early, and enhance the development process.

🛠️ Tools Implemented

🎨 Prettier

Prettier automates code formatting to ensure consistency across the project, helping to improve readability, reduce merge conflicts, and maintain codebase integrity. Developers can use the npm run format command to apply Prettier. With this release, the entire codebase has been reformatted to apply Prettier standards.

🔬 ESLint

As a static code analysis tool, ESLint helps identify errors and enforce coding standards. It's integrated into our workflow to assist developers in catching common errors, maintaining consistent coding styles, and adhering to best practices. The npm run lint command is available for checking linting errors.

Our ESLint configuration aligns with the Airbnb JavaScript style guide, with modifications to accommodate RequireJS and JSDoc standards specific to MetacatUI. We are phasing in these standards, starting with new and modified code and gradually extending to the entire codebase.

:octocat: Automated Checks with GitHub Actions

GitHub Actions have been set up to automatically verify formatting and linting errors on new pull requests, providing quick feedback to developers and speeding up the review process. These checks will run on pull requests, in addition to our existing unit tests and doc build test.

⚠️ Notice for Developers with MetacatUI Forks

The reformatting of the codebase with Prettier could cause merge conflicts with MetacatUI forks that have extensive customizations. Below is a guideline to help integrate these changes:

Integration Guidelines

  1. Make sure your fork is up to date with the previous release (version 2.29.0).
  2. Cherry pick the initial commit that configures and adds Prettier: git cherry-pick 87dead8
  3. Run npm install to add Prettier as a development dependency, then run npm run format to apply Prettier formatting to all files. Commit the changes.
  4. Cherry pick the next commit that applies Prettier formatting to the entire codebase. git cherry-pick f33bf9e. Resolve any resulting merge conflicts: conflicts should only arise where your fork has customizations, and not where there are simply formatting changes.
  5. Integrate the remaining commits. As ESLint fixes are pending application to the codebase, subsequent merge conflicts should be minimal.

For further details on tool implementation and testing, review the discussion on the associated Pull Request and issue; our updated CONTRIBUTING guide, the ESLint configuration file, and the Prettier configuration file. For questions or assistance with the new tools, please contact us on Slack or through the GitHub discussion board.