Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
41 changes: 0 additions & 41 deletions .github/workflows/chromatic.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ typings/
.next
out

# storybook build output
.storybook-dist
.storybook-static
storybook-static

# WebStorm Config
.idea
Expand Down
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
node_modules
package.json
pnpm-lock.yaml
.babelrc
**/.babelrc
next-env.d.ts
.next
.github
bin
Expand Down
19 changes: 19 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "base-nova",
"rsc": true,
"tailwind": {
"config": "",
"css": "src/lib/styles/globals.css",
"baseColor": "slate",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib/utils",
"hooks": "@/lib/hooks"
},
"iconLibrary": "lucide"
}
43 changes: 7 additions & 36 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { getDefaultCallees } from 'eslint-plugin-better-tailwindcss/defaults';
import noBarrelFiles from 'eslint-plugin-no-barrel-files';
import eslintPluginLodash from 'eslint-plugin-lodash';
import eslintPluginPlaywright from 'eslint-plugin-playwright';
import eslintPluginStorybook from 'eslint-plugin-storybook';


const compat = new FlatCompat({
baseDirectory: import.meta.dirname,
Expand All @@ -38,26 +38,13 @@ export default defineConfig(
'.next/**',
'.github/**',
'bin/**',
'static/**',
'cypress-coverage/**',
'vitest-coverage/**',
'src/.storybook/**',
'.storybook-dist/**',
'storybook-static/**',
'playwright-report/**',
'test-results/**',
'public/**',
'*.svg',
'vitest.setup.tsx',
'vitest.config.mts',
'prettier.config.js',
'postcss.config.js',
'next-sitemap.config.js',
'next.config.ts',
'next.config.js',
'playwright.config.ts',
'sentry.client.config.js',
'sentry.server.config.js',
]),

// ── Base configs ──
Expand Down Expand Up @@ -173,7 +160,6 @@ export default defineConfig(
json: 'always',
png: 'always',
svg: 'always',
stories: 'always',
},
],
'import-x/no-unresolved': 'off',
Expand Down Expand Up @@ -232,18 +218,15 @@ export default defineConfig(
},
settings: {
'better-tailwindcss': {
entryPoint: './src/common/styles/globals.css',
callees: [...getDefaultCallees(), 'cx', 'cva'],
entryPoint: './src/lib/styles/globals.css',
callees: [...getDefaultCallees(), 'cn', 'cva'],
},
},
},

// ── No Barrel Files ──
noBarrelFiles.flat,

// ── Storybook (flat config) ──
...eslintPluginStorybook.configs['flat/recommended'],

