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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,5 @@ We welcome contributions! Here's how you can help:
5. [Amazing-Stardom](https://github.com/Amazing-Stardom)
6. [MuchiraIrungu](https://github.com/MuchiraIrungu)
7. [soham-founder](https://github.com/soham-founder)
8. [Jayant-Jeet](https://github.com/Jayant-Jeet)
8. [Janmesh23](https://github.com/Janmesh23)
9. [Jayant-Jeet](https://github.com/Jayant-Jeet)
5 changes: 5 additions & 0 deletions frontend/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

cd frontend
npx lint-staged
24 changes: 24 additions & 0 deletions frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Dependencies
node_modules/

# Build outputs
dist/
.astro/
build/

# Lock files
package-lock.json
pnpm-lock.yaml
yarn.lock

# Generated files
*.min.js
*.min.css

# Environment files
.env
.env.*

# folder ignores
/frontend/public
/frontend/data
17 changes: 17 additions & 0 deletions frontend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"plugins": ["prettier-plugin-astro"],
"overrides": [
{
"files": "*.astro",
"options": {
"parser": "astro"
}
}
]
}
103 changes: 103 additions & 0 deletions frontend/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
import js from '@eslint/js';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
import astroPlugin from 'eslint-plugin-astro';
import astroParser from 'astro-eslint-parser';
import prettierConfig from 'eslint-config-prettier';
import globals from 'globals';

export default [
// Base recommended configs
js.configs.recommended,

// Global ignores (replaces .eslintignore)
{
ignores: [
'**/node_modules/**',
'**/dist/**',
'**/.astro/**',
'**/build/**',
'**/*.min.js',
'**/.env',
'**/.env.*',
'**/.vscode/**',
'**/.idea/**',
'**/.DS_Store',
],
},

// JavaScript and TypeScript files
{
files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: tsParser,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.browser,
...globals.node,
...globals.es2021,
},
},
plugins: {
'@typescript-eslint': tsPlugin,
'react': reactPlugin,
'react-hooks': reactHooksPlugin,
'jsx-a11y': jsxA11yPlugin,
},
settings: {
react: {
version: 'detect',
},
},
rules: {
...tsPlugin.configs.recommended.rules,
...reactPlugin.configs.recommended.rules,
...reactHooksPlugin.configs.recommended.rules,
...jsxA11yPlugin.configs.recommended.rules,

// Custom overrides
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
},
},

// Astro files
{
files: ['**/*.astro'],
languageOptions: {
parser: astroParser,
parserOptions: {
parser: '@typescript-eslint/parser',
extraFileExtensions: ['.astro'],
},
globals: {
...globals.browser,
...globals.node,
},
},
plugins: {
astro: astroPlugin,
},
rules: {
...astroPlugin.configs.recommended.rules,
},
},

// Prettier config must be last to override conflicting rules
prettierConfig,
];
Loading