diff --git a/website/docs/migrations/11-12.md b/website/docs/migrations/11-12.md index 4569bdb02..9913343a4 100644 --- a/website/docs/migrations/11-12.md +++ b/website/docs/migrations/11-12.md @@ -69,7 +69,7 @@ The `Manifest` class has been removed. If you are using this class in your proje **Migration time: ~5min.** -1. Run the `wp boilerplate manifest-cache` CLI command to add the cache functionality to your project. +1. Run the `wp boilerplate create manifest-cache` CLI command to add the cache functionality to your project. 2. Open the `functions.php` (or `.php`) file and add the following code before the `Main` class initialization: - [for themes](https://github.com/infinum/eightshift-libs/blob/main/src/Init/theme/functions.php) @@ -218,3 +218,28 @@ const projectConfig = { }, }; ``` + +### Update ES Lint config + +**Migration time: ~10min.** + +Depending on the state the project is in, you might need to allocate some time for fixing errors and warnings after updating the coding standards. + +ESLint configuration has been updated in Frontend libs 12 and a new build config was added. + +To implement the changes, follow these steps: + +1. Delete the `.eslintrc.js` and `.eslintignore` files from the theme root (if they exist) + +2. Add `eslint.config.mjs` file to the theme root with the following content: +```js +import config from '@eightshift/frontend-libs/linters/eslint.config.mjs'; + +export default [{ + ignores: ["public/**/*.js"], +}, ...config]; +``` + +3. Add a `.swcrc` file to theme root, the file and its content can be found in the eightshift libs standard theme setup [.swcrc](https://github.com/infinum/eightshift-libs/blob/main/src/InitSetup/standard/theme/.swcrc) file. + +4. Make sure the project is using NodeJS version 20 (or newer) both in development and production environments.