{"id":48772601,"url":"https://github.com/technance-foundation/code-style","last_synced_at":"2026-04-13T11:07:16.184Z","repository":{"id":288228619,"uuid":"940111147","full_name":"technance-foundation/code-style","owner":"technance-foundation","description":"📏 Technance code-style: Unified ESLint \u0026 Prettier configs for React, Next.js \u0026 Nest.js and Node projects","archived":false,"fork":false,"pushed_at":"2025-11-05T14:21:12.000Z","size":386,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-11-05T14:25:56.777Z","etag":null,"topics":["backend","code-style","eslint","formatter","frontend","linter","prettier","tooling"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/technance-foundation.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-27T16:24:50.000Z","updated_at":"2025-09-27T15:19:46.000Z","dependencies_parsed_at":"2025-05-09T13:06:19.505Z","dependency_job_id":"b6311d01-1cb2-43c3-8988-db3f7296ca2e","html_url":"https://github.com/technance-foundation/code-style","commit_stats":null,"previous_names":["invexa-foundation/code-style","technance-foundation/code-style"],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/technance-foundation/code-style","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technance-foundation%2Fcode-style","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technance-foundation%2Fcode-style/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technance-foundation%2Fcode-style/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technance-foundation%2Fcode-style/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/technance-foundation","download_url":"https://codeload.github.com/technance-foundation/code-style/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technance-foundation%2Fcode-style/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31749831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","code-style","eslint","formatter","frontend","linter","prettier","tooling"],"created_at":"2026-04-13T11:07:16.113Z","updated_at":"2026-04-13T11:07:16.175Z","avatar_url":"https://github.com/technance-foundation.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@technance/code-style`\n\n`@technance/code-style` provides standardized ESLint and Prettier configurations to help enforce a consistent code style across your projects. Whether you're building Next.js applications, general JavaScript/TypeScript libraries, React apps—or even using Tailwind CSS—this package offers pre-configured setups that you can extend and customize.\n\n## Installation\n\nInstall the package as a development dependency using pnpm, npm, or yarn:\n\n```bash\npnpm add @technance/code-style -D\n```\n\n```bash\nnpm install --save-dev @technance/code-style\n```\n\n```bash\nyarn add -D @technance/code-style\n```\n\n## ESLint Configurations\n\nThe package includes several ESLint configuration presets. Choose the one that best fits your project type, then extend or override rules as needed.\n\n### Next.js Apps\n\nFor Next.js projects, use the `eslint.next` preset. For example:\n\n```js\n// eslint.config.mjs\nimport { eslint } from \"@technance/code-style\";\n\n/** @type {import('eslint').Linter.Config[]} */\nexport default [\n    ...eslint.next,\n    {\n        rules: {\n            // Extend or override...\n        },\n    },\n];\n```\n\n### React Apps or React Libraries\n\nFor React projects, use the `eslint.react` preset:\n\n```js\n// eslint.config.mjs\nimport { eslint } from \"@technance/code-style\";\n\n/** @type {import('eslint').Linter.Config[]} */\nexport default [\n    ...eslint.react,\n    {\n        rules: {\n            // Extend or override...\n        },\n    },\n];\n```\n\n### General JavaScript/TypeScript Libraries\n\nFor libraries or projects that do not use Next.js or React, use the `eslint.general` preset:\n\n```js\n// eslint.config.mjs\nimport { eslint } from \"@technance/code-style\";\n\n/** @type {import('eslint').Linter.Config[]} */\nexport default [\n    ...eslint.general,\n    {\n        rules: {\n            // Extend or override...\n        },\n    },\n];\n```\n\n### Nest.js (Backend Projects)\n\nFor Nest.js backend projects, use the `eslint.nest` preset. For example:\n\n```js\n// eslint.config.mjs\nimport { eslint } from \"@technance/code-style\";\n\n/** @type {import(\"typescript-eslint\").ConfigArray} */\nexport default [\n    {\n        ignores: [\"**/eslint.config.mjs\"],\n    },\n    ...eslint.nest,\n    {\n        rules: {\n            // Extend or override...\n        },\n    },\n];\n```\n\n### Expo (Mobile Applications)\n\nFor Expo (React Native) projects, use the `eslint.expo` preset. For example:\n\n```js\n// eslint.config.mjs\nimport { eslint } from \"@technance/code-style\";\n\n/** @type {import(\"eslint\").Linter.Config[]} */\nexport default [\n    ...eslint.expo,\n    {\n        rules: {\n            // Extend or override...\n        },\n    },\n];\n```\n\n## Prettier Configurations\n\n`@technance/code-style` also offers Prettier configurations to keep your code formatting consistent. There are two presets available: one for general projects and one for Tailwind CSS projects.\n\n### Frontend App Using Tailwind CSS\n\nIf your frontend project uses Tailwind CSS, use the Tailwind-specific Prettier configuration. First, install the required peer dependency:\n\n```bash\npnpm add prettier-plugin-tailwindcss -D\n```\n\n```bash\nnpm install --save-dev prettier-plugin-tailwindcss\n```\n\n```bash\nyarn add -D prettier-plugin-tailwindcss\n```\n\nThen create a file named `prettier.config.cjs` with the following content:\n\n```js\n// prettier.config.cjs\nconst codeStyle = require(\"@technance/code-style\");\n\n/** @type {import('@technance/code-style/types').PrettierTailwindOptions} */\nconst config = {\n    ...codeStyle.prettier.tailwind,\n    tailwindFunctions: [\"cn\", \"cva\", \"tv\", \"clsx\"], // Or other functions that compose tailwind classes\n};\n\nmodule.exports = config;\n```\n\n### General Prettier Config\n\nFor projects that do not use Tailwind CSS (such as backend projects or standard frontend apps), use the general Prettier configuration:\n\n```js\n// prettier.config.cjs\nconst codeStyle = require(\"@technance/code-style\");\n\n/** @type {import('@technance/code-style/types').PrettierGeneralOptions} */\nconst config = {\n    ...codeStyle.prettier.general,\n};\n\nmodule.exports = config;\n```\n\n## Biome Configuration\n\n`@technance/code-style` provides a [Biome](https://biomejs.dev/) configuration for ultra-fast linting and formatting. Biome is a performant alternative to ESLint and Prettier, written in Rust.\n\n### Installation\n\nFirst, install Biome as a development dependency:\n\n```bash\npnpm add @biomejs/biome -D\n```\n\n```bash\nnpm install --save-dev @biomejs/biome\n```\n\n```bash\nyarn add -D @biomejs/biome\n```\n\n### Setup\n\nCreate a `biome.json` or `biome.jsonc` file in your project root that extends the shared configuration:\n\n```json\n{\n    \"extends\": [\"@technance/code-style/biome\"],\n    \"linter\": {\n        \"enabled\": true\n    },\n    \"formatter\": {\n        \"enabled\": true\n    }\n}\n```\n\n### Configuration Details\n\nThe shared Biome configuration includes:\n\n- **Formatter**: 4-space indentation, double quotes, 130 character line width\n- **Linter**: Enabled with recommended rules for React and general projects\n- **Import Organization**: Automatic import sorting with logical grouping\n- **Test Files**: Linting disabled for test files (`.test.ts`, `.spec.ts`, etc.)\n- **VCS Integration**: Git-aware with `.gitignore` support\n\nYou can override any of these settings in your local `biome.json` file as needed.\n\n## Customization\n\nYou can further customize ESLint, Prettier, and Biome configurations by merging or overriding specific rules. This flexibility allows you to adhere to your coding conventions while benefiting from the solid defaults provided by `@technance/code-style`.\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnance-foundation%2Fcode-style","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnance-foundation%2Fcode-style","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnance-foundation%2Fcode-style/lists"}