{"id":20294204,"url":"https://github.com/teambit/oxlint-node","last_synced_at":"2025-04-11T11:42:50.821Z","repository":{"id":253623698,"uuid":"844050914","full_name":"teambit/oxlint-node","owner":"teambit","description":"A Node.js API wrapper for oxlint","archived":false,"fork":false,"pushed_at":"2024-10-01T14:49:30.000Z","size":1719,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T08:03:21.245Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teambit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-18T08:20:10.000Z","updated_at":"2024-10-01T22:55:11.000Z","dependencies_parsed_at":"2024-08-20T14:03:07.066Z","dependency_job_id":"d609cf69-dd7b-4084-9613-3e859d56716d","html_url":"https://github.com/teambit/oxlint-node","commit_stats":null,"previous_names":["teambit/oxlint-node"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambit%2Foxlint-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambit%2Foxlint-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambit%2Foxlint-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambit%2Foxlint-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teambit","download_url":"https://codeload.github.com/teambit/oxlint-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248385968,"owners_count":21094982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-14T15:28:14.085Z","updated_at":"2025-04-11T11:42:50.803Z","avatar_url":"https://github.com/teambit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oxlint Node.js API\n\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![NPM Version](https://img.shields.io/npm/v/@teambit/oxc.linter.oxlint-node)](https://www.npmjs.com/package/@teambit/oxc.linter.oxlint-node)\n\nA Node.js API wrapper for the [Oxlint](https://oxc.rs/docs/guide/usage/linter) project, a fast and reliable Rust-based linter. This repository also includes various examples and Bit components that demonstrate how to integrate and use Oxlint in real-world applications.\n\n## ⚠️ Beta Status\n\n**Note**: This project is currently in **beta**. Users should expect potential breaking changes in future releases due to ongoing redesigns of the Node.js API or changes in the Oxlint project and CLI itself.\n\n## Table of Contents\n\n- [Oxlint Node.js API](#oxlint-nodejs-api)\n  - [⚠️ Beta Status](#️-beta-status)\n  - [Table of Contents](#table-of-contents)\n  - [Features](#features)\n  - [Project Structure](#project-structure)\n    - [Detailed Structure:](#detailed-structure)\n  - [Installation](#installation)\n    - [Using `pnpm`](#using-pnpm)\n    - [Using `npm`](#using-npm)\n    - [Using `yarn`](#using-yarn)\n  - [Usage](#usage)\n    - [Simple Usage](#simple-usage)\n    - [Advanced Usage](#advanced-usage)\n  - [Documentation](#documentation)\n    - [Other Related Components:](#other-related-components)\n  - [Changelog and Version History](#changelog-and-version-history)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n## Features\n\n- 🚀 **Fast and efficient**: Leverages the performance of the Rust-based Oxlint linter.\n- 🛠 **Easy integration**: Simple API for Node.js applications.\n- 📦 **Bit Integration**: Examples of integrating Oxlint with Bit for component-driven development.\n- ✅ **Cross-platform**: Compatible with major operating systems.\n- 💻 **Fully typed**: Provides TypeScript support out-of-the-box, ensuring type safety and better development experience.\n\n## Project Structure\n\nThe repository is organized as follows:\n\n```plaintext\noxc/\n  ├── linter/\n  │   ├── oxlint-node/        # Main folder of the project - the Node.js wrapper\n  │   └── oxlint-linter/      # A Bit linter that utilizes oxlint-node to build a Bit linter (also serves as a consumer example)\n  └── examples/\n      └── envs/\n          └── oxlint-env/     # A Bit environment that uses oxlint-linter, enabling linting on Bit components\ntesting-components/           # Simple (local only) Bit components that use the oxlint-env, \n                              # demonstrating linting through the `bit lint` or `bit build` command\n```\n\n### Detailed Structure:\n\n- **`oxc/linter/oxlint-node/`**:\n  - This is the core of the project, containing the Node.js wrapper for Oxlint, allowing Node.js applications to leverage Oxlint's linting capabilities.\n\n- **`oxc/linter/oxlint-linter/`**:\n  - This folder includes a Bit linter built on top of `oxlint-node`. It serves as both a utility and an example for how to integrate Oxlint with Bit for component-based development.\n\n- **`oxc/examples/envs/oxlint-env/`**:\n  - An environment setup that uses `oxlint-linter`, allowing developers to run linting on Bit components within their projects.\n\n- **`testing-components/`**:\n  - A collection of simple Bit components intended for local testing. These components use the `oxlint-env`, providing practical examples of running the linter via `bit lint` or `bit build`.\n\n## Installation\n\nTo install the Oxlint Node.js API, you can use `pnpm`, `npm`, or `yarn`.\n\n### Using `pnpm`\n\n```bash\npnpm add @teambit/oxc.linter.oxlint-node\n```\n\n### Using `npm`\n\n```bash\nnpm install @teambit/oxc.linter.oxlint-node\n```\n\n### Using `yarn`\n\n```bash\nyarn add @teambit/oxc.linter.oxlint-node\n```\n\n## Usage\n\n### Simple Usage\n\n```javascript\nimport { OxlintNode } from '@teambit/oxc.linter.oxlint-node';\n\nconst oxlintNode = OxlintNode.create({});\nconst result = await oxlintNode.run(['paths']);\nconsole.log(result);\n```\n\n### Advanced Usage\n\n```javascript\nconst oxlintNode = OxlintNode.create({\n  binPath: 'path to oxlint binary',\n  formats: ['json', 'default'],\n  configPath: 'path to oxlint config file',\n  tsconfigPath: 'path to tsconfig',\n  pluginsFlags: {\n    'plugin-name': true,\n  },\n  rulesFlags: [{\n    name: 'rule-name',\n    severity: 'warn',\n  }],\n  fixesFlags: {\n    all: true,\n  }\n});\n```\n\n## Documentation\n\nFor more comprehensive documentation, including the full API reference, please visit the component page on Bit Cloud:\n\n- **Oxlint Node.js API Component**: [bit.cloud/teambit/oxc/linter/oxlint-node](https://bit.cloud/teambit/oxc/linter/oxlint-node)\n- **Full API Reference**: [bit.cloud/teambit/oxc/linter/oxlint-node/~api-reference](https://bit.cloud/teambit/oxc/linter/oxlint-node/~api-reference)\n\n### Other Related Components:\n\n- **Oxlint Env Example**: [bit.cloud/teambit/oxc/examples/envs/oxlint-env](https://bit.cloud/teambit/oxc/examples/envs/oxlint-env)\n- **Oxlint Linter**: [bit.cloud/teambit/oxc/linter/oxlint-linter](https://bit.cloud/teambit/oxc/linter/oxlint-linter)\n\n## Changelog and Version History\n\nChangelog and version history for this project are managed through the `oxlint-node` component's version history on Bit Cloud. You can view the full changelog at the following URL:\n\n- **Changelog**: [bit.cloud/teambit/oxc/linter/oxlint-node/~changelog](https://bit.cloud/teambit/oxc/linter/oxlint-node/~changelog)\n\n## Contributing\n\nWe welcome contributions! Please read our [Contributing Guide](CONTRIBUTING.md) to get started.\n\n## License\n\nThis project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteambit%2Foxlint-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteambit%2Foxlint-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteambit%2Foxlint-node/lists"}