Skip to content

Commit

Permalink
Fix lint in frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed Nov 12, 2024
1 parent 3e814ba commit 57843dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions frontend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
const fs = require('fs');
const projectRootPath = __dirname;
const AddonConfigurationRegistry = require('@plone/registry/src/addon-registry');
const { AddonRegistry } = require('@plone/registry/addon-registry');

let coreLocation;
if (fs.existsSync(`${projectRootPath}/core`))
coreLocation = `${projectRootPath}/core`;
else if (fs.existsSync(`${projectRootPath}/../../core`))
coreLocation = `${projectRootPath}/../../core`;

const registry = new AddonConfigurationRegistry(
`${coreLocation}/packages/volto`,
);
const { registry } = AddonRegistry.init(`${coreLocation}/packages/volto`);

// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
const addonAliases = Object.keys(registry.packages).map((o) => [
Expand Down
4 changes: 2 additions & 2 deletions frontend/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ module.exports = {
[],
defaultRazzleOptions,
);
const AddonConfigurationRegistry = require('@plone/registry/src/addon-registry');
const { AddonRegistry } = require('@plone/registry/addon-registry');

const registry = new AddonConfigurationRegistry(projectRootPath);
const { registry } = new AddonRegistry.init(projectRootPath);

config = lessPlugin({ registry }).modifyWebpackConfig({
env: { target: 'web', dev: 'dev' },
Expand Down

0 comments on commit 57843dd

Please sign in to comment.