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
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# WASM Engine URL - Points to the compiled WebAssembly binary
# Dev: main branch WASM build / Testnet: testnet branch WASM build / Mainnet: mainnent branch WASM build
VITE_WASM_ENGINE_URL=https://your-domain.com/file_name.wasm

# WASM JS Bindings URL - Points to the JavaScript bindings
# Dev: main branch bindings / Testnet: testnet bindings / Mainnet: mainnet branch production bindings
VITE_WASM_BINDINGS_URL=https://your-domain.com/file_name.js
23 changes: 21 additions & 2 deletions .github/workflows/merge_protection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,25 @@ jobs:
echo "Base branch: ${{ github.base_ref }}"
echo "Head branch: ${{ github.head_ref }}"

# Check testnet protection
if [[ "${{ github.base_ref }}" == "main" && "${{ github.head_ref }}" != "dev" ]]; then
echo "violation=testnet" >> $GITHUB_OUTPUT
{
echo 'message<<EOF'
echo "❌ **Branch Protection Violation**"
echo ""
echo "You are trying to merge from \`${{ github.head_ref }}\` to \`main\`, but our branch protection rules only allow merges from \`dev\` to \`main\`."
echo ""
echo "**Correct workflow:**"
echo "1. Merge your changes to \`dev\` first"
echo "2. Then create a PR from \`dev\` to \`main\`"
echo ""
echo "This ensures proper code flow and testing procedures."
echo 'EOF'
} >> $GITHUB_OUTPUT
exit 1
fi

# Check testnet protection
if [[ "${{ github.base_ref }}" == "testnet" && "${{ github.head_ref }}" != "main" ]]; then
echo "violation=testnet" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -106,7 +125,7 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['branch-protection-violation', 'needs-attention']
labels: ['branch-protection-violation']
});

- name: Optional - Auto-close PR
Expand All @@ -125,5 +144,5 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: '🔒 This PR has been automatically closed due to branch protection rules. Please follow the correct workflow and create a new PR.'
body: 'This PR has been automatically closed due to branch protection rules. Please follow the correct workflow and create a new PR.'
});
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# Autogenerated files & directories
node_modules
dist
dist

# Environment Variables
.env
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Daemon Operating System Page

This website is built using the following technologies:

1. SolidJS
2. TailwindCSS
3. Typescript
Expand Down Expand Up @@ -69,13 +70,11 @@ The `dist` folder contains all the front end files that are necessary to deploy
If you encounter problems, here are some common solutions:

1. **Command not executing:**

- Verify you're in the correct directory
- Run `bun install` again
- Confirm bun is installed with `bun --version`

2. **Changes not reflecting:**

- Ensure the development server is running
- Check the terminal for error messages
- Try refreshing the browser
Expand Down
204 changes: 115 additions & 89 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,151 +1,177 @@
import js from "@eslint/js";
import solid from "eslint-plugin-solid/configs/typescript";
import * as tsParser from "@typescript-eslint/parser";
import tsPlugin from "@typescript-eslint/eslint-plugin";
import prettierConfig from "eslint-config-prettier";
import js from '@eslint/js';
import solid from 'eslint-plugin-solid/configs/typescript';
import * as tsParser from '@typescript-eslint/parser';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import prettierConfig from 'eslint-config-prettier';

