Skip to content

Commit

Permalink
Fixed to get theme to work
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredsgenkins committed Oct 13, 2022
1 parent ad47b25 commit 85582b7
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 109 deletions.
2 changes: 2 additions & 0 deletions build-packages/csa-generator-theme/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ const run = async (options) => {
let mosaicCracoVersion = '0.0.0';
let tsServerPluginVersion = '0.0.0';
const postcssVersion = '8.4.5';
const reactTypesVersion = '18.0.17';

try {
scandipwaVersion = await getLatestVersion('@scandipwa/scandipwa');
Expand Down Expand Up @@ -195,6 +196,7 @@ const run = async (options) => {
mosaicVersion,
mosaicCracoVersion,
postcssVersion,
reactTypesVersion,
proxy: DEFAULT_PROXY,
eslintConfigVersion,
};
Expand Down
26 changes: 1 addition & 25 deletions build-packages/csa-generator-theme/template/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
/**
* ScandiPWA - Progressive Web App for Magento
*
* Copyright © Scandiweb, Inc. All rights reserved.
* See LICENSE for license details.
*
* @license OSL-3.0 (Open Software License ("OSL") v. 3.0)
* @package scandipwa/scandipwa
* @link https://github.com/scandipwa/scandipwa
*/

module.exports = {
extends: [
'@scandipwa',
Expand All @@ -19,19 +8,6 @@ module.exports = {
requireConfigFile: false,
},
rules: {
// be more strict to core
'fp/no-let': 'error',
'fp/no-loops': 'error',
// add license
'@scandipwa/scandipwa-guidelines/use-license': 'error',
// avoid duplicate namespaces for core
'@scandipwa/scandipwa-guidelines/no-duplicate-namespaces': 'error',
// TODO: disable someday
'@scandipwa/scandipwa-guidelines/jsx-no-conditional': 'off',
'@scandipwa/scandipwa-guidelines/only-render-in-component': 'off',
'@scandipwa/scandipwa-guidelines/no-jsx-variables': 'off',
'@typescript-eslint/naming-convention': 'off',
'max-lines': 'off',
'max-len': 'off',
// TODO: disable or enable rules here
},
};
3 changes: 2 additions & 1 deletion build-packages/csa-generator-theme/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"@scandipwa/ts-server-plugin": "<%= tsServerPluginVersion %>",
"@tilework/mosaic": "<%= mosaicVersion %>",
"@tilework/mosaic-craco": "<%= mosaicCracoVersion %>",
"postcss": "<%= postcssVersion %>"
"postcss": "<%= postcssVersion %>",
"@types/react": "<%= reactTypesVersion %>"
},
"scandipwa": {
"type": "theme",
Expand Down
5 changes: 3 additions & 2 deletions build-packages/csa-generator-theme/template/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "./mosaic.jsconfig.json",
"compilerOptions": {
"target": "es5",
"lib": [
Expand All @@ -21,8 +22,8 @@
"jsx": "react-jsx"
},
"include": [
"./src/**/*",
"./node_modules/@scandipwa/scandipwa/src/**/*"
"./node_modules/@scandipwa/scandipwa/src/**/*",
"./src/**/*"
],
"exclude": []
}
12 changes: 6 additions & 6 deletions build-packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ const commonRules = {
code: 120,
},
],
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
// 'jest/no-disabled-tests': 'warn',
// 'jest/no-focused-tests': 'error',
// 'jest/no-identical-title': 'error',
// 'jest/prefer-to-have-length': 'warn',
// 'jest/valid-expect': 'error',
// TODO: check vvv
'no-shadow': 0,
'class-methods-use-this': 0,
Expand Down Expand Up @@ -489,7 +489,7 @@ module.exports = {
'import',
'react',
'import',
'jest',
// 'jest',
'babel',
'fp',
],
Expand Down
2 changes: 1 addition & 1 deletion build-packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@scandipwa/eslint-plugin-scandipwa-guidelines": "^2.0.36",
"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-plugin-array-func": "^3.1.7",
"eslint-plugin-babel": "^5.3.1",
Expand Down
6 changes: 2 additions & 4 deletions packages/scandipwa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@types/react-redux": "7.1.24",
"@types/react-router": "^5.1.16",
"@types/react-router-dom": "^5.1.8",
"@types/react-datepicker": "^4.4.1",
"@types/webpack-env": "^1.16.3",
"buffer": "^6.0.3",
"eslint-config-airbnb-typescript": "^16.1.4",
Expand Down Expand Up @@ -128,8 +129,5 @@
"access": "public"
},
"proxy": "https://demo100-ors-1588667385-csa-hcx.scandipwa.cloud/",
"gitHead": "187276597fcf17521bcccdac1238b4e0061e5418",
"devDependencies": {
"@types/react-datepicker": "^4.4.1"
}
"gitHead": "187276597fcf17521bcccdac1238b4e0061e5418"
}
90 changes: 20 additions & 70 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,7 @@
dependencies:
regenerator-runtime "^0.13.4"

