Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Fix dev-lib being able to run eslint; fix some eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Apr 5, 2018
1 parent 2feb47a commit 7a14eec
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 19 deletions.
20 changes: 20 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"root": true,
"extends": [
"wordpress",
"plugin:react/recommended"
],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": [
"react"
],
"rules": {
"react/react-in-jsx-scope": "off"
}
};
4 changes: 0 additions & 4 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion blocks/activity-list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,5 +214,5 @@ export default registerBlockType(
save() {
return renderStaticActivityList();
}
},
}
);
3 changes: 2 additions & 1 deletion blocks/discover/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

/**
* Internal block libraries.
*/
Expand Down Expand Up @@ -49,5 +50,5 @@ export default registerBlockType(
save() {
return renderStaticDiscoverBlock();
}
},
}
);
2 changes: 1 addition & 1 deletion blocks/featured/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,5 @@ export default registerBlockType(
// @todo WARNING: If the user does not have unfiltered_html, then the amp-img elements will be removed from the saved post_content! Should wp_kses_allowed_html be filtered to allow all AMP elements and attributes that will be used in blocks here?
return renderStaticFeaturedBlock();
}
},
}
);
2 changes: 1 addition & 1 deletion blocks/hero/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,5 @@ export default registerBlockType(
</section>
);
}
},
}
);
6 changes: 3 additions & 3 deletions blocks/popular/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default registerBlockType(
__( 'Travel' )
],

edit: props => {
edit() {
return (
<section className='travel-popular pb4 pt3 relative'>
<header className='max-width-3 mx-auto px1 md-px2'>
Expand Down Expand Up @@ -159,7 +159,7 @@ export default registerBlockType(
</section>
);
},
save: props => {
save() {
return (
<section className='travel-popular pb4 pt3 relative'>
<header className='max-width-3 mx-auto px1 md-px2'>
Expand Down Expand Up @@ -292,5 +292,5 @@ export default registerBlockType(
</section>
);
}
},
}
);
2 changes: 1 addition & 1 deletion blocks/search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ export default registerBlockType(
save() {
return renderStaticSearchBlock();
}
},
}
);
6 changes: 3 additions & 3 deletions blocks/travel-angles/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default registerBlockType(
],

// Copy from Travel HTML template.
edit: props => {
edit() {

// Don't display the travel angels since that will hide the block configure buttons behind an image.
return (
Expand All @@ -27,7 +27,7 @@ export default registerBlockType(
</div>
);
},
save: props => {
save() {
return (
<div className='travel-angles max-width-3 mx-auto'>
<div className='travel-angle-left'>
Expand All @@ -42,5 +42,5 @@ export default registerBlockType(
</div>
);
}
},
}
);
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,21 @@
},
"homepage": "https://github.com/xwp/travel#readme",
"devDependencies": {
"eslint": "^4.13.1",
"eslint-config-wordpress": "^2.0.0",
"wp-dev-lib": "github:xwp/wp-dev-lib",
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-react-jsx": "^6.24.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.1",
"cross-env": "^5.1.1",
"eslint": "^4.13.1",
"eslint-config-wordpress": "^2.0.0",
"eslint-plugin-react": "^7.7.0",
"grunt-cli": "^1.2.0",
"jscs": "^3.0.7",
"jshint": "^2.9.5",
"raw-loader": "^0.5.1",
"webpack": "^3.10.0"
"webpack": "^3.10.0",
"wp-dev-lib": "github:xwp/wp-dev-lib"
}
}

0 comments on commit 7a14eec

Please sign in to comment.