open-index/open-npm huggingface dataset:
npm package: @mystaline/eslint-plugin-mysta-code-standard
Description: Custom ESLint plugin for a React+TypeScript component library
Author: Mystaline
Latest version: 1.0.10

# @mystaline/eslint-plugin-mysta-code-standard

Custom ESLint plugin for a React + TypeScript component library.  
Powered by ESLint's [flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new) and aligned with modern frontend standards.

---

## ✨ Features

- ✅ Flat config format (`eslint.config.js`)
- ✅ TypeScript support via `@typescript-eslint`
- ✅ React support including JSX runtime rules
- ✅ JSON file linting
- ✅ Opinionated base rules to enforce code quality and consistency

---

## 📦 Installation

Install the plugin and its peer dependency:

```bash
npm install --save-dev @mystaline/eslint-plugin-mysta-code-standard eslint
```

---

## 🔧 Usage

In your project root, create `eslint.config.js` and apply the shared config:

```js
import mystaConfig from "@mystaline/eslint-plugin-mysta-code-standard";

export default mystaConfig;
```

Then lint your files:

```bash
npx eslint . --ext js,jsx,ts,tsx,json
```

---

## 📁 Files Supported

- JavaScript: `.js`, `.mjs`, `.cjs`
- TypeScript: `.ts`, `.tsx`
- JSON: `.json`

---

## 🧩 Included Plugins

| Plugin                | Purpose                           |
| --------------------- | --------------------------------- |
| `@eslint/js`          | Base JavaScript linting           |
| `@typescript-eslint`  | TypeScript support and rules      |
| `eslint-plugin-react` | React rules + JSX runtime support |
| `@eslint/json`        | Linting JSON files                |

---

## ✅ Enabled Rules (Partial List)

- **no-console** – Disallows all `console.*` usage except `console.error`
- **eqeqeq** – Enforces strict equality (`===`, `!==`)
- **React best practices** – Enforced via `plugin:react/recommended` and `jsx-runtime`
- **TypeScript rules** – From `@typescript-eslint/recommended`
- **JSON linting** – Enabled for `.json` files

You can easily override or extend rules in the last config block of `eslint.config.js`.

---

## 📜 Example ESLint Config File

```js
import mystaConfig from "@mystaline/eslint-plugin-mysta-code-standard";

export default mystaConfig;
```

---

## 🚀 Scripts

| Command           | Description              |
| ----------------- | ------------------------ |
| `npm run lint`    | Run ESLint on test file  |
| `npm run test`    | Lint and run Mocha tests |
| `npm run release` | Run your publish script  |

---

## 👤 Author

**Mystaline**