Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a55649c5f2 | |||
| 0d7c588536 | |||
| b6debcbb59 | |||
| 5847bc5795 |
@@ -10,7 +10,7 @@
|
|||||||
"mintel": "./dist/index.js"
|
"mintel": "./dist/index.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsup src/index.ts --format esm --target es2020",
|
"build": "tsup",
|
||||||
"start": "node dist/index.js",
|
"start": "node dist/index.js",
|
||||||
"dev": "tsup src/index.ts --format esm --watch --target es2020",
|
"dev": "tsup src/index.ts --format esm --watch --target es2020",
|
||||||
"test": "vitest run"
|
"test": "vitest run"
|
||||||
@@ -28,4 +28,4 @@
|
|||||||
"@types/prompts": "^2.4.4",
|
"@types/prompts": "^2.4.4",
|
||||||
"@mintel/tsconfig": "workspace:*"
|
"@mintel/tsconfig": "workspace:*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
11
packages/cli/tsup.config.ts
Normal file
11
packages/cli/tsup.config.ts
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import { defineConfig } from 'tsup';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
entry: ['src/index.ts'],
|
||||||
|
format: ['esm'],
|
||||||
|
target: 'es2020',
|
||||||
|
clean: true,
|
||||||
|
banner: {
|
||||||
|
js: '#!/usr/bin/env node',
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -1,40 +1,41 @@
|
|||||||
import { dirname } from "path";
|
import nextPlugin from "@next/eslint-plugin-next";
|
||||||
import { fileURLToPath } from "url";
|
import reactPlugin from "eslint-plugin-react";
|
||||||
import { FlatCompat } from "@eslint/eslintrc";
|
import hooksPlugin from "eslint-plugin-react-hooks";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
import js from "@eslint/js";
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
/**
|
||||||
const __dirname = dirname(__filename);
|
* Mintel Next.js ESLint Configuration (Flat Config)
|
||||||
|
*
|
||||||
const compat = new FlatCompat({
|
* This configuration replaces the legacy 'eslint-config-next' which
|
||||||
baseDirectory: __dirname,
|
* relies on @rushstack/eslint-patch and causes issues in ESLint 9.
|
||||||
});
|
*/
|
||||||
|
export const nextConfig = tseslint.config(
|
||||||
export const nextConfig = [
|
|
||||||
{
|
|
||||||
ignores: [
|
|
||||||
"**/dist/**",
|
|
||||||
"**/build/**",
|
|
||||||
"**/out/**",
|
|
||||||
"**/coverage/**",
|
|
||||||
"**/.next/**",
|
|
||||||
"**/node_modules/**",
|
|
||||||
"**/.gitea/**",
|
|
||||||
"**/.changeset/**",
|
|
||||||
"**/.vercel/**",
|
|
||||||
],
|
|
||||||
},
|
|
||||||
...compat.extends("next/core-web-vitals", "next/typescript"),
|
|
||||||
{
|
{
|
||||||
|
plugins: {
|
||||||
|
"react": reactPlugin,
|
||||||
|
"react-hooks": hooksPlugin,
|
||||||
|
"@next/next": nextPlugin,
|
||||||
|
},
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
// Add common browser/node globals if needed,
|
||||||
|
// though usually handled by base configs
|
||||||
|
},
|
||||||
|
},
|
||||||
rules: {
|
rules: {
|
||||||
"@typescript-eslint/no-explicit-any": "off",
|
...reactPlugin.configs.recommended.rules,
|
||||||
"@typescript-eslint/no-unused-vars": [
|
...hooksPlugin.configs.recommended.rules,
|
||||||
"warn",
|
...nextPlugin.configs.recommended.rules,
|
||||||
{ argsIgnorePattern: "^_" },
|
...nextPlugin.configs["core-web-vitals"].rules,
|
||||||
],
|
"react/react-in-jsx-scope": "off",
|
||||||
"@typescript-eslint/no-require-imports": "off",
|
|
||||||
"prefer-const": "warn",
|
|
||||||
"react/no-unescaped-entities": "off",
|
"react/no-unescaped-entities": "off",
|
||||||
"@next/next/no-img-element": "warn",
|
"@next/next/no-img-element": "warn",
|
||||||
},
|
},
|
||||||
},
|
settings: {
|
||||||
];
|
react: {
|
||||||
|
version: "detect",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
"@eslint/js": "^9.39.2",
|
"@eslint/js": "^9.39.2",
|
||||||
"@next/eslint-plugin-next": "15.1.6",
|
"@next/eslint-plugin-next": "15.1.6",
|
||||||
"eslint-config-next": "15.1.6",
|
"eslint-config-next": "15.1.6",
|
||||||
|
"eslint-plugin-react": "^7.37.5",
|
||||||
|
"eslint-plugin-react-hooks": "^7.0.1",
|
||||||
"typescript-eslint": "^8.54.0"
|
"typescript-eslint": "^8.54.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import mintelNextConfig from "@mintel/next-config";
|
|||||||
import { NextConfig } from "next";
|
import { NextConfig } from "next";
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
// Gatekeeper specific overrides
|
basePath: '/gatekeeper',
|
||||||
};
|
};
|
||||||
|
|
||||||
export default mintelNextConfig(nextConfig);
|
export default mintelNextConfig(nextConfig);
|
||||||
|
|||||||
@@ -4,15 +4,24 @@ RUN apk add --no-cache libc6-compat curl
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN corepack enable pnpm
|
RUN corepack enable pnpm
|
||||||
|
|
||||||
# Copy source (honoring .dockerignore)
|
# Copy manifest files specifically for better layer caching
|
||||||
COPY . .
|
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json .npmrc ./
|
||||||
|
COPY packages/gatekeeper/package.json ./packages/gatekeeper/package.json
|
||||||
|
COPY packages/next-utils/package.json ./packages/next-utils/package.json
|
||||||
|
COPY packages/eslint-config/package.json ./packages/eslint-config/package.json
|
||||||
|
COPY packages/next-config/package.json ./packages/next-config/package.json
|
||||||
|
COPY packages/tsconfig/package.json ./packages/tsconfig/package.json
|
||||||
|
|
||||||
# Use a secret for NPM_TOKEN to authenticate with private registry
|
# Use a secret for NPM_TOKEN and a cache mount for the pnpm store
|
||||||
RUN --mount=type=cache,target=/root/.local/share/pnpm/store/v3 \
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
||||||
--mount=type=secret,id=NPM_TOKEN \
|
--mount=type=secret,id=NPM_TOKEN \
|
||||||
export NPM_TOKEN=$(cat /run/secrets/NPM_TOKEN) && \
|
export NPM_TOKEN=$(cat /run/secrets/NPM_TOKEN) && \
|
||||||
|
pnpm config set store-dir /pnpm/store && \
|
||||||
pnpm i --frozen-lockfile
|
pnpm i --frozen-lockfile
|
||||||
|
|
||||||
|
# Copy the rest of the source
|
||||||
|
COPY . .
|
||||||
|
|
||||||
# Build Gatekeeper and its dependencies
|
# Build Gatekeeper and its dependencies
|
||||||
RUN pnpm --filter @mintel/gatekeeper... build
|
RUN pnpm --filter @mintel/gatekeeper... build
|
||||||
RUN mkdir -p packages/gatekeeper/public
|
RUN mkdir -p packages/gatekeeper/public
|
||||||
|
|||||||
6
pnpm-lock.yaml
generated
6
pnpm-lock.yaml
generated
@@ -175,6 +175,12 @@ importers:
|
|||||||
eslint-config-next:
|
eslint-config-next:
|
||||||
specifier: 15.1.6
|
specifier: 15.1.6
|
||||||
version: 15.1.6(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
version: 15.1.6(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
||||||
|
eslint-plugin-react:
|
||||||
|
specifier: ^7.37.5
|
||||||
|
version: 7.37.5(eslint@9.39.2(jiti@2.6.1))
|
||||||
|
eslint-plugin-react-hooks:
|
||||||
|
specifier: ^7.0.1
|
||||||
|
version: 7.0.1(eslint@9.39.2(jiti@2.6.1))
|
||||||
typescript-eslint:
|
typescript-eslint:
|
||||||
specifier: ^8.54.0
|
specifier: ^8.54.0
|
||||||
version: 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
version: 8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
||||||
|
|||||||
Reference in New Issue
Block a user