Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to fix linter issues #3748

Merged
merged 8 commits into from
Jun 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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: |
Expand Down Expand Up @@ -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)"
Expand Down Expand Up @@ -151,7 +157,7 @@ jobs:
- restore_cache:
name: "Restore core dist cache"
keys:
- core-dist-{{ .Revision }}
- core-dist-v2-{{ .Revision }}
- run:
name: "Bootstrap"
command: |
Expand Down Expand Up @@ -214,7 +220,7 @@ jobs:
- restore_cache:
name: "Restore core dist cache"
keys:
- core-dist-{{ .Revision }}
- core-dist-v2-{{ .Revision }}
- run:
name: "Lint"
command: |
Expand All @@ -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: |
Expand All @@ -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: |
Expand All @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion app/marko/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
},
"peerDependencies": {
"marko": "^4",
"marko-widgets": "^7"
"marko-widgets": "^7.0.1"
}
}
22 changes: 1 addition & 21 deletions examples/marko-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand All @@ -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');
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
},
});
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -6379,7 +6379,7 @@ [email protected]:
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:
Expand Down Expand Up @@ -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:
Expand Down