From c19e141147c0a822da29990aee1c8bb715db3d10 Mon Sep 17 00:00:00 2001 From: igor-dv Date: Mon, 11 Jun 2018 10:01:23 +0300 Subject: [PATCH 1/8] Change version of the marko-widgets to 7.0.1 --- app/marko/package.json | 2 +- examples/marko-cli/package.json | 2 +- yarn.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/marko/package.json b/app/marko/package.json index 281af44c1423..b378fc917ae2 100644 --- a/app/marko/package.json +++ b/app/marko/package.json @@ -32,6 +32,6 @@ }, "peerDependencies": { "marko": "^4", - "marko-widgets": "^7" + "marko-widgets": "^7.0.1" } } diff --git a/examples/marko-cli/package.json b/examples/marko-cli/package.json index 5e0dd1d30497..fa5bc78777c9 100644 --- a/examples/marko-cli/package.json +++ b/examples/marko-cli/package.json @@ -37,7 +37,7 @@ "dependencies": { "marko": "^4.10.0", "marko-starter": "^1.0.0", - "marko-widgets": "^7" + "marko-widgets": "^7.0.1" }, "devDependencies": { "@storybook/addon-actions": "4.0.0-alpha.9", diff --git a/yarn.lock b/yarn.lock index 5d435c2fde01..223b38003c9e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11391,7 +11391,7 @@ marko-starter@^1.0.0: routes-table "^1.2.1" try-require "^1.2.1" -marko-widgets@^7: +marko-widgets@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/marko-widgets/-/marko-widgets-7.0.1.tgz#0e0df2b5609f462f6e93f52f8628535f2f4bc03f" dependencies: From 696bc642e6f14b1490c28ad1fe1f59ec6ed7a5f3 Mon Sep 17 00:00:00 2001 From: igor-dv Date: Mon, 11 Jun 2018 10:15:57 +0300 Subject: [PATCH 2/8] Refresh core-dist cache --- .circleci/config.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e26b5d786537..0a8ff4000333 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,7 +41,7 @@ jobs: - examples/vue-kitchen-sink/node_modules - save_cache: name: "Cache core dist" - key: core-dist-{{ .Revision }} + key: core-dist-v2-{{ .Revision }} paths: - addons - app @@ -57,7 +57,7 @@ jobs: - restore_cache: name: "Restore core dist cache" keys: - - core-dist-{{ .Revision }} + - core-dist-v2-{{ .Revision }} - run: name: Workaround for https://github.com/GoogleChrome/puppeteer/issues/290 command: sh ./scripts/workaround-puppeteer-issue-290.sh @@ -108,7 +108,7 @@ jobs: - restore_cache: name: "Restore core dist cache" keys: - - core-dist-{{ .Revision }} + - core-dist-v2-{{ .Revision }} - run: name: "Run react kitchen-sink (smoke test)" @@ -151,7 +151,7 @@ jobs: - restore_cache: name: "Restore core dist cache" keys: - - core-dist-{{ .Revision }} + - core-dist-v2-{{ .Revision }} - run: name: "Bootstrap" command: | @@ -214,7 +214,7 @@ jobs: - restore_cache: name: "Restore core dist cache" keys: - - core-dist-{{ .Revision }} + - core-dist-v2-{{ .Revision }} - run: name: "Lint" command: | @@ -230,7 +230,7 @@ jobs: - restore_cache: name: "Restore core dist cache" keys: - - core-dist-{{ .Revision }} + - core-dist-v2-{{ .Revision }} - run: name: "Run unit tests" command: | @@ -251,7 +251,7 @@ jobs: - restore_cache: name: "Restore core dist cache" keys: - - core-dist-{{ .Revision }} + - core-dist-v2-{{ .Revision }} - run: name: "Test CLI" command: | @@ -271,7 +271,7 @@ jobs: - restore_cache: name: "Restore core dist cache" keys: - - core-dist-{{ .Revision }} + - core-dist-v2-{{ .Revision }} - run: name: "Test CLI with latest CR(N)A" command: | From 8d832f1c3e1555076f1fc1b9707cf72257fab292 Mon Sep 17 00:00:00 2001 From: igor-dv Date: Mon, 11 Jun 2018 11:41:36 +0300 Subject: [PATCH 3/8] Allow commonjs in import/no-unresolved --- .eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.js b/.eslintrc.js index 3a70661031b9..26cbd220b18d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -51,6 +51,7 @@ module.exports = { ts: 'never', }, ], + 'import/no-unresolved': [error, { commonjs: true }], 'import/no-extraneous-dependencies': [ error, { From f621d129be18c3be32d3e1d2722eb5131df2f921 Mon Sep 17 00:00:00 2001 From: igor-dv Date: Mon, 11 Jun 2018 13:29:00 +0300 Subject: [PATCH 4/8] Temporary disable the rule --- .eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 26cbd220b18d..effb679e398f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -51,7 +51,7 @@ module.exports = { ts: 'never', }, ], - 'import/no-unresolved': [error, { commonjs: true }], + 'import/no-unresolved': ignore, 'import/no-extraneous-dependencies': [ error, { From 86ea3168be4c10eda024f65ccf40cb091fc8f1be Mon Sep 17 00:00:00 2001 From: igor-dv Date: Mon, 11 Jun 2018 13:55:45 +0300 Subject: [PATCH 5/8] Add marko-cli to build and cache --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0a8ff4000333..dd5a757f5786 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,6 +39,7 @@ jobs: - examples/official-storybook/node_modules - examples/polymer-cli/node_modules - examples/vue-kitchen-sink/node_modules + - examples/marko-cli/node_modules - save_cache: name: "Cache core dist" key: core-dist-v2-{{ .Revision }} @@ -81,6 +82,11 @@ jobs: command: | cd examples/polymer-cli yarn build-storybook + - run: + name: "Build marko-cli" + command: | + cd examples/marko-cli + yarn build-storybook - run: name: "Build official-storybook" command: | From 56d030ebc39c64e6dbb4c88928e5804a01f07f08 Mon Sep 17 00:00:00 2001 From: igor-dv Date: Mon, 11 Jun 2018 14:21:40 +0300 Subject: [PATCH 6/8] Remove eslint from the marko-cli project --- .eslintrc.js | 1 - examples/marko-cli/package.json | 20 ------------------- .../components/marko-widgets/button/index.js | 3 ++- .../components/marko-widgets/hello/index.js | 5 +++-- 4 files changed, 5 insertions(+), 24 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index effb679e398f..3a70661031b9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -51,7 +51,6 @@ module.exports = { ts: 'never', }, ], - 'import/no-unresolved': ignore, 'import/no-extraneous-dependencies': [ error, { diff --git a/examples/marko-cli/package.json b/examples/marko-cli/package.json index fa5bc78777c9..6ac6d4818469 100644 --- a/examples/marko-cli/package.json +++ b/examples/marko-cli/package.json @@ -11,29 +11,12 @@ "scripts": { "build": "NODE_ENV=production marko-starter build", "build-storybook": "build-storybook", - "lint": "eslint src/", "serve-static": "NODE_ENV=production marko-starter serve-static", "start": "marko-starter server", "storybook": "start-storybook -p 9005", "test": "npm run lint", "prettier": "prettier src/**/*.{js,css,less} *.js --write" }, - "eslintConfig": { - "env": { - "browser": true, - "node": true - }, - "extends": [ - "eslint:recommended", - "prettier" - ], - "rules": { - "no-console": "off" - } - }, - "eslintIgnore": [ - "*.marko.js" - ], "dependencies": { "marko": "^4.10.0", "marko-starter": "^1.0.0", @@ -47,9 +30,6 @@ "@storybook/addons": "4.0.0-alpha.9", "@storybook/marko": "4.0.0-alpha.9", "babel-core": "^6.26.0", - "eslint": "^4.2.0", - "eslint-config-prettier": "^2.3.0", - "eslint-plugin-prettier": "^2.1.2", "prettier": "^1.13.4", "webpack": "^4.10.2" } diff --git a/examples/marko-cli/src/components/marko-widgets/button/index.js b/examples/marko-cli/src/components/marko-widgets/button/index.js index 672eb1af3b68..3d13c95461b7 100644 --- a/examples/marko-cli/src/components/marko-widgets/button/index.js +++ b/examples/marko-cli/src/components/marko-widgets/button/index.js @@ -9,7 +9,7 @@ function getInitialState(input) { function getTemplateData(state, input) { const priority = input.priority || 'primary'; - let classes = ['btn']; + const classes = ['btn']; if (priority === 'primary' || priority === 'danger') { classes.push(`btn--${priority}`); @@ -25,6 +25,7 @@ function getTemplateData(state, input) { function handleClick() { if (!this.state.disabled) { + // eslint-disable-next-line no-undef,no-alert alert('button-click'); } } diff --git a/examples/marko-cli/src/components/marko-widgets/hello/index.js b/examples/marko-cli/src/components/marko-widgets/hello/index.js index 64de6ba14e46..e9c61ffff059 100644 --- a/examples/marko-cli/src/components/marko-widgets/hello/index.js +++ b/examples/marko-cli/src/components/marko-widgets/hello/index.js @@ -1,13 +1,14 @@ module.exports = require('marko-widgets').defineComponent({ + // eslint-disable-next-line global-require template: require('./template.marko'), - getTemplateData: function(state, input) { + getTemplateData(state, input) { return { name: input.name, }; }, - handleClick: function() { + handleClick() { this.el.style.backgroundColor = 'yellow'; }, }); From f1b44e66e61cb8f7bcd38ff5c0eb2820ed5c8d55 Mon Sep 17 00:00:00 2001 From: igor-dv Date: Mon, 11 Jun 2018 14:24:28 +0300 Subject: [PATCH 7/8] Add marko deps to the root pkg.json --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index bcdae335f10e..995361666a47 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,8 @@ "lerna": "2.11.0", "lint-staged": "^7.1.3", "lodash": "^4.17.10", + "marko": "^4.10.0", + "marko-widgets": "^7.0.1", "npmlog": "^4.1.2", "polymer-webpack-loader": "^2.0.2", "prettier": "^1.13.4", From 37e1966d6b3f1789d0032c1aafe253439f16abf1 Mon Sep 17 00:00:00 2001 From: igor-dv Date: Mon, 11 Jun 2018 14:29:57 +0300 Subject: [PATCH 8/8] Update lock file --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 223b38003c9e..4fd4a8d3abc4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6173,7 +6173,7 @@ eslint-config-airbnb@^16.1.0: dependencies: eslint-config-airbnb-base "^12.1.0" -eslint-config-prettier@^2.3.0, eslint-config-prettier@^2.9.0: +eslint-config-prettier@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-2.9.0.tgz#5ecd65174d486c22dff389fe036febf502d468a3" dependencies: @@ -6284,16 +6284,16 @@ eslint-plugin-jsx-a11y@^6.0.3: emoji-regex "^6.1.0" jsx-ast-utils "^2.0.0" -eslint-plugin-prettier@^2.1.2, eslint-plugin-prettier@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.0.tgz#33e4e228bdb06142d03c560ce04ec23f6c767dd7" +eslint-plugin-prettier@^2.2.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.4.0.tgz#85cab0775c6d5e3344ef01e78d960f166fb93aae" dependencies: fast-diff "^1.1.1" jest-docblock "^21.0.0" -eslint-plugin-prettier@^2.2.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.4.0.tgz#85cab0775c6d5e3344ef01e78d960f166fb93aae" +eslint-plugin-prettier@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.0.tgz#33e4e228bdb06142d03c560ce04ec23f6c767dd7" dependencies: fast-diff "^1.1.1" jest-docblock "^21.0.0" @@ -6379,7 +6379,7 @@ eslint@4.10.0: table "^4.0.1" text-table "~0.2.0" -eslint@^4.19.1, eslint@^4.2.0: +eslint@^4.19.1: version "4.19.1" resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300" dependencies: