Initial commit: Shattered Void MMO foundation
- Complete PostgreSQL database schema with 21+ tables - Express.js server with dual authentication (player/admin) - WebSocket support for real-time features - Comprehensive middleware (auth, validation, logging, security) - Game systems: colonies, resources, fleets, research, factions - Plugin-based combat architecture - Admin panel foundation - Production-ready logging and error handling - Docker support and CI/CD ready - Complete project structure following CLAUDE.md patterns 🤖 Generated with Claude Code (https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
commit
1a60cf55a3
69 changed files with 24471 additions and 0 deletions
102
.eslintrc.js
Normal file
102
.eslintrc.js
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
module.exports = {
|
||||
env: {
|
||||
browser: false,
|
||||
commonjs: true,
|
||||
es6: true,
|
||||
node: true,
|
||||
jest: true,
|
||||
},
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:node/recommended',
|
||||
'plugin:jest/recommended',
|
||||
],
|
||||
plugins: ['node', 'jest'],
|
||||
parserOptions: {
|
||||
ecmaVersion: 2022,
|
||||
sourceType: 'module',
|
||||
},
|
||||
rules: {
|
||||
// Code Quality
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
|
||||
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
||||
'no-var': 'error',
|
||||
'prefer-const': 'error',
|
||||
'prefer-arrow-callback': 'error',
|
||||
'arrow-spacing': 'error',
|
||||
|
||||
// Style
|
||||
'indent': ['error', 2],
|
||||
'linebreak-style': ['error', 'unix'],
|
||||
'quotes': ['error', 'single'],
|
||||
'semi': ['error', 'always'],
|
||||
'comma-dangle': ['error', 'always-multiline'],
|
||||
'object-curly-spacing': ['error', 'always'],
|
||||
'array-bracket-spacing': ['error', 'never'],
|
||||
'space-before-blocks': 'error',
|
||||
'keyword-spacing': 'error',
|
||||
'space-infix-ops': 'error',
|
||||
'eol-last': 'error',
|
||||
'no-trailing-spaces': 'error',
|
||||
'max-len': ['warn', { code: 120, ignoreComments: true }],
|
||||
|
||||
// Functions
|
||||
'func-names': 'off',
|
||||
'space-before-function-paren': ['error', {
|
||||
anonymous: 'always',
|
||||
named: 'never',
|
||||
asyncArrow: 'always',
|
||||
}],
|
||||
|
||||
// Objects
|
||||
'object-shorthand': 'error',
|
||||
'quote-props': ['error', 'as-needed'],
|
||||
|
||||
// Arrays
|
||||
'array-callback-return': 'error',
|
||||
|
||||
// Error Handling
|
||||
'handle-callback-err': 'error',
|
||||
'no-throw-literal': 'error',
|
||||
|
||||
// Security
|
||||
'no-eval': 'error',
|
||||
'no-implied-eval': 'error',
|
||||
'no-new-func': 'error',
|
||||
|
||||
// Node.js specific
|
||||
'node/no-unpublished-require': 'error',
|
||||
'node/no-missing-require': 'error',
|
||||
'node/no-deprecated-api': 'error',
|
||||
'node/prefer-global/buffer': ['error', 'always'],
|
||||
'node/prefer-global/console': ['error', 'always'],
|
||||
'node/prefer-global/process': ['error', 'always'],
|
||||
'node/prefer-promises/dns': 'error',
|
||||
'node/prefer-promises/fs': 'error',
|
||||
|
||||
// Jest specific
|
||||
'jest/no-disabled-tests': 'warn',
|
||||
'jest/no-focused-tests': 'error',
|
||||
'jest/no-identical-title': 'error',
|
||||
'jest/prefer-to-have-length': 'warn',
|
||||
'jest/valid-expect': 'error',
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['**/*.test.js', '**/*.spec.js'],
|
||||
env: {
|
||||
jest: true,
|
||||
},
|
||||
rules: {
|
||||
'no-console': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['src/database/migrations/**/*.js', 'src/database/seeds/**/*.js'],
|
||||
rules: {
|
||||
'node/no-unpublished-require': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue