@mystaline/eslint-plugin-mysta-code-standard
v1.0.10
Published
Custom ESLint plugin for a React+TypeScript component library
Readme
@mystaline/eslint-plugin-mysta-code-standard
Custom ESLint plugin for a React + TypeScript component library.
Powered by ESLint's flat config 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:
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:
import mystaConfig from "@mystaline/eslint-plugin-mysta-code-standard";
export default mystaConfig;Then lint your files:
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 exceptconsole.error - eqeqeq – Enforces strict equality (
===,!==) - React best practices – Enforced via
plugin:react/recommendedandjsx-runtime - TypeScript rules – From
@typescript-eslint/recommended - JSON linting – Enabled for
.jsonfiles
You can easily override or extend rules in the last config block of eslint.config.js.
📜 Example ESLint Config File
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
