Skip to content

Commit

Permalink
chore(deps): update packages (major) (#70)
Browse files Browse the repository at this point in the history
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jo茫o Pedro Schmitz <jpedroschmitz@hotmail.com>
  • Loading branch information
3 people committed Nov 26, 2021
1 parent ffee8e7 commit e732747
Show file tree
Hide file tree
Showing 8 changed files with 317 additions and 239 deletions.
10 changes: 8 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
},
"plugins": ["import", "jsx-a11y", "react", "react-hooks", "prettier"],
"extends": ["airbnb", "eslint-config-prettier", "prettier"],
"extends": ["plugin:react/recommended", "airbnb", "prettier"],
"rules": {
"prettier/prettier": "error",
"react/jsx-filename-extension": [
Expand All @@ -21,7 +21,13 @@
"react/jsx-one-expression-per-line": "off",
"react/jsx-props-no-spreading": "off",
"react/forbid-prop-types": "off",
"react/jsx-fragments": "off"
"react/jsx-fragments": "off",
"react/function-component-definition": [
2,
{
"namedComponents": "function-declaration"
}
]
},
"env": {
"browser": true,
Expand Down
4 changes: 3 additions & 1 deletion @rocketseat/gatsby-theme-docs-core/src/components/Docs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* eslint-disable react/prop-types */
import React from 'react';

export default ({ data }) => <pre>{JSON.stringify(data, null, 2)}</pre>;
export default function Docspage({ data }) {
return <pre>{JSON.stringify(data, null, 2)}</pre>;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* eslint-disable react/prop-types */
import React from 'react';

export default ({ data }) => <pre>{JSON.stringify(data, null, 2)}</pre>;
export default function Homepage({ data }) {
return <pre>{JSON.stringify(data, null, 2)}</pre>;
}
2 changes: 1 addition & 1 deletion @rocketseat/gatsby-theme-docs-core/util/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function normalizeBasePath(basePath, link) {
}

function isExternalUrl(url) {
return new RegExp('^((https?:)?//)', 'i').test(url);
return /^((https?:)?\/\/)/i.test(url);
}

function resolveLink(link, basePath) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default function EditGithub({ repositoryEditUrl, repositoryProvider }) {
</a>
);
}

return null;
}

Expand Down
2 changes: 1 addition & 1 deletion @rocketseat/gatsby-theme-docs/src/util/url.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function isExternalUrl(url) {
return new RegExp('^((https?:)?//)', 'i').test(url);
return /^((https?:)?\/\/)/i.test(url);
}

module.exports = { isExternalUrl };
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@
"devDependencies": {
"@changesets/changelog-github": "^0.4.0",
"@changesets/cli": "^2.14.1",
"@commitlint/cli": "12.1.4",
"@commitlint/config-conventional": "12.1.4",
"@commitlint/cli": "15.0.0",
"@commitlint/config-conventional": "15.0.0",
"commitizen": "4.2.4",
"cz-conventional-changelog": "3.3.0",
"eslint": "7.32.0",
"eslint-config-airbnb": "18.2.1",
"eslint": "8.3.0",
"eslint-config-airbnb": "19.0.1",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-import": "2.25.3",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-prettier": "3.4.1",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-react": "7.27.1",
"eslint-plugin-react-hooks": "4.3.0",
"husky": "5.2.0",
"lint-staged": "10.5.4",
"husky": "7.0.4",
"lint-staged": "12.1.2",
"prettier": "2.5.0"
}
}

0 comments on commit e732747

Please sign in to comment.