chore: repair pre-existing lint failures blocking the lint gate
- turbo/generators/config.ts used require() inside the reader generator
action (no-require-imports); use the top-level node:fs imports
- auth authentication.service.ts used a literal self-assertion
("users" as "users"); prefer-as-const
- apps/cms lacked web-next's next-env.d.ts triple-slash-reference
override, and the committed next-env.d.ts now references
.next/types/routes.d.ts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
import baseConfig from "@repo/core-eslint/base";
|
import baseConfig from "@repo/core-eslint/base";
|
||||||
|
|
||||||
export default baseConfig;
|
export default [
|
||||||
|
...baseConfig,
|
||||||
|
{
|
||||||
|
files: ["next-env.d.ts"],
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/triple-slash-reference": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export class AuthenticationService implements IAuthenticationService {
|
|||||||
if (!decoded) throw new Error("Invalid or expired session token");
|
if (!decoded) throw new Error("Invalid or expired session token");
|
||||||
|
|
||||||
const userDoc = await payload.findByID({
|
const userDoc = await payload.findByID({
|
||||||
collection: "users" as "users",
|
collection: "users" as const,
|
||||||
id: decoded.id,
|
id: decoded.id,
|
||||||
overrideAccess: true,
|
overrideAccess: true,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { existsSync } from "node:fs";
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
||||||
import { join } from "node:path";
|
import { join } from "node:path";
|
||||||
import type { PlopTypes } from "@turbo/gen";
|
import type { PlopTypes } from "@turbo/gen";
|
||||||
import { assertAnchors } from "./lib/anchor-validate.js";
|
import { assertAnchors } from "./lib/anchor-validate.js";
|
||||||
@@ -1108,12 +1108,11 @@ function readerActions(a: { feature: string }): PlopTypes.ActionType[] {
|
|||||||
},
|
},
|
||||||
// Add ./reader subpath to package.json exports map
|
// Add ./reader subpath to package.json exports map
|
||||||
() => {
|
() => {
|
||||||
const fs = require("node:fs");
|
|
||||||
const pkgPath = join(process.cwd(), pkgJsonPath);
|
const pkgPath = join(process.cwd(), pkgJsonPath);
|
||||||
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
|
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
||||||
if (!pkg.exports) pkg.exports = {};
|
if (!pkg.exports) pkg.exports = {};
|
||||||
pkg.exports["./reader"] = "./src/integrations/readers/index.ts";
|
pkg.exports["./reader"] = "./src/integrations/readers/index.ts";
|
||||||
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
|
writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
|
||||||
return `Added "./reader" export to ${pkgJsonPath}`;
|
return `Added "./reader" export to ${pkgJsonPath}`;
|
||||||
},
|
},
|
||||||
() => printReaderNextSteps(a),
|
() => printReaderNextSteps(a),
|
||||||
|
|||||||
Reference in New Issue
Block a user