export default [
js.configs.recommended,
{
files: ["**/*.{ts,tsx,js,jsx}"],
ignores: [
'dist/**',
'node_modules/**',
'*.config.js',
'*.config.ts',
'public/**/*.js',
'public/**/*.d.ts',
'**/*.wasm.d.ts',
],
},
{
files: ['**/*.{ts,tsx,js,jsx}'],
...solid,
languageOptions: {
parser: tsParser,
parserOptions: {
project: "./tsconfig.json",
ecmaVersion: "latest",
sourceType: "module",
project: './tsconfig.json',
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
globals: {
window: 'readonly',
document: 'readonly',
console: 'readonly',
navigator: 'readonly',
localStorage: 'readonly',
sessionStorage: 'readonly',
fetch: 'readonly',
setTimeout: 'readonly',
setInterval: 'readonly',
clearTimeout: 'readonly',
clearInterval: 'readonly',
requestAnimationFrame: 'readonly',
cancelAnimationFrame: 'readonly',
crypto: 'readonly',
caches: 'readonly',
GPUAdapter: 'readonly',
GPUDevice: 'readonly',
Interact: 'readonly',
},
},
plugins: {
"@typescript-eslint": tsPlugin,
'@typescript-eslint': tsPlugin,
solid: solid.plugins.solid,
},
rules: {
// TypeScript specific rules
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/no-unused-vars": [
"warn",
'@typescript-eslint/semi': ['error', 'always'],
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/consistent-type-imports": [
"error",
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/consistent-type-imports': [
'error',
{
prefer: "type-imports",
prefer: 'type-imports',
},
],
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/prefer-interface": "off",
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/prefer-interface': 'off',

// Naming conventions matching your style guide
"@typescript-eslint/naming-convention": [
"error",
'@typescript-eslint/naming-convention': [
'error',
// Variables: camelCase, descriptive names
{
selector: "variable",
format: ["camelCase", "UPPER_CASE"],
leadingUnderscore: "allow",
selector: 'variable',
format: ['camelCase', 'UPPER_CASE'],
leadingUnderscore: 'allow',
},
// Booleans: isActive, hasPermission pattern
{
selector: "variable",
types: ["boolean"],
format: ["camelCase"],
prefix: ["is", "has", "contains", "should", "will", "did", "can"],
selector: 'variable',
types: ['boolean'],
format: ['camelCase', 'PascalCase'],
prefix: ['is', 'has', 'contains', 'should', 'will', 'did', 'can', 'needs', 'are'],
},
// Functions: camelCase with verb names
{
selector: "function",
format: ["camelCase", "PascalCase"], // PascalCase for components
selector: 'function',
format: ['camelCase', 'PascalCase'], // PascalCase for components
},
// Classes and interfaces: PascalCase
{
selector: "class",
format: ["PascalCase"],
selector: 'class',
format: ['PascalCase'],
},
{
selector: "interface",
format: ["PascalCase"],
selector: 'interface',
format: ['PascalCase'],
},
{
selector: "typeAlias",
format: ["PascalCase"],
selector: 'typeAlias',
format: ['PascalCase'],
},
// Type parameters
{
selector: "typeParameter",
format: ["PascalCase"],
selector: 'typeParameter',
format: ['PascalCase'],
},
// Enums: PascalCase
{
selector: "enum",
format: ["PascalCase"],
selector: 'enum',
format: ['PascalCase'],
},
// Enum members: UPPER_CASE
{
selector: "enumMember",
format: ["UPPER_CASE"],
selector: 'enumMember',
format: ['UPPER_CASE'],
},
],

// General JavaScript/TypeScript rules
semi: "off", // Use @typescript-eslint/semi instead
indent: "off", // Let Prettier handle this
quotes: ["error", "single", { avoidEscape: true }],
"comma-dangle": ["error", "always-multiline"],
"no-trailing-spaces": "error",
"no-multiple-empty-lines": ["error", { max: 2, maxEOF: 1 }],
"eol-last": ["error", "always"],
"object-curly-spacing": ["error", "always"],
"array-bracket-spacing": ["error", "never"],
"arrow-parens": ["error", "always"],
"arrow-body-style": ["error", "as-needed"],
"prefer-const": "warn",
"no-var": "error",
"no-console": "warn",
"no-debugger": "error",
eqeqeq: ["error", "always"],
semi: 'off', // Use @typescript-eslint/semi instead
indent: 'off', // Let Prettier handle this
quotes: ['error', 'single', { avoidEscape: true }],
'comma-dangle': ['error', 'always-multiline'],
'no-trailing-spaces': 'error',
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1 }],
'eol-last': ['error', 'always'],
'object-curly-spacing': ['error', 'always'],
'array-bracket-spacing': ['error', 'never'],
'arrow-parens': ['error', 'always'],
'arrow-body-style': ['error', 'as-needed'],
'prefer-const': 'warn',
'no-var': 'error',
'no-console': 'off',
'no-debugger': 'error',
eqeqeq: ['error', 'always'],

// Import rules
"no-restricted-imports": [
"error",
{
patterns: ["./", "../"],
},
],
"import/order": "off", // You can enable this if you add eslint-plugin-import
// Import rules - allow relative imports for components
'no-restricted-imports': 'off',
'import/order': 'off', // You can enable this if you add eslint-plugin-import

// SolidJS specific rules
"solid/components-return-once": "error",
"solid/event-handlers": "error",
"solid/imports": "error",
"solid/jsx-no-duplicate-props": "error",
"solid/jsx-no-script-url": "error",
"solid/jsx-no-undef": "error",
"solid/jsx-uses-vars": "error",
"solid/no-destructure": "error",
"solid/no-innerhtml": "warn",
"solid/no-react-deps": "error",
"solid/no-react-specific-props": "error",
"solid/no-unknown-namespaces": "error",
"solid/prefer-for": "warn", // Warns to use <For> instead of map for components
"solid/prefer-show": "warn", // Warns to use <Show> for conditionals
"solid/reactivity": "error",
"solid/self-closing-comp": "error",
"solid/style-prop": "warn",
'solid/components-return-once': 'error',
'solid/event-handlers': 'error',
'solid/imports': 'error',
'solid/jsx-no-duplicate-props': 'error',
'solid/jsx-no-script-url': 'error',
'solid/jsx-no-undef': 'error',
'solid/jsx-uses-vars': 'error',
'solid/no-destructure': 'error',
'solid/no-innerhtml': 'warn',
'solid/no-react-deps': 'error',
'solid/no-react-specific-props': 'error',
'solid/no-unknown-namespaces': 'error',
'solid/prefer-for': 'warn', // Warns to use <For> instead of map for components
'solid/prefer-show': 'warn', // Warns to use <Show> for conditionals
'solid/reactivity': 'error',
'solid/self-closing-comp': 'error',
'solid/style-prop': 'warn',

// Disabled rules to avoid Prettier conflicts
"max-len": "off",
"no-mixed-spaces-and-tabs": "off",
"no-tabs": "off",
'max-len': 'off',
'no-mixed-spaces-and-tabs': 'off',
'no-tabs': 'off',
},
},
// Prettier config should be last to override formatting rules
Expand Down
Loading