Skip to content

Commit

Permalink
Remove husky from @christiandavid/gatsby-theme-byfolio/package.json f…
Browse files Browse the repository at this point in the history
…ile, Fix lint-staged settings
  • Loading branch information
christiandavid committed Dec 16, 2019
1 parent f3f942b commit 9196f69
Show file tree
Hide file tree
Showing 15 changed files with 90 additions and 54 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
www/public/**
@christiandavid/gatsby-theme-byfolio/public/**
20 changes: 20 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": ["plugin:prettier/recommended"],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true,
"experimentalObjectRestSpread": true
}
},
"env": {
"es6": true
},
"plugins": ["react-hooks"],
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
}
}
4 changes: 4 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.+(js|jsx)": ["eslint --fix", "git add"],
"*.+(json|css|md)": ["prettier --write", "git add"]
}
13 changes: 13 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.cache
package.json
package-lock.json
yarn.lock
public
www/public
www/package.json
www/package-lock.json
www/yarn.lock
@christiandavid/gatsby-theme-byfolio/public
@christiandavid/gatsby-theme-byfolio/package.json
@christiandavid/gatsby-theme-byfolio/package-lock.json
@christiandavid/gatsby-theme-byfolio/yarn.lock
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"endOfLine": "lf",
"semi": false,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5"
}
3 changes: 1 addition & 2 deletions @christiandavid/gatsby-theme-byfolio/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
public/**
material/**
public/**
6 changes: 0 additions & 6 deletions @christiandavid/gatsby-theme-byfolio/.lintstagedrc

This file was deleted.

3 changes: 1 addition & 2 deletions @christiandavid/gatsby-theme-byfolio/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.cache
package.json
package-lock.json
public
material
public
7 changes: 4 additions & 3 deletions @christiandavid/gatsby-theme-byfolio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ git clone git@github.com:christiandavid/gatsby-theme-byfolio.git my-best-portfol

cd my-best-portfolio

yarn workspaces run
# Install dependencies
yarn

# Run localhost
yarn workspace www develop
Expand Down Expand Up @@ -263,7 +264,7 @@ I recommend using [Coolors.co](https://coolors.co/) to select a color palette an
You can change the color of the text and the background of each page, for example:

```js
// src/gatsby-theme-byfolio/layout/layoutColors.css.js
// src/@christiandavid/gatsby-theme-byfolio/layout/layoutColors.css.js
import { css } from "@emotion/core"
import lineSvg from "../../../static/assets/line.svg"
Expand Down Expand Up @@ -335,7 +336,7 @@ const styles = css`
export default styles
```

You can change the about-me text in the "src/gatsby-theme-byfolio/contentJSON/about-me.json" file, for example:
You can change the about-me text in the "src//@christiandavid/gatsby-theme-byfolio/contentJSON/about-me.json" file, for example:

```json
[
Expand Down
10 changes: 2 additions & 8 deletions @christiandavid/gatsby-theme-byfolio/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@christiandavid/gatsby-theme-byfolio",
"description": "A simplified way to create a portfolio using GatsbyJS",
"version": "1.0.3",
"version": "1.0.4",
"license": "MIT",
"keywords": [
"gatsby",
Expand All @@ -10,6 +10,7 @@
"byfolio"
],
"scripts": {
"clean": "gatsby clean",
"build": "gatsby build",
"develop": "gatsby develop",
"lint": "eslint .",
Expand All @@ -18,11 +19,6 @@
"serve": "gatsby serve",
"test": "jest"
},
"husky": {
"hooks": {
"pre-commit": "yarn lint && yarn format"
}
},
"peerDependencies": {
"gatsby": "^2.18.10",
"react": "^16.12.0",
Expand Down Expand Up @@ -72,8 +68,6 @@
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-react-hooks": "^2.3.0",
"husky": "^3.1.0",
"lint-staged": "^9.4.3",
"prettier": "^1.19.1"
},
"repository": {
Expand Down
53 changes: 27 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ git clone git@github.com:christiandavid/gatsby-theme-byfolio.git my-best-portfol

cd my-best-portfolio

yarn workspaces run
# Install dependencies
yarn

# Run localhost
yarn workspace www develop
Expand Down Expand Up @@ -71,10 +72,10 @@ module.exports = {
name: `experience`,
title: `Experience`,
color: `#3a3d98`,
link: ``
link: ``,
},
{ name: `skills`, title: `Skills`, color: `#d52d43`, link: `` },
{ name: `aboutMe`, title: `About Me`, color: `#fff`, link: `` }
{ name: `aboutMe`, title: `About Me`, color: `#fff`, link: `` },
],
email: `christian@davidibarguen.com`,
social: {
Expand All @@ -83,7 +84,7 @@ module.exports = {
gitHub: `christiandavid`,
stackOverflow: `967956/christian-david`,
linkedIn: `in/christianibarguen/`,
resumeInPdf: `/CV-19.pdf` // url or local link
resumeInPdf: `/CV-19.pdf`, // url or local link
},
homePage: {
availableToHire: true,
Expand All @@ -98,53 +99,53 @@ module.exports = {
`I think one of my values is the <strong>ability to resolve problems<strong>`,
`I like to share what I know 👨‍🏫`,
`In my non-coding hours, I'm at the 🏋‍`,
`I also do design and UX work <span style='color: #27ae60;'>occasionally</span>`
]
`I also do design and UX work <span style='color: #27ae60;'>occasionally</span>`,
],
},
// Color for menu background
shapeColor: {
link: { color: "#171616", hover: "#fff" },
shape1: {
color: `#413f46`,
opacity: `0.7`
opacity: `0.7`,
},
shape2: {
color: `#e6e5ea`,
opacity: `0.7`
opacity: `0.7`,
},
shape3: {
color: `#fff`,
opacity: `0.7`
}
opacity: `0.7`,
},
},
footer: `heart`
}
footer: `heart`,
},
},
{
resolve: `gatsby-plugin-google-gtag`,
options: {
trackingIds: [
`UA-151335375-1` // Google Analytics / GA
`UA-151335375-1`, // Google Analytics / GA
],
// This object gets passed directly to the gtag config command
// This config will be shared across all trackingIds
gtagConfig: {
anonymize_ip: true,
cookie_expires: 0,
send_page_view: true,
cookie_name: `christianibarguen.com`
cookie_name: `christianibarguen.com`,
},
// This object is used for configuration specific to this plugin
pluginConfig: {
// Puts tracking script in the head instead of the body
head: false,
// Setting this parameter is also optional
respectDNT: false
}
}
}
]
};
respectDNT: false,
},
},
},
],
}
```

| Option name | Type | Description |
Expand Down Expand Up @@ -263,9 +264,9 @@ I recommend using [Coolors.co](https://coolors.co/) to select a color palette an
You can change the color of the text and the background of each page, for example:

```js
// src/gatsby-theme-byfolio/layout/layoutColors.css.js
import { css } from "@emotion/core";
import lineSvg from "../../../static/assets/line.svg";
// src/@christiandavid/gatsby-theme-byfolio/layout/layoutColors.css.js
import { css } from "@emotion/core"
import lineSvg from "../../../static/assets/line.svg"
const styles = css`
.e404.layout-wrapper .layout-inner {
Expand Down Expand Up @@ -330,12 +331,12 @@ const styles = css`
.e404 .btn-contact-color {
color: #000;
}
`;
`
export default styles;
export default styles
```

You can change the about-me text in the "src/gatsby-theme-byfolio/contentJSON/about-me.json" file, for example:
You can change the about-me text in the "src//@christiandavid/gatsby-theme-byfolio/contentJSON/about-me.json" file, for example:

```json
[
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
],
"husky": {
"hooks": {
"pre-commit": "yarn workspaces run lint && yarn workspaces run format"
"pre-commit": "lint-staged"
}
},
"devDependencies": {
"husky": "^3.1.0"
"husky": "^3.1.0",
"lint-staged": "^9.5.0",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-react-hooks": "^2.3.0"
}
}
3 changes: 1 addition & 2 deletions www/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
public/**
material/**
public/**
3 changes: 1 addition & 2 deletions www/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.cache
package.json
package-lock.json
public
material
public
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9029,7 +9029,7 @@ lines-and-columns@^1.1.6:
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=

lint-staged@^9.4.3:
lint-staged@^9.5.0:
version "9.5.0"
resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-9.5.0.tgz#290ec605252af646d9b74d73a0fa118362b05a33"
integrity sha512-nawMob9cb/G1J98nb8v3VC/E8rcX1rryUYXVZ69aT9kde6YWX+uvNOEHY5yf2gcWcTJGiD0kqXmCnS3oD75GIA==
Expand Down

0 comments on commit 9196f69

Please sign in to comment.