mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-25 14:29:36 +01:00
chore(linting): change arrowParents configuration, upgrade eslint config
This commit is contained in:
parent
729d964c9e
commit
427a6f40f3
@ -1,4 +1,4 @@
|
||||
{
|
||||
"arrowParens": "avoid",
|
||||
"arrowParens": "always",
|
||||
"trailingComma": "all"
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ const createPages: GatsbyNode["createPages"] = async ({ graphql, actions }) => {
|
||||
|
||||
const pages = await queries.pagesQuery(graphql);
|
||||
|
||||
pages.forEach(edge => {
|
||||
pages.forEach((edge) => {
|
||||
const { node } = edge;
|
||||
|
||||
if (node?.frontmatter?.template === "page" && node?.fields?.slug) {
|
||||
@ -88,7 +88,7 @@ const createPages: GatsbyNode["createPages"] = async ({ graphql, actions }) => {
|
||||
const metadata = await queries.metadataQuery(graphql);
|
||||
const postsLimit = metadata?.postsLimit ?? 1;
|
||||
|
||||
categories.forEach(category => {
|
||||
categories.forEach((category) => {
|
||||
const total = Math.ceil(category.totalCount / postsLimit);
|
||||
const path = utils.concat(
|
||||
constants.routes.categoryRoute,
|
||||
@ -110,7 +110,7 @@ const createPages: GatsbyNode["createPages"] = async ({ graphql, actions }) => {
|
||||
|
||||
const tags = await queries.tagsQuery(graphql);
|
||||
|
||||
tags.forEach(tag => {
|
||||
tags.forEach((tag) => {
|
||||
const path = utils.concat(
|
||||
constants.routes.tagRoute,
|
||||
"/",
|
||||
|
@ -30,7 +30,7 @@ const onCreateNode: GatsbyNode["onCreateNode"] = ({
|
||||
}
|
||||
|
||||
if (tags) {
|
||||
const value = tags.map(tag =>
|
||||
const value = tags.map((tag) =>
|
||||
utils.concat(
|
||||
constants.routes.tagRoute,
|
||||
"/",
|
||||
|
21
package-lock.json
generated
21
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "gatsby-starter-lumen",
|
||||
"version": "1.1.27",
|
||||
"version": "1.1.28",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "gatsby-starter-lumen",
|
||||
"version": "1.1.27",
|
||||
"version": "1.1.28",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@sentry/gatsby": "^6.19.6",
|
||||
@ -42,7 +42,7 @@
|
||||
"react-helmet": "^6.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@alxshelepenok/eslint-config": "^1.0.29",
|
||||
"@alxshelepenok/eslint-config": "^1.0.30",
|
||||
"@commitlint/cli": "^16.2.3",
|
||||
"@commitlint/config-conventional": "^16.2.1",
|
||||
"@jest/globals": "^27.5.1",
|
||||
@ -106,13 +106,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@alxshelepenok/eslint-config": {
|
||||
"version": "1.0.29",
|
||||
"resolved": "https://registry.npmjs.org/@alxshelepenok/eslint-config/-/eslint-config-1.0.29.tgz",
|
||||
"integrity": "sha512-IXaoj1MfXh1rzc54dhKKZbM9PfU5CE/7wpzpPPg8iWDoVBjRfUUpNS2KBuxkodLdN6vAYhgvcxdq7f3BiUUu9w==",
|
||||
"version": "1.0.30",
|
||||
"resolved": "https://registry.npmjs.org/@alxshelepenok/eslint-config/-/eslint-config-1.0.30.tgz",
|
||||
"integrity": "sha512-X6rIso749dYRzez/3EkXlr7tkTFgFNPrmGqYGEqpOl2WPYbhcOAAg2/Kv8Je1105r3p7rnA8Fg1AqJLPDQkZWQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 12 || ^10.12"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^7.7.0 || ^8.2.0"
|
||||
}
|
||||
@ -30068,9 +30065,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@alxshelepenok/eslint-config": {
|
||||
"version": "1.0.29",
|
||||
"resolved": "https://registry.npmjs.org/@alxshelepenok/eslint-config/-/eslint-config-1.0.29.tgz",
|
||||
"integrity": "sha512-IXaoj1MfXh1rzc54dhKKZbM9PfU5CE/7wpzpPPg8iWDoVBjRfUUpNS2KBuxkodLdN6vAYhgvcxdq7f3BiUUu9w==",
|
||||
"version": "1.0.30",
|
||||
"resolved": "https://registry.npmjs.org/@alxshelepenok/eslint-config/-/eslint-config-1.0.30.tgz",
|
||||
"integrity": "sha512-X6rIso749dYRzez/3EkXlr7tkTFgFNPrmGqYGEqpOl2WPYbhcOAAg2/Kv8Je1105r3p7rnA8Fg1AqJLPDQkZWQ==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
|
@ -80,7 +80,7 @@
|
||||
"react-helmet": "^6.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@alxshelepenok/eslint-config": "^1.0.29",
|
||||
"@alxshelepenok/eslint-config": "^1.0.30",
|
||||
"@commitlint/cli": "^16.2.3",
|
||||
"@commitlint/config-conventional": "^16.2.1",
|
||||
"@jest/globals": "^27.5.1",
|
||||
|
@ -12,7 +12,7 @@ type Props = {
|
||||
|
||||
const Feed: React.FC<Props> = ({ edges }: Props) => (
|
||||
<div className={styles.feed}>
|
||||
{edges.map(edge => (
|
||||
{edges.map((edge) => (
|
||||
<div className={styles.item} key={edge.node.fields.slug}>
|
||||
<div className={styles.meta}>
|
||||
<time
|
||||
|
@ -14,7 +14,7 @@ type Props = {
|
||||
const Contacts: React.FC<Props> = ({ contacts }: Props) => (
|
||||
<div className={styles.contacts}>
|
||||
<ul className={styles.list}>
|
||||
{(Object.keys(contacts) as Array<keyof typeof ICONS>).map(name =>
|
||||
{(Object.keys(contacts) as Array<keyof typeof ICONS>).map((name) =>
|
||||
contacts[name] ? (
|
||||
<li className={styles.item} key={name}>
|
||||
<a
|
||||
|
@ -14,7 +14,7 @@ type Props = {
|
||||
const Menu: React.FC<Props> = ({ menu }: Props) => (
|
||||
<nav className={styles.menu}>
|
||||
<ul className={styles.list}>
|
||||
{menu.map(item => (
|
||||
{menu.map((item) => (
|
||||
<li className={styles.item} key={item.path}>
|
||||
<Link
|
||||
to={item.path}
|
||||
|
@ -17,7 +17,7 @@ const CategoriesTemplate: React.FC = () => {
|
||||
<Sidebar />
|
||||
<Page title="Categories">
|
||||
<ul>
|
||||
{categories.map(category => (
|
||||
{categories.map((category) => (
|
||||
<li key={category.fieldValue}>
|
||||
<Link to={`/category/${toKebabCase(category.fieldValue)}/`}>
|
||||
{category.fieldValue} ({category.totalCount})
|
||||
|
@ -17,7 +17,7 @@ const TagsTemplate: React.FC = () => {
|
||||
<Sidebar />
|
||||
<Page title="Tags">
|
||||
<ul>
|
||||
{tags.map(tag => (
|
||||
{tags.map((tag) => (
|
||||
<li key={tag.fieldValue}>
|
||||
<Link to={`/tag/${toKebabCase(tag.fieldValue)}/`}>
|
||||
{tag.fieldValue} ({tag.totalCount})
|
||||
|
Loading…
Reference in New Issue
Block a user