Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

chore: update eslint & prettier

AykutSaraccef8e920870e
diff --git a/.eslintrc.json b/.eslintrc.json
index e00bb881..6de70390 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,8 +1,13 @@
{
"rules": {
"@next/next/no-img-element": "off",
- "unused-imports/no-unused-imports": "error"
+ "unused-imports/no-unused-imports": "error",
+ "prettier/prettier": "error",
+ "space-in-parens": "error",
+ "no-empty": "error",
+ "no-multiple-empty-lines": "error",
+ "no-irregular-whitespace": "error"
},
"extends": ["next/core-web-vitals"],
- "plugins": ["unused-imports"]
+ "plugins": ["prettier", "unused-imports"]
}
diff --git a/.prettierrc b/.prettierrc
index a056ce73..b666ec89 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -10,9 +10,8 @@
"styled",
"<THIRD_PARTY_MODULES>",
"^src/(.*)$",
- "^utils/(.*)$",
- "^assets/(.*)$",
"^[./]"
],
- "importOrderParserPlugins": ["typescript", "jsx", "decorators-legacy"]
+ "importOrderParserPlugins": ["typescript", "jsx", "decorators-legacy"],
+ "plugins": ["@trivago/prettier-plugin-sort-imports"]
}
diff --git a/package.json b/package.json
index 7d73c7d6..cd0fbaab 100644
--- a/package.json
+++ b/package.json
@@ -8,8 +8,8 @@
"dev": "next dev",
"build": "next build && next export",
"start": "next start",
- "lint": "tsc && next lint && prettier --check ./src",
- "lint:fix": "prettier --write ./src & eslint --fix src",
+ "lint": "tsc && eslint src && prettier --check src",
+ "lint:fix": "prettier --write src & eslint --fix src",
"deploy": "gh-pages -d out -t true"
},
"dependencies": {
@@ -59,6 +59,7 @@
"@types/styled-components": "^5.1.26",
"eslint": "8.40.0",
"eslint-config-next": "13.4.1",
+ "eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-unused-imports": "^2.0.0",
"prettier": "^2.8.8",
"ts-node": "^10.9.1",
diff --git a/public/assets/bunny.png b/public/assets/bunny.png
deleted file mode 100644
index ddf31ac8..00000000
Binary files a/public/assets/bunny.png and /dev/null differ
diff --git a/public/favicon.ico b/public/favicon.ico
index f403caf0..06993ac7 100644
Binary files a/public/favicon.ico and b/public/favicon.ico differ
diff --git a/public/sitemap.txt b/public/sitemap.txt
index 0746ad54..0cd2d512 100644
--- a/public/sitemap.txt
+++ b/public/sitemap.txt
@@ -1,4 +1,4 @@
https://jsoncrack.com
+https://jsoncrack.com/sign-in
https://jsoncrack.com/editor
-https://jsoncrack.com/docs
-https://jsoncrack.com/pricing
\ No newline at end of file
+https://jsoncrack.com/docs
\ No newline at end of file
diff --git a/src/components/CarbonAds/index.tsx b/src/components/CarbonAds/index.tsx
index ae8b05f8..fafbc6f9 100644
--- a/src/components/CarbonAds/index.tsx
+++ b/src/components/CarbonAds/index.tsx
@@ -1,54 +1,4 @@
import React from "react";
-import styled from "styled-components";
-
-const StyledCloseBtn = styled.button`
- display: none;
- width: 3vw;
- height: 3vw;
- opacity: 0.8;
- justify-content: center;
- align-items: center;
- position: absolute;
- top: 0;
- right: 0;
- border-radius: 0;
- background: ${({ theme }) => theme.DANGER};
-`;
-
-const StyledWrapper = styled.span<{ editor?: boolean }>`
- position: relative;
-
- #carbonads {
- width: 100%;
- display: flex;
- }
-
- ${({ theme, editor }) =>
- editor &&
- `
- #carbonads {
- border-radius: 0;
- border-top: 1px solid ${theme.BACKGROUND_MODIFIER_ACCENT};
- }
-
- #carbonads > span {
- max-width: 100%;
- width: 100%;
- }
- `};
-
- &:hover {
- ${StyledCloseBtn} {
- display: flex;
- }
- }
-
- @media all and (display-mode: standalone) {
- #carbonads {
- display: none;
- }
- }
-`;
export const CarbonAds = () => {
const ref = React.useRef<HTMLDivElement>(null!);
diff --git a/src/components/Sponsors/index.tsx b/src/components/Sponsors/index.tsx
index 2028643a..72fb1c1e 100644
--- a/src/components/Sponsors/index.tsx
+++ b/src/components/Sponsors/index.tsx
@@ -35,41 +35,6 @@ const StyledSponsorsWrapper = styled.ul`
justify-content: center;
`;
-const StyledSponsor = styled.li<{ handle: string }>`
- display: flex;
- justify-content: center;
- position: relative;
-
- &:hover {
- &::before {
- content: "${({ handle }) => handle}";
- position: absolute;
- top: 0;
- background: ${({ theme }) => theme.BACKGROUND_PRIMARY};
- transform: translateY(-130%);
- padding: 6px 8px;
- border-radius: 4px;
- font-weight: 500;
- font-size: 14px;
- color: ${({ theme }) => theme.TEXT_NORMAL};
- }
-
- &::after {
- content: "";
- position: absolute;
- top: 0;
- transform: translateY(-110%);
- border-width: 5px;
- border-style: solid;
- border-color: ${({ theme }) => theme.BACKGROUND_PRIMARY} transparent transparent transparent;
- }
- }
-
- img {
- border-radius: 100%;
- }
-`;
-
export const Sponsors = () => {
const { sponsors, setSponsors } = useStored();
diff --git a/src/layout/Footer/index.tsx b/src/layout/Footer/index.tsx
index b54a527d..2c6df909 100644
--- a/src/layout/Footer/index.tsx
+++ b/src/layout/Footer/index.tsx
@@ -1,5 +1,5 @@
-import { FooterLinks } from "./FooterLinks";
import React from "react";
+import { FooterLinks } from "./FooterLinks";
export const Footer = () => {
return (
diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx
index 64d5e364..245ceb68 100644
--- a/src/pages/_app.tsx
+++ b/src/pages/_app.tsx
@@ -80,7 +80,7 @@ function JsonCrack({ Component, pageProps }: AppProps) {
}),
},
Button: {
- styles: theme => ({
+ styles: () => ({
inner: {
fontWeight: 700,
},
diff --git a/src/typings/types.d.ts b/src/typings/types.d.ts
index d52e5cd8..25f0d8ff 100644
--- a/src/typings/types.d.ts
+++ b/src/typings/types.d.ts
@@ -1,5 +1,3 @@
-type CanvasDirection = "LEFT" | "RIGHT" | "DOWN" | "UP";
-
interface NodeData<T = any> {
id: string;
disabled?: boolean;
diff --git a/yarn.lock b/yarn.lock
index 5c50a637..2e20822f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2071,6 +2071,13 @@ eslint-plugin-jsx-a11y@^6.5.1:
object.fromentries "^2.0.6"
semver "^6.3.0"
+eslint-plugin-prettier@^4.2.1:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b"
+ integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==
+ dependencies:
+ prettier-linter-helpers "^1.0.0"
+
eslint-plugin-react-hooks@^4.5.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3"
@@ -2231,6 +2238,11 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
+fast-diff@^1.1.2:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03"
+ integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==
+
fast-glob@^3.2.11, fast-glob@^3.2.9:
version "3.2.12"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80"
@@ -3530,6 +3542,13 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
+prettier-linter-helpers@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
+ integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==
+ dependencies:
+ fast-diff "^1.1.2"
+
prettier@^2.8.8:
version "2.8.8"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"