From 427a6f40f3bc4ead03e5bedca3b94efe26ad0adb Mon Sep 17 00:00:00 2001 From: Alexander Shelepenok Date: Sun, 24 Apr 2022 16:21:11 +0000 Subject: [PATCH] chore(linting): change arrowParents configuration, upgrade eslint config --- .prettierrc | 2 +- internal/gatsby/create-pages.ts | 6 +++--- internal/gatsby/on-create-node.ts | 2 +- package-lock.json | 21 ++++++++----------- package.json | 2 +- src/components/Feed/Feed.tsx | 2 +- src/components/Sidebar/Contacts/Contacts.tsx | 2 +- src/components/Sidebar/Menu/Menu.tsx | 2 +- .../CategoriesTemplate/CategoriesTemplate.tsx | 2 +- src/templates/TagsTemplate/TagsTemplate.tsx | 2 +- 10 files changed, 20 insertions(+), 23 deletions(-) diff --git a/.prettierrc b/.prettierrc index 87bc023..25c96b7 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,4 @@ { - "arrowParens": "avoid", + "arrowParens": "always", "trailingComma": "all" } diff --git a/internal/gatsby/create-pages.ts b/internal/gatsby/create-pages.ts index b3127ac..5d35df5 100644 --- a/internal/gatsby/create-pages.ts +++ b/internal/gatsby/create-pages.ts @@ -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, "/", diff --git a/internal/gatsby/on-create-node.ts b/internal/gatsby/on-create-node.ts index 5c69d84..8a3a7f9 100644 --- a/internal/gatsby/on-create-node.ts +++ b/internal/gatsby/on-create-node.ts @@ -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, "/", diff --git a/package-lock.json b/package-lock.json index 4c9c4a0..af7d6eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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": {} }, diff --git a/package.json b/package.json index 4408e5f..113e14f 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/components/Feed/Feed.tsx b/src/components/Feed/Feed.tsx index 593cc67..4f6147b 100644 --- a/src/components/Feed/Feed.tsx +++ b/src/components/Feed/Feed.tsx @@ -12,7 +12,7 @@ type Props = { const Feed: React.FC = ({ edges }: Props) => (
- {edges.map(edge => ( + {edges.map((edge) => (