Skip to content

Releases: sumup-oss/foundry

v5.0.0

06 May 16:54
Compare
Choose a tag to compare

5.0.0 (2022-05-06)

Foundry v5 is easier than ever to set up, adapts automatically to your project, and includes a slew of helpful new lint rules. The minimum Node version has been raised to ^14.17 || >=16 (i.e. Node 15 is not supported). Here's how to upgrade:

Automatic configuration ✨

Foundry analyses your package.json file and can automatically detect which environments your project runs in, which language it's written in, which frameworks are being used, and whether the project is open source. This eliminates the need for custom configuration in most cases and enables Foundry to adapt the tool configs as your project evolves. That's why the tool configs no longer accept an options argument, so you'll need to update them accordingly. Here's an example:

// .eslintrc.js

// This...
module.exports = require('@sumup/foundry/eslint')(
  {
    language: 'TypeScript',
    environments: ['Node', 'Browser'],
    frameworks: ['React', 'Emotion', 'Jest'],
    openSource: false,
  },
  {
    rules: {
      'max-len': 'off',
    },
  },
);

// ...becomes this:
module.exports = require('@sumup/foundry/eslint')({
  rules: {
    'max-len': 'off',
  },
});

Should the automatic detection be inaccurate, please open an issue so we can improve it for everyone. Alternatively, you can explicitly set the options under the foundry property in your package.json file:

{
  "foundry": {
    "environments": ["Browser"],
    "publish": true
  }
}

Refer to the documentation for all available configuration options.

New lint rules 🧿

Foundry v5 upgrades to ESLint 8 and includes new plugins for Next.js, Playwright, and browser compatibility.

Especially on larger codebases, the number of new lint errors can be overwhelming. In that case, we recommend using overrides to set the severity level of the new rules to warn, thus enabling you to address them gradually.

No more "templates" preset 🧹

The "templates" preset appeared to be mostly unused and the template files were quite outdated. Since the maintenance of the preset doesn't seem to be worth the effort, we decided to remove it. If you set up the preset but weren't using it, you should remove the plopfile.js file and the create-component script from the package.json file.

Troubleshooting

You might encounter an error like ESLint couldn't find the config/plugin/preset ... when running yarn lint after the upgrade. This can happen when duplicated or outdated sub-dependencies of Foundry are installed. In order to fix this, remove @sumup/foundry from the package.json file, run yarn, then add @sumup/foundry back to the package.json file and run yarn again. This forces a fresh install of Foundry's latest dependencies.


Full Changelog

Features

BREAKING CHANGES

  • Configuration options are now detected automatically. Any manual configuration in tooling config files should be removed.
  • Remove the 'templates' preset.
  • Increase the minimum Node version to ^14.17 || >=16.
  • Upgrade to ESLint 8 and upgrade all plugins and presets. Read the migration guide.
  • Upgrade to lint-staged 12. Read the release notes.
  • Enable Emotion 11 codemods.

v5.0.0-canary.9

06 May 10:31
c347790
Compare
Choose a tag to compare
v5.0.0-canary.9 Pre-release
Pre-release

5.0.0-canary.9 (2022-05-06)

Features

BREAKING CHANGES

  • Configuration options are now detected automatically. Any manual configuration in tooling config files should be removed.

v5.0.0-canary.8

06 May 08:52
eb0105f
Compare
Choose a tag to compare
v5.0.0-canary.8 Pre-release
Pre-release

5.0.0-canary.8 (2022-05-06)

Bug Fixes

  • use the Next.js ESLint config, not plugin (#510) (eb0105f)

v5.0.0-canary.12

06 May 16:43
Compare
Choose a tag to compare
v5.0.0-canary.12 Pre-release
Pre-release

5.0.0-canary.12 (2022-05-06)

Bug Fixes

  • work around false positive compatibility error (8b79d2a)

v5.0.0-canary.11

06 May 16:38
Compare
Choose a tag to compare
v5.0.0-canary.11 Pre-release
Pre-release

5.0.0-canary.11 (2022-05-06)

Bug Fixes

  • work around false positive compatibility error (87db6c7)

v5.0.0-canary.10

06 May 14:46
eb6c419
Compare
Choose a tag to compare
v5.0.0-canary.10 Pre-release
Pre-release

5.0.0-canary.10 (2022-05-06)

Bug Fixes

v5.0.0-canary.7

05 May 13:49
1224512
Compare
Choose a tag to compare
v5.0.0-canary.7 Pre-release
Pre-release

5.0.0-canary.7 (2022-05-05)

Features

BREAKING CHANGES

  • Remove the 'templates' preset.

v5.0.0-canary.6

03 May 20:31
56a3b91
Compare
Choose a tag to compare
v5.0.0-canary.6 Pre-release
Pre-release

5.0.0-canary.6 (2022-05-03)

Features

  • automatically detect used frameworks (#507) (56a3b91)

v5.0.0-canary.5

03 May 19:05
3ec8c3e
Compare
Choose a tag to compare
v5.0.0-canary.5 Pre-release
Pre-release

5.0.0-canary.5 (2022-05-03)

Features

v5.0.0-canary.4

03 May 16:14
05a8a2d
Compare
Choose a tag to compare
v5.0.0-canary.4 Pre-release
Pre-release

5.0.0-canary.4 (2022-05-03)

Features

  • eslint: disable the react/display-name rule (#493) (05a8a2d)