Skip to content

Commit

Permalink
fix: enforce pnpm as package manager & Husky setup
Browse files Browse the repository at this point in the history
- Set up Husky for pre-commit hooks
- Clear npm cache and remove node_modules
- Update package.json to specify preferred package manager
- Add lint-staged to enforce linting and formatting on commit
- Ensure consistent code formatting with Prettier
  • Loading branch information
harshsoni-harsh committed Jan 11, 2025
1 parent 4b5dcf1 commit 4564140
Show file tree
Hide file tree
Showing 9 changed files with 3,886 additions and 20,011 deletions.
3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
.next/
5 changes: 5 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
trailingComma: 'es5'
tabWidth: 2
semi: true
singleQuote: true
bracketSpacing: true
15 changes: 15 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});
export default [
...compat.extends('next/core-web-vitals', 'next/typescript', 'prettier'),
];
Loading

0 comments on commit 4564140

Please sign in to comment.