Release Notes / Version 13.2512.0
Table Of ContentsEslint was upgraded to v9.
As this involves changing to the new flat config, we decided to rename our eslint packages and provide a createEslintConfig function, which helps to setup the config for the corresponding package type
@coremedia/studio-client.eslint-config (old name: @coremedia/eslint-config-studio-client)
per default lints "src" and "test" folders with standard rules
@coremedia/studio-client.ext.eslint-config (old name: @coremedia/eslint-config-studio-client)
per default lints "src" and "joounit" folders with extjs specific rules (usually more forgiving than standard rules)
The following steps are necessary to packages using eslint:
1) package.json
Change the devDependency to the new package name (see above)
Remove the file pattern from the eslint script.
2) eslint.config.(m)js
Create the eslint.config.mjs file. You can also create a eslint.config.js if the package is already ESM package. However, ExtJS packages can never be ESM packages.
Write the following content into the file, using the corresponding eslint-config package
import { createEslintConfig } from "@coremedia/studio-client.ext.eslint-config";
export default createEslintConfig();
For more fine granular control over folders that should be linted you can utilize the options parameter of createEslintConfig, e.g.:
import { createEslintConfig } from "@coremedia/studio-client.ext.eslint-config";
export default createEslintConfig({ sourceFolders: ["src", "my-src"] });
3) .eslintrc
In case you do not have made any adjustments you can delete the .eslintrc
Otherwise you need to migrate the changes to v9 (https://eslint.org/docs/latest/use/migrate-to-9.0.0) and add them to the eslint.config.(m)js which can be done like this:
import { createEslintConfig } from "@coremedia/studio-client.eslint-config";
import { defineConfig, globalIgnores } from "eslint/config";
export default defineConfig([
createEslintConfig(),
{
// your custom eslint config
},
]);
4) Run the linter and fix reported problems
As this is a major upgrade of the standard eslint some rules sets have been added or changed.
Our goal was to find the balance between avoiding major breaking changes for the code base but still benefiting from these improvements, so we adjusted the rules if necessary. However, there might still might be some newly reported problems to fix.
(CMS-25598)


