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
22 changes: 0 additions & 22 deletions .eslintrc

This file was deleted.

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node_modules
.env
types
types
# Coverage reports
coverage/
*.lcov
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const app = new Koa().use(bodyParser()).use(
rootValue: {},
buildContext: async ctx => {},
formatError: error => error,
})
}),
)

app.listen(3000)
Expand Down
59 changes: 59 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import js from '@eslint/js'
import prettier from 'eslint-config-prettier'

export default [
js.configs.recommended,
prettier,
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
console: 'readonly',
process: 'readonly',
Buffer: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
global: 'readonly',
setTimeout: 'readonly',
setInterval: 'readonly',
setImmediate: 'readonly',
clearTimeout: 'readonly',
clearInterval: 'readonly',
clearImmediate: 'readonly',
fetch: 'readonly',
},
},
rules: {
// Allow snake_case (disable camelcase enforcement)
camelcase: 'off',
// Modern JS best practices
'no-var': 'error',
'object-shorthand': 'error',
'prefer-const': ['error', { destructuring: 'any' }],
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'prefer-object-spread': 'error',
'prefer-destructuring': 'error',
'prefer-numeric-literals': 'error',
'no-throw-literal': 'off',
// Allow unused vars in function signatures (common pattern)
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
},
},
{
ignores: [
'node_modules/**',
'coverage/**',
'dist/**',
'types/**',
'*.config.js',
],
},
]
Loading
Loading