Skip to content

Commit

Permalink
Merge pull request #83 from eea/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
alecghica authored Feb 5, 2025
2 parents 766317b + 6a9b51f commit 8d2e917
Show file tree
Hide file tree
Showing 18 changed files with 429 additions and 141 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Jest configuration variables
# - possible values: ON, OFF
JEST_USE_SETUP=OFF
65 changes: 65 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
const fs = require('fs');
const path = require('path');
const projectRootPath = fs.realpathSync(__dirname + '/../../../');

let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto');
let configFile;
if (fs.existsSync(`${projectRootPath}/tsconfig.json`))
configFile = `${projectRootPath}/tsconfig.json`;
else if (fs.existsSync(`${projectRootPath}/jsconfig.json`))
configFile = `${projectRootPath}/jsconfig.json`;

if (configFile) {
const jsConfig = require(configFile).compilerOptions;
const pathsConfig = jsConfig.paths;
if (pathsConfig['@plone/volto'])
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig['@plone/volto'][0]}`;
}

const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
const reg = new AddonConfigurationRegistry(projectRootPath);

// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
const addonAliases = Object.keys(reg.packages).map((o) => [
o,
reg.packages[o].modulePath,
]);

const addonExtenders = reg.getEslintExtenders().map((m) => require(m));

const defaultConfig = {
extends: `${voltoPath}/.eslintrc`,
settings: {
'import/resolver': {
alias: {
map: [
['@plone/volto', '@plone/volto/src'],
['@plone/volto-slate', '@plone/volto/packages/volto-slate/src'],
...addonAliases,
['@package', `${__dirname}/src`],
['@root', `${__dirname}/src`],
['~', `${__dirname}/src`],
],
extensions: ['.js', '.jsx', '.json'],
},
'babel-plugin-root-import': {
rootPathSuffix: 'src',
},
},
},
rules: {
'react/jsx-no-target-blank': [
'error',
{
allowReferrer: false,
},
],
},
};

const config = addonExtenders.reduce(
(acc, extender) => extender.modify(acc),
defaultConfig,
);

module.exports = config;
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.vscode/
.history
.eslintrc.js
.nyc_output
project
coverage
Expand Down
48 changes: 0 additions & 48 deletions .project.eslintrc.js

This file was deleted.

17 changes: 15 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,24 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [0.1.49](https://github.com/eea/volto-climate-advisory-board-policy/compare/0.1.48...0.1.49) - 30 August 2024
### [0.1.50](https://github.com/eea/volto-climate-advisory-board-policy/compare/0.1.49...0.1.50) - 5 February 2025

#### :house: Internal changes

- chore: fix eslint errors [ana-oprea - [`063162f`](https://github.com/eea/volto-climate-advisory-board-policy/commit/063162f7000f9eae6f2d7938d3f1a866818f68af)]
- style: Automated code fix [eea-jenkins - [`a1652cd`](https://github.com/eea/volto-climate-advisory-board-policy/commit/a1652cd6a9294e145b44c04ff26406405af7bfcd)]

#### :hammer_and_wrench: Others

- pin design system version [Teodor - [`b1a3095`](https://github.com/eea/volto-climate-advisory-board-policy/commit/b1a30958c1b479d4953e4a0b5f51d1228927fbdf)]
- fix search block facets [Teodor - [`c628c1c`](https://github.com/eea/volto-climate-advisory-board-policy/commit/c628c1c4040310e158f144cbffa2294250b99ac0)]
- update dependencies [Teodor - [`a3191c8`](https://github.com/eea/volto-climate-advisory-board-policy/commit/a3191c813d8ed9f7ab19db71802d6d54794db944)]
- fix linting error [Teodor - [`36b6697`](https://github.com/eea/volto-climate-advisory-board-policy/commit/36b66977ad66e76fdec3af0e90db7b3963226d04)]
- resolve conflicts with develop [Teodor - [`8612e55`](https://github.com/eea/volto-climate-advisory-board-policy/commit/8612e55aaab53d43a276a4fc9b83ac40ec7e08a5)]
- update eslint and jenkinsfile [Teodor - [`ae7b010`](https://github.com/eea/volto-climate-advisory-board-policy/commit/ae7b01053d5574558ac43199353ab3dc6f8b779a)]
- test: Update to volto 17 PR30 [valentinab25 - [`732bde7`](https://github.com/eea/volto-climate-advisory-board-policy/commit/732bde758a12515dfdb5fe8ae0f4cfe9b3456f52)]
- test: Update to volto 17 PR30 [valentinab25 - [`2d99ed4`](https://github.com/eea/volto-climate-advisory-board-policy/commit/2d99ed4fddf146020623b5d3f58ba075f2ec8205)]
### [0.1.49](https://github.com/eea/volto-climate-advisory-board-policy/compare/0.1.48...0.1.49) - 30 August 2024

### [0.1.48](https://github.com/eea/volto-climate-advisory-board-policy/compare/0.1.47...0.1.48) - 29 August 2024

#### :hammer_and_wrench: Others
Expand Down
Loading

0 comments on commit 8d2e917

Please sign in to comment.