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
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ schema.sqlite.sql
scripts/
public/
attached_assets/
__tests__/
**/.eslintrc.js
jest.config.js
jest.setup.js
94 changes: 68 additions & 26 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,43 @@ module.exports = {
rules: {
semi: ['error', 'never'],
indent: ['error', 2],
'no-undef': 'off',
// Re-enable undefined variable checks with TypeScript handling them
'no-undef': 'error',
'react/jsx-filename-extension': [2, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
'react/function-component-definition': [
2,
{ namedComponents: 'arrow-function', unnamedComponents: 'arrow-function' },
],
'react/react-in-jsx-scope': 'off',
'import/extensions': [
'react/react-in-jsx-scope': 'off', // This is fine for Next.js which doesn't need React imports
'import/extensions': ['error', 'never'],
'react/jsx-props-no-spreading': 'off', // This is a stylistic choice that doesn't indicate bugs
'react/jsx-one-expression-per-line': 'off', // This is a stylistic choice handled by Prettier
// Re-enable import cycle detection which can cause real issues
'import/no-cycle': 'warn',
'import/named': 'warn',
// Keep this off as TypeScript handles it better with path aliases
'import/no-unresolved': 'off',
'import/no-named-as-default': 'warn',
'import/no-named-as-default-member': 'warn',
// Configure the no-unused-vars rule to ignore variables starting with _
'no-unused-vars': 'off', // Turn off base rule as it can report incorrect errors
'@typescript-eslint/no-unused-vars': [
'error',
'always',
{ js: 'never', jsx: 'never', ts: 'never', tsx: 'never' },
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'react/jsx-props-no-spreading': 'off',
'react/jsx-one-expression-per-line': 'off',
'import/no-cycle': 'off',
'import/named': 'off',
'import/no-unresolved': 'off',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',
},
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
'react/prop-types': 'off',
'import/order': 'off',
// TypeScript files: relax stylistic rules; Prettier handles formatting
'react/prop-types': 'off', // Not needed with TypeScript
'import/order': 'warn', // Promote organized imports

// Formatting rules handled by Prettier can remain off
semi: 'off',
'@typescript-eslint/semi': 'off',
quotes: 'off',
Expand All @@ -71,22 +81,54 @@ module.exports = {
'@typescript-eslint/object-curly-spacing': 'off',
'object-curly-spacing': 'off',
'function-paren-newline': 'off',
'@typescript-eslint/return-await': 'off',
'no-return-await': 'off',
'eol-last': 'off',
camelcase: 'off',
'no-param-reassign': 'off',
'no-console': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'no-multiple-empty-lines': 'off',

// Re-enable rules that catch actual bugs or bad patterns
'@typescript-eslint/return-await': 'warn',
'no-return-await': 'off', // Disabled in favor of TypeScript version
'eol-last': 'warn',
'no-param-reassign': 'warn',
// Allow console for development but consider warning
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
// These catch important TypeScript issues
'@typescript-eslint/no-explicit-any': 'warn',

'no-multiple-empty-lines': 'warn',

// Keep formatting rules off since Prettier handles them
'max-len': 'off',
'react/jsx-wrap-multilines': 'off',
'react/jsx-indent': 'off',
'react/jsx-closing-tag-location': 'off',
'react/jsx-indent-props': 'off',
'no-useless-escape': 'off',

// Re-enable this as it catches genuine errors
'no-useless-escape': 'warn',
},
},
{
// Add Jest environment for test files
files: ['**/__tests__/**/*', '**/*.test.{js,jsx,ts,tsx}'],
env: {
jest: true, // This makes Jest globals available
},
rules: {
'no-console': 'off',
},
},
{
// Allow more console usage in test files
files: ['**/__tests__/**/*', '**/e2e/**/*'],
rules: {
'no-console': 'off',
},
},
{
// Special rules for database-related files
files: ['**/db.ts', '**/prisma/**/*'],
rules: {
// Completely turn off camelcase for database files
camelcase: 'off',
'@typescript-eslint/camelcase': 'off',
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [18.x, 20.x] # Test against relevant Node.js versions
node-version: [20.x] # Test against Node.js 20.x

steps:
- name: Checkout repository
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

.db/
logfile
.env.local
Expand Down Expand Up @@ -39,3 +38,8 @@ yarn-error.log*
# vercel
.vercel
dev.db
test-results
test.db-journal

# Ignore Prisma generated client artifacts
prisma/node_modules/
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ schema.sqlite.sql
scripts/
public/
attached_assets/
__tests__/
**/*.min.js
*.lock
yarn.lock
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Thank you for your interest in contributing to Funey!

## Code Style and Quality

- Indentation: 4 spaces
- Indentation: 2 spaces
- Strings: double quotes
- Semicolons: follow existing style
- Use functional React components
Expand Down
Loading
Loading