Skip to content

Commit

Permalink
update prettier/typescript-eslint (#2072)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri POSTOLOV authored Jul 14, 2023
1 parent 4468e60 commit 875e48f
Show file tree
Hide file tree
Showing 14 changed files with 218 additions and 164 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ module.exports = {
'always',
{ enforceForIfStatements: true }
],
'@typescript-eslint/prefer-optional-chain': 'error',
'no-else-return': ['error', { allowElseIf: false }],
'no-lonely-if': 'error',
'prefer-destructuring': [
Expand Down Expand Up @@ -109,7 +108,8 @@ module.exports = {
rules: {
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/non-nullable-type-assertion-style': 'error'
'@typescript-eslint/non-nullable-type-assertion-style': 'error',
'@typescript-eslint/prefer-optional-chain': 'error'
}
},
// ⚙️ nextra-theme-docs
Expand Down
5 changes: 0 additions & 5 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
.next/
out/
dist/
pnpm-lock.yaml
.changeset/*.md
packages/nextra-theme-blog/style.css
packages/nextra-theme-docs/style.css

# process.env assignement should be first
packages/nextra/__test__/locale-with-base-path.test.ts
Expand Down
16 changes: 12 additions & 4 deletions docs/components/features/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
background-color: #202020;
}
.feature {
box-shadow: 0 8px 16px rgb(0 0 0 / 8%), 0 1px 2px rgb(0 0 0 / 4%),
box-shadow:
0 8px 16px rgb(0 0 0 / 8%),
0 1px 2px rgb(0 0 0 / 4%),
0 0 0 1px rgb(0 0 0 / 3%);
transition: box-shadow 0.3s ease;
}
Expand All @@ -47,7 +49,9 @@
justify-content: center;
align-items: center;
color: rgba(255, 255, 255, 0.9);
box-shadow: 0 0 0 2px rgb(154 154 154 / 56%), 0 0 30px rgb(0 0 0 / 10%);
box-shadow:
0 0 0 2px rgb(154 154 154 / 56%),
0 0 30px rgb(0 0 0 / 10%);
transition: all 0.2s ease;
-webkit-user-drag: none;
}
Expand All @@ -62,13 +66,17 @@
transform: scale(1.05);
color: rgba(255, 255, 255, 1);
background-color: rgba(64, 64, 64, 0.39);
box-shadow: 0 0 0 2px rgba(220, 220, 220, 0.56), 0 0 30px rgb(0 0 0 / 10%);
box-shadow:
0 0 0 2px rgba(220, 220, 220, 0.56),
0 0 30px rgb(0 0 0 / 10%);
}
.feature .link:active {
transform: scale(1);
color: rgba(255, 255, 255, 0.8);
background-color: rgba(22, 22, 22, 0.39);
box-shadow: 0 0 0 2px rgba(178, 178, 178, 0.56), 0 0 30px rgb(0 0 0 / 10%);
box-shadow:
0 0 0 2px rgba(178, 178, 178, 0.56),
0 0 30px rgb(0 0 0 / 10%);
}
}

Expand Down
4 changes: 3 additions & 1 deletion docs/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
@tailwind utilities;

body {
font-feature-settings: 'rlig' 1, 'calt' 1;
font-feature-settings:
'rlig' 1,
'calt' 1;
}

.home-content p {
Expand Down
4 changes: 3 additions & 1 deletion docs/theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ const logo = (
}
span:hover {
mask-position: 100%;
transition: mask-position 1s ease, -webkit-mask-position 1s ease;
transition:
mask-position 1s ease,
-webkit-mask-position 1s ease;
}
`}</style>
</span>
Expand Down
6 changes: 4 additions & 2 deletions examples/swr-site/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
}

body {
background: linear-gradient(
background:
linear-gradient(
to bottom,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 1) 300px
Expand All @@ -28,7 +29,8 @@ body {
}

.dark body {
background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #111 300px),
background:
linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #111 300px),
fixed 0 0 / 20px 20px radial-gradient(#313131 1px, transparent 0),
fixed 10px 10px / 20px 20px radial-gradient(#313131 1px, transparent 0);
}
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"version": "changeset version"
},
"devDependencies": {
"@changesets/cli": "2.26.1",
"@changesets/cli": "2.26.2",
"@edge-runtime/vm": "3.0.3",
"@ianvs/prettier-plugin-sort-imports": "^4.0.0-beta.0",
"@ianvs/prettier-plugin-sort-imports": "^4.0.2",
"@next/eslint-plugin-next": "13.4.10",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"@typescript-eslint/eslint-plugin": "6.0.0",
"@typescript-eslint/parser": "6.0.0",
"eslint": "8.44.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-import": "2.27.5",
Expand All @@ -35,8 +35,8 @@
"eslint-plugin-tailwindcss": "3.13.0",
"eslint-plugin-typescript-sort-keys": "2.3.0",
"eslint-plugin-unicorn": "47.0.0",
"prettier": "2.8.8",
"prettier-plugin-pkg": "0.17.1",
"prettier": "3.0.0",
"prettier-plugin-pkg": "0.18.0",
"prettier-plugin-tailwindcss": "0.4.0",
"rimraf": "5.0.1",
"tsup": "7.0.0",
Expand All @@ -56,7 +56,7 @@
"postcss": "^8.4.21"
},
"patchedDependencies": {
"@changesets/assemble-release-plan@5.2.3": "patches/@changesets__assemble-release-plan@5.2.3.patch"
"@changesets/assemble-release-plan@5.2.4": "patches/@changesets__assemble-release-plan@5.2.4.patch"
}
}
}
6 changes: 4 additions & 2 deletions packages/nextra-theme-docs/css/hamburger.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
}
path {
opacity: 1;
transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1) 0.2s,
transition:
transform 0.2s cubic-bezier(0.25, 1, 0.5, 1) 0.2s,
opacity 0.2s ease 0.2s;
}

&.open {
path {
transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1),
transition:
transform 0.2s cubic-bezier(0.25, 1, 0.5, 1),
opacity 0s ease 0.2s;
}
g {
Expand Down
5 changes: 4 additions & 1 deletion packages/nextra-theme-docs/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@

html {
@apply nx-antialiased nx-text-base;
font-feature-settings: 'rlig' 1, 'calt' 1, 'ss01' 1;
font-feature-settings:
'rlig' 1,
'calt' 1,
'ss01' 1;
-webkit-tap-highlight-color: transparent;
}

Expand Down
4 changes: 3 additions & 1 deletion packages/nextra-theme-docs/css/typesetting-article.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
article.nextra-body-typesetting-article {
font-size: 17px;
font-feature-settings: 'rlig' 1, 'calt' 1;
font-feature-settings:
'rlig' 1,
'calt' 1;
h1 {
@apply nx-mt-6 nx-mb-4 nx-text-center;
font-size: 2.5rem;
Expand Down
5 changes: 4 additions & 1 deletion packages/nextra/styles/code-block.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
code {
box-decoration-break: clone;
font-feature-settings: 'rlig' 1, 'calt' 1, 'ss01' 1;
font-feature-settings:
'rlig' 1,
'calt' 1,
'ss01' 1;

&[data-line-numbers] > .line {
@apply nx-pl-2;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
diff --git a/dist/assemble-release-plan.cjs.dev.js b/dist/assemble-release-plan.cjs.dev.js
index 3a37c62c975518f975c22e1b4b3974d9b325a5da..a352a936fbb549bd417aae443c382e27cc70a89a 100644
index e1376ca756d69816f8c79637ee7b45161f092167..8cb0a24dced96f422afffe4ec21cf3628b4951dd 100644
--- a/dist/assemble-release-plan.cjs.dev.js
+++ b/dist/assemble-release-plan.cjs.dev.js
@@ -251,7 +251,7 @@ function shouldBumpMajor({
@@ -257,7 +257,7 @@ function shouldBumpMajor({
// we check if it is a peerDependency because if it is, our dependent bump type might need to be major.
return depType === "peerDependencies" && nextRelease.type !== "none" && nextRelease.type !== "patch" && ( // 1. If onlyUpdatePeerDependentsWhenOutOfRange set to true, bump major if the version is leaving the range.
// 2. If onlyUpdatePeerDependentsWhenOutOfRange set to false, bump major regardless whether or not the version is leaving the range.
- !onlyUpdatePeerDependentsWhenOutOfRange || !semver__default['default'].satisfies(incrementVersion(nextRelease, preInfo), versionRange)) && ( // bump major only if the dependent doesn't already has a major release.
- !onlyUpdatePeerDependentsWhenOutOfRange || !semverSatisfies__default['default'](incrementVersion(nextRelease, preInfo), versionRange)) && ( // bump major only if the dependent doesn't already has a major release.
+ !onlyUpdatePeerDependentsWhenOutOfRange) && ( // bump major only if the dependent doesn't already has a major release.
!releases.has(dependent) || releases.has(dependent) && releases.get(dependent).type !== "major");
}

diff --git a/dist/assemble-release-plan.cjs.prod.js b/dist/assemble-release-plan.cjs.prod.js
index 87b4c104bf3fa53ba498ced6f81eda0ed4c86436..80a63646dc93d097a73acc68213ec87579a78a97 100644
index 3a83720644a94cdf6e62fa188a72c51c0384d00e..411ef794988c7f770545bca6a7a38f9419806cd6 100644
--- a/dist/assemble-release-plan.cjs.prod.js
+++ b/dist/assemble-release-plan.cjs.prod.js
@@ -130,7 +130,7 @@ function getDependencyVersionRanges(dependentPkgJSON, dependencyRelease) {
}

function shouldBumpMajor({dependent: dependent, depType: depType, versionRange: versionRange, releases: releases, nextRelease: nextRelease, preInfo: preInfo, onlyUpdatePeerDependentsWhenOutOfRange: onlyUpdatePeerDependentsWhenOutOfRange}) {
- return "peerDependencies" === depType && "none" !== nextRelease.type && "patch" !== nextRelease.type && (!onlyUpdatePeerDependentsWhenOutOfRange || !semver__default.default.satisfies(incrementVersion(nextRelease, preInfo), versionRange)) && (!releases.has(dependent) || releases.has(dependent) && "major" !== releases.get(dependent).type);
- return "peerDependencies" === depType && "none" !== nextRelease.type && "patch" !== nextRelease.type && (!onlyUpdatePeerDependentsWhenOutOfRange || !semverSatisfies__default.default(incrementVersion(nextRelease, preInfo), versionRange)) && (!releases.has(dependent) || releases.has(dependent) && "major" !== releases.get(dependent).type);
+ return "peerDependencies" === depType && "none" !== nextRelease.type && "patch" !== nextRelease.type && !onlyUpdatePeerDependentsWhenOutOfRange && (!releases.has(dependent) || releases.has(dependent) && "major" !== releases.get(dependent).type);
}

Expand Down
Loading

1 comment on commit 875e48f

@vercel
Copy link

@vercel vercel bot commented on 875e48f Jul 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.