Skip to content

Codestyle unification #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .changeset/aggregate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { execSync } from "node:child_process";
const THANKLESS_COMMITTERS = ["thdxr", "fwang", "jayair"];

const { version } = JSON.parse(
await fs.readFile("./packages/open-next/package.json")
await fs.readFile("./packages/open-next/package.json"),
);

const changesets = JSON.parse(await fs.readFile(".changeset/config.json"));
Expand All @@ -16,7 +16,7 @@ for (const pkg of packages) {
const changelog = path.join(
"packages",
pkg.split("/").at(-1),
"CHANGELOG.md"
"CHANGELOG.md",
);
const lines = (await fs.readFile(changelog)).toString().split("\n");
let start = false;
Expand All @@ -36,7 +36,7 @@ for (const pkg of packages) {
for (const user of THANKLESS_COMMITTERS) {
line = line.replace(
`Thanks [@${user}](https://github.com/${user})! `,
""
"",
);
}
changes.add(line);
Expand Down
20 changes: 20 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
extends: ["@sladg/eslint-config-base/node"],
ignorePatterns: [
"**/node_modules/**",
"**/dist/**",
"**/pnpm-lock.yaml",
"packages/open-next/assets/sharp-node-modules",
],
rules: {
"prettier/prettier": [
"error",
{
// This resets rules to prettier's defaults
},
],
"sonarjs/elseif-without-else": "warn",
"sonarjs/no-duplicate-string": "warn",
"sonarjs/cognitive-complexity": "warn",
},
};
3 changes: 0 additions & 3 deletions .prettierignore

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ function invalidateCFPaths(paths: string[]) {
Items: paths,
},
},
})
}),
);
}
```
Expand Down
1 change: 1 addition & 0 deletions docs/components/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Head from "next/head";

import { SITE } from "../config";
import styles from "../styles/Layout.module.css";

Expand Down
8 changes: 4 additions & 4 deletions docs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import('next').NextConfig} */

let basePath = undefined
let assetPrefix = undefined
let basePath = undefined;
let assetPrefix = undefined;

///** Deploys as a directory through GitHub Actions **/
//const isGithubActions = process.env.GITHUB_ACTIONS || false
Expand All @@ -25,6 +25,6 @@ const nextConfig = {

basePath: basePath,
assetPrefix: assetPrefix,
}
};

module.exports = nextConfig
module.exports = nextConfig;
1 change: 1 addition & 0 deletions docs/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Head from "next/head";
import Link from "next/link";

import { SITE } from "../config";
import styles from "../styles/404.module.css";

Expand Down
6 changes: 4 additions & 2 deletions docs/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import "../styles/normalize.css";
import "../styles/globals.css";
import Layout from "../components/Layout";
import type { AppProps } from "next/app";

import { Open_Sans } from "@next/font/google";
import type { AppProps } from "next/app";

import Layout from "../components/Layout";

const open = Open_Sans({ subsets: ["latin"] });

Expand Down
14 changes: 6 additions & 8 deletions docs/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Link from "next/link";

import Logo from "../components/Logo.svg";
import { SITE } from "../config";
import styles from "../styles/Home.module.css";
Expand Down Expand Up @@ -189,10 +190,10 @@ export default function Home() {
<code>.open-next</code> directory.
</p>
<p>
This contains a directory for your app that can be either
run in a Lambda function or Lambda@Edge, a directory for an image
optimization Lambda function, and another directory for your static
assets that'll be uploaded to S3.
This contains a directory for your app that can be either run in a
Lambda function or Lambda@Edge, a directory for an image
optimization Lambda function, and another directory for your
static assets that'll be uploaded to S3.
</p>
</li>
<li>
Expand Down Expand Up @@ -220,10 +221,7 @@ export default function Home() {
<p>
Note that, if you are not a library author and are just looking for a
way to deploy your serverless Next.js app to AWS,{" "}
<a href="https://docs.sst.dev/start/nextjs">
follow this tutorial
</a>
.
<a href="https://docs.sst.dev/start/nextjs">follow this tutorial</a>.
</p>
</section>
</>
Expand Down
Loading