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: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ This application uses Cloudflare Developer Platform, including Workers and Durab
## Implementation

- When coding new features, create tests that cover the new code
- Run code linting with `npm run lint` before commiting the code and fix the issues it highlights
50 changes: 50 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import globals from 'globals';

export default [
eslint.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
globals: {
...globals.node,
...globals.browser,
},
},
},
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
'@typescript-eslint/no-explicit-any': 'off', // Too many existing instances to fix now
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'no-empty': ['error', { allowEmptyCatch: true }],
'prefer-const': 'error',
'preserve-caught-error': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
},
},
{
files: ['public/**/*.js'],
rules: {
'no-unused-vars': 'off', // Handled by typescript-eslint for ts files, but public js might need a different approach
},
},
{
ignores: [
'node_modules/',
'.wrangler/',
'dist/',
'coverage/',
'worker-configuration.d.ts',
'public/users/power-strip.js', // Existing legacy JS
],
},
];
Loading