"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.18.9", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.16.3", "@babel/runtime@^7.18.9", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
version "7.19.0"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.0.tgz#22b11c037b094d27a8a2504ea4dcff00f50e2259"
integrity sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==
Expand Down Expand Up @@ -2938,41 +2938,6 @@
semver "^7.3.2"
validate-npm-package-name "^3.0.0"

"@scandipwa/[email protected]":
version "5.3.4"
resolved "https://registry.yarnpkg.com/@scandipwa/scandipwa/-/scandipwa-5.3.4.tgz#d08c5dc7fd792a2228059216ac8096bb90297e19"
integrity sha512-RENezKckL4hViMmCtIqiAFH5uf4dLgd1jCR46xKoJiyRkmaP+lG5F+NlbL0iD2V1KXc2wwi2uOjCbviyoZi2AQ==
dependencies:
"@scandipwa/chunk-optimizer" "0.0.8"
"@scandipwa/m2-theme" "0.2.4"
"@scandipwa/next-emulator" "0.0.3"
"@scandipwa/postcss-config" "0.0.2"
"@scandipwa/scandipwa-scripts" "2.4.21"
"@scandipwa/service-worker" "0.0.17"
"@scandipwa/stylelint-config" "0.0.7"
"@scandipwa/webpack-i18n-runtime" "0.0.31"
history "^4.9.0"
html-react-parser "^0.13.0"
intersection-observer "^0.12.0"
jwt-decode "^3.1.2"
postcss "8.4.5"
prop-types "^15.6.2"
react "^16.13.1"
react-datepicker "^4.3.0"
react-dom "^16.13.1"
react-input-range "^1.3.0"
react-intersection-observer "^8.31.0"
react-redux "^7.2.0"
react-router "^5.2.0"
react-router-dom "^5.2.0"
react-stripe-elements "^6.1.2"
react-vimeo "^2.0.0"
react-youtube "^7.11.2"
react-zoom-pan-pinch "^1.6.1"
rebem-classname "^0.4.0"
redux "^4.0.5"
unstated "^2.1.1"

"@scandipwa/webpack-fallback-plugin@^1.2.5":
version "1.2.5"
resolved "https://registry.yarnpkg.com/@scandipwa/webpack-fallback-plugin/-/webpack-fallback-plugin-1.2.5.tgz#325e5edeecf8a2c800cb6b64b6f02821382dbea5"
Expand Down Expand Up @@ -3586,7 +3551,7 @@
dependencies:
"@types/react" "*"

"@types/[email protected]", "@types/react-redux@^7.1.20":
"@types/[email protected]":
version "7.1.24"
resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.24.tgz#6caaff1603aba17b27d20f8ad073e4c077e975c0"
integrity sha512-7FkurKcS1k0FHZEtdbbgN8Oc6b+stGSfZYjQGicofJ0j4U0qIn/jaSvnP2pLwZKiai3/17xqqxkkrxTgN8UNbQ==
Expand Down Expand Up @@ -6385,11 +6350,6 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7:
safe-buffer "^5.0.1"
sha.js "^2.4.8"

create-react-context@^0.1.5:
version "0.1.6"
resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.1.6.tgz#0f425931d907741127acc6e31acb4f9015dd9fdc"
integrity sha512-eCnYYEUEc5i32LHwpE/W7NlddOB9oHwsPaWtWzYtflNkkwa3IfindIcoXdVWs12zCbwaMCavKNu84EXogVIWHw==