// ── CommonJS files ──
{
files: ['**/*.js'],
Expand Down Expand Up @@ -296,12 +279,6 @@ export default defineConfig(
message:
'Please use named imports of "prop-types".\n Example: "import { func } from \'prop-types\';"',
},
{
name: 'formik',
importNames: ['Form'],
message:
'Please use our Form component to have good defaults defined.\n "import Form from \'@/components/Form/Form\';"',
},
{
name: 'react',
importNames: ['default'],
Expand All @@ -311,13 +288,13 @@ export default defineConfig(
name: 'tailwind-merge',
importNames: ['twMerge'],
message:
'Please import `cx` from `@/common/utils/cva.ts` instead of directly from tailwind-merge.',
'Please import `cn` from `@/lib/utils.ts` instead of directly from tailwind-merge.',
},
{
name: 'class-variance-authority',
importNames: ['cx', 'cva'],
message:
'Please import from `@/common/utils/cva.ts` instead of directly from class-variance-authority.',
'Please import from `@/lib/utils.ts` instead of directly from class-variance-authority.',
},
],
},
Expand Down Expand Up @@ -377,12 +354,6 @@ export default defineConfig(
name: 'react-select',
message: 'Please use `@/components/Form/Select/ThemedReactSelect` instead.',
},
{
name: 'formik',
importNames: ['Form'],
message:
'Please use our Form component to have good defaults defined.\n "import { Form } from \'@/components/Form/Form\';"',
},
{
name: 'react',
importNames: ['default'],
Expand All @@ -392,13 +363,13 @@ export default defineConfig(
name: 'tailwind-merge',
importNames: ['twMerge'],
message:
'Please import `cx` from `@/common/utils/cva.ts` instead of directly from tailwind-merge.',
'Please import `cn` from `@/lib/utils.ts` instead of directly from tailwind-merge.',
},
{
name: 'class-variance-authority',
importNames: ['cx', 'cva'],
message:
'Please import from `@/common/utils/cva.ts` instead of directly from class-variance-authority.',
'Please import from `@/lib/utils.ts` instead of directly from class-variance-authority.',
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import './.next/types/routes.d.ts';
import "./.next/dev/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
13 changes: 8 additions & 5 deletions next-sitemap.config.js → next-sitemap.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
const priorities = { '/': '1.00', '/join': '1.00' };
import type { IConfig } from 'next-sitemap';

/** @type {import('next-sitemap').IConfig} */
module.exports = {
// eslint-disable-next-line unicorn/no-zero-fractions
const priorities: Record<string, number> = { '/': 1.0, '/join': 1.0 };

const config: IConfig = {
siteUrl: 'https://www.operationcode.org',
generateIndexSitemap: false, // Simplification to make robots.txt "Sitemap" easier
generateIndexSitemap: false,
priority: 0.8,
changefreq: 'weekly',
// Modified default transform function
transform: async (config, path) => {
return {
loc: path,
Expand All @@ -31,3 +32,5 @@ module.exports = {
'/confirm_email',
],
};

export default config;
16 changes: 11 additions & 5 deletions next.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
import type { NextConfig } from 'next';
import { withSentryConfig } from '@sentry/nextjs';
import bundleAnalyzer from '@next/bundle-analyzer';
import { svgoConfig } from './src/common/config/svgo';
import createMDX from '@next/mdx';
import { svgoConfig } from './src/lib/config/svgo';

const hasBundleAnalyzer = process.env.ANALYZE === 'true';
const withBundleAnalyzer = bundleAnalyzer({ enabled: hasBundleAnalyzer });
const jsonSvgoConfig = JSON.parse(JSON.stringify(svgoConfig));

const withMDX = createMDX({
options: {
remarkPlugins: [],
rehypePlugins: [],
},
});

const nextConfig: NextConfig = {
pageExtensions: ['md', 'mdx', 'ts', 'tsx'],
turbopack: {
rules: {
'*.svg': {
Expand All @@ -29,9 +38,6 @@ const nextConfig: NextConfig = {
remotePatterns: [
{ protocol: 'https', hostname: 'operation-code-assets.s3.us-east-2.amazonaws.com' },
{ protocol: 'https', hostname: 'user-images.githubusercontent.com' },
{ protocol: 'https', hostname: 'ssl-static.libsyn.com' },
{ protocol: 'https', hostname: 'static.libsyn.com' },
{ protocol: 'https', hostname: 'libsyn.com' },
{ protocol: 'https', hostname: 'i.ytimg.com' },
],
},
Expand Down Expand Up @@ -75,6 +81,6 @@ const nextConfig: NextConfig = {
},
};

export default withSentryConfig(withBundleAnalyzer(nextConfig), {
export default withSentryConfig(withBundleAnalyzer(withMDX(nextConfig)), {
silent: true,
});
24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,15 @@
"scripts": {
"build": "next build",
"build:analyze": "cross-env ANALYZE=true next build",
"chromatic": "chromatic --exit-zero-on-changes skip",
"dev": "next -p 3000",
"format": "prettier --write \"**/*\"",
"format:md": "prettier --write \"**/*.md\"",
"lint": "pnpm lint:scripts && pnpm format:md",
"lint:ci": "eslint src",
"lint:scripts": "eslint --fix src",
"postbuild": "next-sitemap",
"postbuild": "next-sitemap --config next-sitemap.config.ts",
"prepare": "husky",
"start": "next start -p 3000",
"storybook": "storybook dev -p 9001 -c src/.storybook",
"storybook:build": "storybook build -c src/.storybook -o .storybook-dist",
"test:e2e": "export LOCAL_PLAYWRIGHT=true && playwright test --headed",
"test:e2e:debug": "pnpm test:e2e --debug",
"test:e2e:dev": "export LOCAL_PLAYWRIGHT=true && playwright test --ui",
Expand All @@ -33,39 +30,46 @@
"vitest": "cross-env vitest --config ./vitest.config.mts"
},
"dependencies": {
"@base-ui/react": "^1.3.0",
"@hookform/resolvers": "^5.2.2",
"@mdx-js/loader": "^3.1.1",
"@mdx-js/react": "^3.1.1",
"@next/bundle-analyzer": "^16.2.1",
"@next/mdx": "^16.2.1",
"@radix-ui/react-dialog": "1.1.15",
"@radix-ui/react-tabs": "1.1.13",
"@sentry/nextjs": "^10.45.0",
"@types/airtable": "^0.10.5",
"@types/mdx": "^2.0.13",
"airtable": "^0.12.2",
"axios": "^1.12.2",
"cva": "^1.0.0-beta.4",
"fast-xml-parser": "^3.21.1",
"fingerprintjs2": "^2.1.4",
"fontfaceobserver": "^2.3.0",
"formik": "^2.4.6",
"lodash": "^4.17.21",
"logrocket": "^10.1.0",
"logrocket-react": "^6.0.3",
"lucide-react": "^1.6.0",
"next": "^16.2.1",
"next-sitemap": "^4.2.3",
"object-hash": "^3.0.0",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"react-hook-form": "^7.72.0",
"react-player": "^2.16.0",
"react-select": "^5.10.2",
"remark-gfm": "^4.0.1",
"tailwind-merge": "^3.3.1",
"yup": "^1.7.1"
"tw-animate-css": "^1.4.0",
"zod": "^3.25.76"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.5",
"@eslint/js": "^9.39.4",
"@faker-js/faker": "^10.3.0",
"@next/eslint-plugin-next": "^16.2.1",
"@playwright/test": "^1.56.1",
"@storybook/addon-docs": "^10.3.1",
"@storybook/nextjs": "^10.3.1",
"@svgr/webpack": "^8.1.0",
"@tailwindcss/postcss": "^4.2.2",
"@testing-library/jest-dom": "^6.9.1",
Expand All @@ -83,7 +87,6 @@
"@vitest/eslint-plugin": "^1.6.13",
"@vitest/ui": "^3.1.2",
"axios-mock-adapter": "^2.1.0",
"chromatic": "^15.3.0",
"cross-env": "^7.0.3",
"dotenv": "^17.2.3",
"eslint": "^9.39.4",
Expand All @@ -98,15 +101,14 @@
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-storybook": "^10.3.2",
"eslint-plugin-unicorn": "^63.0.0",
"husky": "^9.1.7",
"jsdom": "^26.1.0",
"lint-staged": "13.0.3",
"postcss": "^8.5.6",
"prettier": "^3.8.1",
"prettier-plugin-tailwindcss": "^0.7.2",
"storybook": "^10.3.1",
"shadcn": "^4.1.0",
"tailwindcss": "^4.2.2",
"typescript": "^5.9.3",
"typescript-eslint": "^8.57.1",
Expand Down
Loading
Loading