From 57289326db5aecc836b934b31885af92abdf0e22 Mon Sep 17 00:00:00 2001 From: Aslam Date: Sun, 8 Sep 2024 06:29:55 +0700 Subject: [PATCH] chore: project config and docs (#152) * refactor(eslint): improve config readability and structure * chore(tsconfig): group options and add explanatory comments * docs(readme): restructure for clearer setup and contribution guide --- eslint.config.js | 24 +++++++++++----------- readme.md | 44 +++++++++++++++++++++++++++------------- tsconfig.json | 53 +++++++++++++++++++++++++++++++----------------- 3 files changed, 76 insertions(+), 45 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 22c9826a..c74755ce 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -3,22 +3,22 @@ import js from "@eslint/js" const compat = new FlatCompat() +const typescriptConfig = compat.extends( + "eslint:recommended", + "plugin:@typescript-eslint/recommended-type-checked", + "plugin:@typescript-eslint/stylistic-type-checked", + "prettier" +) + +const javascriptConfig = js.configs.recommended + export default [ { - ...compat - .extends( - "eslint:recommended", - "plugin:@typescript-eslint/recommended-type-checked", - "plugin:@typescript-eslint/stylistic-type-checked", - "prettier" - ) - .map(c => ({ - ...c, - files: ["**/*.{ts,tsx,mts}"] - })) + files: ["**/*.{ts,tsx,mts}"], + ...typescriptConfig }, { files: ["**/*.{js,jsx,cjs,mjs}"], - ...js.configs.recommended + ...javascriptConfig } ] diff --git a/readme.md b/readme.md index 04ee1085..9483e4d5 100644 --- a/readme.md +++ b/readme.md @@ -1,33 +1,49 @@ -# [Learn-Anything.xyz](https://learn-anything.xyz) +# Learn-Anything.xyz + +[![X](https://img.shields.io/badge/learnanything-100000?logo=X&color=black)](https://x.com/learnanything_) + +[Learn-Anything.xyz](https://learn-anything.xyz) is an open-source learning platform. + +Visit the website at: https://learn-anything.xyz ## Setup -Using [Bun](https://bun.sh). +[Bun](https://bun.sh) is required to run this project. -``` +Install dependencies: + +```bash bun i ``` -[Jazz](https://jazz.tools/) is used for all global/local state management. +## Run Website -## Run website +To start the website locally: -``` +```bash bun web ``` -## Contribute +## Development -Currently things are unstable but will improve. +- [Jazz](https://jazz.tools/) is used for all global/local state management. +- The project is currently in an unstable state but actively improving. -If you want to help contribute to code, ask for help on [Discord](https://discord.gg/bxtD8x6aNF)'s `#dev` channel. You will be onboarded and unblocked fast. +## Contributing -Can always submit draft PRs with good ideas/fixes. We will help along the way to make it merge ready. +We welcome contributions! Here's how you can get involved: -## Chat +1. Join our [Discord](https://discord.gg/bxtD8x6aNF) and ask for help in the `#dev` channel. +2. Submit draft PRs with your ideas or fixes. We'll guide you through the process. -Community chat in [Discord server](https://discord.gg/bxtD8x6aNF). +## Community -Internal dev chat in Telegram (can email `join@learn-anything.xyz` to join core team). We will reach out with offer to join if you contribute to repo in form of PRs too. +- **Public Chat**: Join our [Discord server](https://discord.gg/bxtD8x6aNF). +- **Internal Dev Chat**: Available on Telegram. + - Email `join@learn-anything.xyz` to join the core team. + - Active contributors may receive invitations to join. -[![X](https://img.shields.io/badge/learnanything-100000?logo=X&color=black)](https://x.com/learnanything_) +## Notes + +- The project is in active development. Expect frequent changes. +- We prioritize quick onboarding and unblocking of contributors. diff --git a/tsconfig.json b/tsconfig.json index 1bb3943b..ba35efc4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,29 +1,44 @@ { "compilerOptions": { + // Project Structure "rootDirs": [".", ".next-types"], - "target": "esnext", - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], "baseUrl": ".", "paths": { "@/*": ["./*"] }, - "types": ["bun-types"] + + // Module Settings + "target": "esnext", + "module": "esnext", + "moduleResolution": "bundler", + "esModuleInterop": true, + "resolveJsonModule": true, + + // Compilation Behavior + "noEmit": true, + "incremental": true, + "isolatedModules": true, + + // Type Checking + "strict": true, + "skipLibCheck": true, + + // JavaScript Support + "allowJs": true, + + // React Support + "jsx": "preserve", + + // Libraries and Types + "lib": ["dom", "dom.iterable", "esnext"], + "types": ["bun-types"], + + // Plugins + "plugins": [ + { + "name": "next" + } + ] }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "**/*.(mts|ts)"], "exclude": ["node_modules"]