[email protected]:
version "3.0.6"
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.0.6.tgz#3a4040bc8941e653e0e9cf17f29ebcd177d3365c"
Expand Down Expand Up @@ -7575,6 +7535,15 @@ eslint-ast-utils@^1.0.0:
lodash.get "^4.4.2"
lodash.zip "^4.2.0"

eslint-config-airbnb-base@^14.2.1:
version "14.2.1"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e"
integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==
dependencies:
confusing-browser-globals "^1.0.10"
object.assign "^4.1.2"
object.entries "^1.1.2"

eslint-config-airbnb-base@^15.0.0:
version "15.0.0"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz#6b09add90ac79c2f8d723a2580e07f3925afd236"
Expand All @@ -7599,14 +7568,14 @@ eslint-config-airbnb-typescript@^17.0.0:
dependencies:
eslint-config-airbnb-base "^15.0.0"

eslint-config-airbnb@^19.0.4:
version "19.0.4"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz#84d4c3490ad70a0ffa571138ebcdea6ab085fdc3"
integrity sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==
eslint-config-airbnb@^18.2.1:
version "18.2.1"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-18.2.1.tgz#b7fe2b42f9f8173e825b73c8014b592e449c98d9"
integrity sha512-glZNDEZ36VdlZWoxn/bUR1r/sdFKPd1mHPbqUtkctgNG4yT2DLLtJ3D+yCV+jzZCc2V1nBVkmdknOJBZ5Hc0fg==
dependencies:
eslint-config-airbnb-base "^15.0.0"
eslint-config-airbnb-base "^14.2.1"
object.assign "^4.1.2"
object.entries "^1.1.5"
object.entries "^1.1.2"

eslint-config-react-app@^6.0.0:
version "6.0.0"
Expand Down Expand Up @@ -12818,7 +12787,7 @@ object.assign@^4.1.0, object.assign@^4.1.2, object.assign@^4.1.3, object.assign@
has-symbols "^1.0.3"
object-keys "^1.1.1"

object.entries@^1.1.0, object.entries@^1.1.5:
object.entries@^1.1.0, object.entries@^1.1.2, object.entries@^1.1.5:
version "1.1.5"
resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861"
integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==
Expand Down Expand Up @@ -14695,7 +14664,7 @@ [email protected], react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0, react-i
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==

react-is@^17.0.1, react-is@^17.0.2:
react-is@^17.0.1:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
Expand Down Expand Up @@ -14735,18 +14704,6 @@ [email protected]:
react-is "^18.0.0"
use-sync-external-store "^1.0.0"

react-redux@^7.2.0:
version "7.2.9"
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.9.tgz#09488fbb9416a4efe3735b7235055442b042481d"
integrity sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==
dependencies:
"@babel/runtime" "^7.15.4"
"@types/react-redux" "^7.1.20"
hoist-non-react-statics "^3.3.2"
loose-envify "^1.4.0"
prop-types "^15.7.2"
react-is "^17.0.2"

[email protected], react-refresh@^0.8.3:
version "0.8.3"
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.8.3.tgz#721d4657672d400c5e3c75d063c4a85fb2d5d68f"
Expand Down Expand Up @@ -15092,7 +15049,7 @@ redent@^3.0.0:
indent-string "^4.0.0"
strip-indent "^3.0.0"

[email protected], redux@^4.0.0, redux@^4.0.5:
[email protected], redux@^4.0.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/redux/-/redux-4.2.0.tgz#46f10d6e29b6666df758780437651eeb2b969f13"
integrity sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==
Expand Down Expand Up @@ -17586,13 +17543,6 @@ [email protected]:
dependencies:
hoist-non-react-statics "^3.3.0"

unstated@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/unstated/-/unstated-2.1.1.tgz#36b124dfb2e7a12d39d0bb9c46dfb6e51276e3a2"
integrity sha512-fORlTWMZxq7NuMJDxyIrrYIZKN7wEWYQ9SiaJfIRcSpsowr6Ph/JIfK2tgtXLW614JfPG/t5q9eEIhXRCf55xg==
dependencies:
create-react-context "^0.1.5"

unzipper@^0.10.11:
version "0.10.11"
resolved "https://registry.yarnpkg.com/unzipper/-/unzipper-0.10.11.tgz#0b4991446472cbdb92ee7403909f26c2419c782e"
Expand Down

0 comments on commit 85582b7

Please sign in to comment.