Skip to content

Commit

Permalink
Merge pull request #1 from plone/fixesfromlastmonth
Browse files Browse the repository at this point in the history
Fixes from last month
  • Loading branch information
ericof authored May 7, 2024
2 parents 0cbac78 + f6bffa4 commit 2d6c35c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ trim_trailing_whitespace = true
charset = utf-8
# Indent style default
indent_style = space
# Max Line Length - a hard line wrap, should be disabled
max_line_length = off

[*.{py,cfg,ini}]
# 4 space indentation
Expand Down
20 changes: 16 additions & 4 deletions frontend_addon/{{ cookiecutter.__folder_name }}/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
const fs = require('fs');
const projectRootPath = __dirname;

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

module.exports = {
extends: './core/packages/volto/.eslintrc',
extends: `${coreLocation}/packages/volto/.eslintrc`,
rules: {
'import/no-unresolved': 1,
},
settings: {
'import/resolver': {
alias: {
map: [
['@plone/volto', './core/packages/volto/src'],
['@plone/volto-slate', './core/packages/volto-slate/src'],
['@plone/registry', './core/packages/registry/src'],
['@plone/volto', `${coreLocation}/packages/volto/src`],
[
'@plone/volto-slate',
`${coreLocation}/core/packages/volto-slate/src`,
],
['@plone/registry', `${coreLocation}/packages/registry/src`],
[
'{{ cookiecutter.npm_package_name }}',
'./packages/{{ cookiecutter.frontend_addon_name }}/src',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"hooks": {
"after:bump": "pipx run towncrier build --draft --yes --version ${version} > .changelog.draft && pipx run towncrier build --yes --version ${version} && cp ../../README.md ./",
"after:bump": [
"pipx run towncrier build --draft --yes --version ${version} > .changelog.draft",
"pipx run towncrier build --yes --version ${version}",
"cp ../../README.md ./ && cp CHANGELOG.md ../../CHANGELOG.md",
"git add ../../CHANGELOG.md"
],
"after:release": "rm .changelog.draft README.md"
},
"git": {
Expand Down

0 comments on commit 2d6c35c

Please sign in to comment.