Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 0 additions & 26 deletions .eslintrc.json

This file was deleted.

12 changes: 12 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"sortImports": {},
"sortTailwindcss": {},
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"printWidth": 80,
"sortPackageJson": false,
"ignorePatterns": []
}
47 changes: 47 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
"plugins": ["react", "typescript", "nextjs", "import", "jsx-a11y"],
"categories": {
"correctness": "error",
"suspicious": "warn",
"pedantic": "off",
"style": "off",
"perf": "warn"
},
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-non-null-assertion": "off",
"react/react-in-jsx-scope": "off",
"react/no-unescaped-entities": "off",
"react-hooks/exhaustive-deps": "off",
"@next/next/no-img-element": "off",
"@next/next/no-html-link-for-pages": "off",
"prefer-template": "warn",
"no-useless-escape": "warn",
"import/no-unassigned-import": "off",
"import/no-named-as-default": "off",
"import/no-named-as-default-member": "off",
"no-shadow": "off",
"react/no-array-index-key": "off",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/click-events-have-key-events": "off",
"no-await-in-loop": "off"
},
Comment on lines +11 to +30

Choose a reason for hiding this comment

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

high

Disabling important linting rules like react-hooks/exhaustive-deps and accessibility rules (jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events) can introduce subtle bugs and accessibility issues. While these might have been disabled before, this migration is a good opportunity to enable them (at least as warnings) and address the violations. This would significantly improve the application's correctness and accessibility. For cases where a rule is too noisy, you can disable it for a specific line with an explanatory comment.

"settings": {
"react": { "version": "19.0.0" },
"next": { "rootDir": "./" }
},
"ignorePatterns": [
"tailwind.config.js",
"src/gql/**/*.ts",
"src/**/*.mdx",
"src/types.g.ts",
"src/schema/generated.tsx",
"node_modules",
".next",
"coverage",
"build",
"dist"
]
}
10 changes: 0 additions & 10 deletions .prettierrc

This file was deleted.

10 changes: 6 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ This is the **ClippingKK web application** - a Next.js 15 application for managi
- `pnpm test` - Run Jest tests
- `pnpm test -- [path/to/test]` - Run a specific test file
- `pnpm test -- --watch` - Run tests in watch mode
- `pnpm lint` - Run ESLint linter
- `pnpm lint:fix` - Auto-fix linting issues with ESLint
- `pnpm format` - Format code with Prettier
- `pnpm lint` - Run oxlint linter
- `pnpm lint:fix` - Auto-fix linting issues with oxlint
- `pnpm format` - Format code with oxfmt
- `pnpm format:check` - Check formatting without writing
- `pnpm codegen` - Generate GraphQL types from schema

**Additional commands:**
Expand Down Expand Up @@ -82,7 +83,8 @@ const dehydratedState = dehydrate(rq)
- `codegen.yml` - GraphQL code generation
- `next.config.ts` - Next.js config with image domains
- `tailwind.config.js` - UI styling configuration
- `.eslintrc.json` - ESLint linting rules
- `.oxlintrc.json` - oxlint linting rules
- `.oxfmtrc.json` - oxfmt formatting rules

**Core Services:**
- `src/services/apollo.server.ts` - Server-side Apollo Client setup
Expand Down
4 changes: 2 additions & 2 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
pre-commit:
parallel: true
commands:
eslint:
oxlint:
glob: "*.{js,ts,jsx,tsx}"
run: npm run lint -- --fix {staged_files}
run: pnpm run lint:fix {staged_files}

Choose a reason for hiding this comment

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

medium

The current command pnpm run lint:fix {staged_files} will execute oxlint --fix src/ and ignore the {staged_files} placeholder, because pnpm doesn't pass arguments to scripts without --. This means the pre-commit hook will lint and fix the entire src/ directory, not just the staged files, which is inefficient and likely not the intended behavior. To fix this and lint only staged files, you should call oxlint directly.

      run: pnpm oxlint --fix {staged_files}

# rubocop:
# tags: backend style
# glob: "*.rb"
Expand Down
20 changes: 9 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
"dev": "next dev --turbo --port 3101",
"build": "npm run codegen && next build --turbo",
"start": "next start -p $PORT",
"lint": "eslint src/",
"lint:fix": "eslint --fix src/",
"format": "prettier --write src/",
"lint": "oxlint src/",
"lint:fix": "oxlint --fix src/",
"format": "oxfmt src/",
"format:check": "oxfmt --check src/",
"test": "jest",
"test:update": "npm test -- --updateSnapshot",
"coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls",
Expand Down Expand Up @@ -57,19 +58,16 @@
"autoprefixer": "^10.4.27",
"coveralls": "^3.1.1",
"cross-fetch": "^4.1.0",
"eslint": "^10.1.0",
"eslint-config-next": "^16.2.1",
"graphql": "^16.13.1",
"graphql-tag": "^2.12.6",
"jest": "^30.3.0",
"jest-environment-jsdom": "^30.3.0",
"lefthook": "^2.1.4",
"lint-staged": "^16.4.0",
"oxfmt": "^0.41.0",
"oxlint": "^1.56.0",
"postcss": "^8.5.8",
"postcss-simple-vars": "^7.0.1",
"prettier": "^3.8.1",
"prettier-plugin-organize-imports": "^4.3.0",
"prettier-plugin-tailwindcss": "^0.7.2",
"redux-mock-store": "^1.5.5",
"ts-jest": "^29.4.6",
"tw-animate-css": "^1.4.0",
Expand Down Expand Up @@ -193,12 +191,12 @@
},
"lint-staged": {
"*.{js,ts,tsx}": [
"eslint --fix",
"prettier --write",
"oxlint --fix",
"oxfmt",
"git add"
],
"*.{css,md,json}": [
"prettier --write",
"oxfmt",
"git add"
]
},
Comment on lines 192 to 202

Choose a reason for hiding this comment

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

medium

It seems lefthook is being used for pre-commit hooks, with commands defined in lefthook.yml. This lint-staged configuration appears to be redundant and might not be executed. To avoid confusion and keep the configuration clean, consider either removing this lint-staged section or configuring lefthook to run lint-staged.

Expand Down
Loading
Loading