Skip to content

Commit

Permalink
Remove Volto integration for now
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed Feb 15, 2025
1 parent 43c8d9e commit 5ab34d4
Show file tree
Hide file tree
Showing 660 changed files with 30,211 additions and 10,791 deletions.
2 changes: 1 addition & 1 deletion packages/volto/.eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
types/
/types/
50 changes: 27 additions & 23 deletions packages/volto/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,56 +1,63 @@
{
"extends": ["react-app", "prettier", "plugin:jsx-a11y/recommended"],
"extends": [
"react-app",
"prettier",
"plugin:jsx-a11y/recommended",
"./.eslintrc.core.js",
],
"plugins": ["prettier", "react-hooks", "jsx-a11y"],
"root": true,
"env": {
"es6": true,
"browser": true,
"node": true,
"mocha": true,
"jasmine": true
"jasmine": true,
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"legacyDecorators": true
}
"legacyDecorators": true,
},
},
"rules": {
"import/no-unresolved": 1,
"import/named": "error",
"react/jsx-key": [2, { "checkFragmentShorthand": true }],
"no-alert": 1,
"no-console": 1,
"no-debugger": 1,
"prettier/prettier": [
"error",
{ "trailingComma": "all", "singleQuote": true }
{ "trailingComma": "all", "singleQuote": true },
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/react-in-jsx-scope": "off",
"jsx-a11y/label-has-associated-control": "off"
"jsx-a11y/label-has-associated-control": "off",
},
"settings": {
"import/resolver": {
"alias": {
"map": [
["@plone/volto", "./src"],
["@plone/volto-slate", "../volto-slate/src"],
["@plone/registry", "../registry/src"],
["@plone/types", "../types"],
["@package", "./src"],
["@root", "./src"]
["@root", "./src"],
],
"extensions": [".js", ".jsx", ".ts", ".tsx", ".json"]
"extensions": [".js", ".jsx", ".ts", ".tsx", ".json"],
},
"babel-plugin-root-import": {
"rootPathSuffix": "src"
}
"rootPathSuffix": "src",
},
},
"import/core-modules": ["load-volto-addons"],
"react": {
"version": "detect"
}
"version": "detect",
},
},
"overrides": [
{
Expand All @@ -60,17 +67,14 @@
// Re-add it if at some point, we stop relying on it
"extends": ["react-app", "prettier", "plugin:jsx-a11y/recommended"],
"plugins": ["prettier", "react-hooks", "jsx-a11y"],
"parser": "@typescript-eslint/parser"
"parser": "@typescript-eslint/parser",
},
{
"files": [
"**/*.stories.js",
"**/*.stories.jsx"
],
"files": ["**/*.stories.js", "**/*.stories.jsx"],
"rules": {
"import/no-anonymous-default-export": "off"
}
}
"import/no-anonymous-default-export": "off",
},
},
],
"globals": {
"root": true,
Expand All @@ -86,6 +90,6 @@
"Cypress": true,
"jest": true,
"socket": true,
"webpackIsomorphicTools": true
}
"webpackIsomorphicTools": true,
},
}
43 changes: 43 additions & 0 deletions packages/volto/.eslintrc.core.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/** This file is intended to have ESlint configuration only meant to be applied in
* Volto core. Since it relies on the `VOLTOCONFIG` environment variable, it will
* not be applied in CI and command line `make lint` in Volto projects.
* However, it will be applied in IDEs, adding a layer of convenience for developers,
* so they can adapt to use best practices and future deprecations and changes in
* Volto core codebase.
*/
let rules;

if (process.env.VOLTOCONFIG) {
rules = null;
} else {
rules = {
'react/jsx-filename-extension': ['warn', { extensions: ['.tsx', '.jsx'] }],
'no-restricted-imports': [
'warn',
{
name: '@plone/volto/components',
message:
'Importing from barrel files is not allowed. The usage of barrel files is discouraged and they will be removed in Plone 7. Please use direct imports of the modules instead.',
},
{
name: '@plone/volto/helpers',
message:
'Importing from barrel files is not allowed. The usage of barrel files is discouraged and they will be removed in Plone 7. Please use direct imports of the modules instead.',
},
{
name: '@plone/volto/actions',
message:
'Importing from barrel files is not allowed. The usage of barrel files is discouraged and they will be removed in Plone 7. Please use direct imports of the modules instead.',
},
{
name: 'lodash',
message:
"Importing directly from `lodash` is not allowed. Please use `import <helper> from 'lodash/<helper>'` instead.",
},
],
};
}

module.exports = {
...(rules && { rules }),
};
28 changes: 2 additions & 26 deletions packages/volto/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,6 @@ lighthouse-report.html
/.settings/
.*project

# Python
/api/.installed.cfg
/api/.mr.developer.cfg
/api/bin/
/api/develop-eggs/
/api/eggs/
/api/include/
/api/lib/
/api/lib64/
/api/notebook/env/
/api/parts/
/api/share/python-wheels/
/api/src/
/api/test/
/api/var/
/api/venv/
/bin/
/lib/
.Python
include
pip-selfcheck.json
pyvenv.cfg
share
/api/lib64
lib64

# locales
locales/*.json

Expand Down Expand Up @@ -86,3 +60,5 @@ docs/_build/
/.python-version
/.tool-versions
docs/source/news

registry.loader.js
6 changes: 4 additions & 2 deletions packages/volto/.release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
"hooks": {
"before:bump": ["pnpm i18n", "pnpm build:types", "git add types"],
"after:bump": [
"pipx run towncrier build --draft --yes --version ${version} > .changelog.draft && pipx run towncrier build --yes --version ${version}",
"make copyreleasenotestodocs"
"pipx run towncrier build --draft --yes --version ${version} > .changelog.draft",
"pipx run towncrier build --yes --version ${version}",
"cp ../../README.md ./",
"make release-notes-copy-to-docs"
],
"after:release": "rm .changelog.draft"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/volto/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ module.exports = {
[],
defaultRazzleOptions,
);
const AddonConfigurationRegistry = require('@plone/registry/src/addon-registry');
const registry = new AddonConfigurationRegistry(projectRootPath);
const { AddonRegistry } = require('@plone/registry/addon-registry');
const { registry } = AddonRegistry.init(projectRootPath);
config = lessPlugin({
registry,
}).modifyWebpackConfig({
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5ab34d4

Please sign in to comment.