diff --git a/packages/generator-volto/generators/app/templates/.browserslistrc b/packages/generator-volto/generators/app/templates/.browserslistrc new file mode 100644 index 00000000000..ff0e07b7ba5 --- /dev/null +++ b/packages/generator-volto/generators/app/templates/.browserslistrc @@ -0,0 +1,9 @@ +{ + "browserslist": [ + ">1%", + "last 4 versions", + "Firefox ESR", + "not ie 11", + "not dead" + ] +} diff --git a/packages/generator-volto/generators/app/templates/.prettierrc b/packages/generator-volto/generators/app/templates/.prettierrc new file mode 100644 index 00000000000..fd5b441830c --- /dev/null +++ b/packages/generator-volto/generators/app/templates/.prettierrc @@ -0,0 +1,12 @@ +{ + "trailingComma": "all", + "singleQuote": true, + "overrides": [ + { + "files": "*.overrides", + "options": { + "parser": "less" + } + } + ] +} diff --git a/packages/generator-volto/generators/app/templates/.stylelintrc b/packages/generator-volto/generators/app/templates/.stylelintrc new file mode 100644 index 00000000000..67c3e8e1458 --- /dev/null +++ b/packages/generator-volto/generators/app/templates/.stylelintrc @@ -0,0 +1,23 @@ +{ + "extends": ["stylelint-config-idiomatic-order"], + "plugins": ["stylelint-prettier"], + "overrides": [ + { + "files": ["**/*.less"], + "customSyntax": "postcss-less" + }, + { + "files": ["**/*.overrides"], + "customSyntax": "postcss-less" + }, + { + "files": ["**/*.scss"], + "customSyntax": "postcss-scss" + } + ], + "rules": { + "prettier/prettier": true, + "order/properties-alphabetical-order": null + }, + "ignoreFiles": "theme/themes/default/**/*.overrides" +} diff --git a/packages/generator-volto/generators/app/templates/package.json.tpl b/packages/generator-volto/generators/app/templates/package.json.tpl index 28e6502572a..0fad88bdcbd 100644 --- a/packages/generator-volto/generators/app/templates/package.json.tpl +++ b/packages/generator-volto/generators/app/templates/package.json.tpl @@ -70,75 +70,14 @@ "globals": { "__DEV__": true } - }, - "prettier": { - "trailingComma": "all", - "singleQuote": true, - "overrides": [ - { - "files": "*.overrides", - "options": { - "parser": "less" - } - } - ] - }, - "stylelint": { - "extends": [ - "stylelint-config-idiomatic-order" - ], - "plugins": [ - "stylelint-prettier" - ], - "overrides": [ - { - "files": [ - "**/*.less" - ], - "customSyntax": "postcss-less" - }, - { - "files": [ - "**/*.overrides" - ], - "customSyntax": "postcss-less" - }, - { - "files": [ - "**/*.scss" - ], - "customSyntax": "postcss-scss" - } - ], - "rules": { - "prettier/prettier": true, - "rule-empty-line-before": [ - "always-multi-line", - { - "except": [ - "first-nested" - ], - "ignore": [ - "after-comment" - ] - } - ] - }, - "ignoreFiles": "theme/themes/default/**/*.overrides" - }, - "browserslist": [ - ">1%", - "last 4 versions", - "Firefox ESR", - "not ie 11", - "not dead" - ], + } "engines": { - "node": "^16 || ^18 || ^20" + "node": "^18 || ^20" }, "dependencies": <%- dependencies %>, "devDependencies": { "@plone/scripts": "^3.5.0", + "@plone/types": "^1.0.0-alpha.5", "@storybook/addon-actions": "^6.3.0", "@storybook/addon-controls": "6.3.0", "@storybook/addon-essentials": "^6.3.0",