diff --git a/.circleci/config.yml b/.circleci/config.yml index e26b5d786537..dd5a757f5786 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,9 +39,10 @@ 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-{{ .Revision }} + key: core-dist-v2-{{ .Revision }} paths: - addons - app @@ -57,7 +58,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 @@ -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: | @@ -108,7 +114,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 +157,7 @@ jobs: - restore_cache: name: "Restore core dist cache" keys: - - core-dist-{{ .Revision }} + - core-dist-v2-{{ .Revision }} - run: name: "Bootstrap" command: | @@ -214,7 +220,7 @@ jobs: - restore_cache: name: "Restore core dist cache" keys: - - core-dist-{{ .Revision }} + - core-dist-v2-{{ .Revision }} - run: name: "Lint" command: | @@ -230,7 +236,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 +257,7 @@ jobs: - restore_cache: name: "Restore core dist cache" keys: - - core-dist-{{ .Revision }} + - core-dist-v2-{{ .Revision }} - run: name: "Test CLI" command: | @@ -271,7 +277,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: | 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..6ac6d4818469 100644 --- a/examples/marko-cli/package.json +++ b/examples/marko-cli/package.json @@ -11,33 +11,16 @@ "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", - "marko-widgets": "^7" + "marko-widgets": "^7.0.1" }, "devDependencies": { "@storybook/addon-actions": "4.0.0-alpha.9", @@ -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'; }, }); 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", diff --git a/yarn.lock b/yarn.lock index 5d435c2fde01..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: @@ -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: