@aristobyte-ui/eslint-config 1.0.8 β 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +90 -50
- package/package.json +18 -10
package/README.md
CHANGED
|
@@ -1,75 +1,115 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@aristobyte-ui/eslint-config`
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://img.shields.io/badge/TypeScript-5.8-blue?style=for-the-badge&logo=typescript&logoColor=white" alt="TypeScript" />
|
|
5
|
+
<img src="https://img.shields.io/badge/ESLint-9.x-red?style=for-the-badge&logo=eslint&logoColor=white" alt="ESLint" />
|
|
6
|
+
<img src="https://img.shields.io/badge/Config-Prettier-1A2C34?style=for-the-badge&logo=prettier&logoColor=F7BA3E" alt="Prettier" />
|
|
7
|
+
<img src="https://img.shields.io/badge/React-Supported-61DAFB?style=for-the-badge&logo=react&logoColor=white" alt="React Support" />
|
|
8
|
+
<img src="https://img.shields.io/badge/Next.js-Supported-000000?style=for-the-badge&logo=nextdotjs&logoColor=white" alt="Next.js Support" />
|
|
9
|
+
<img src="https://img.shields.io/badge/TurboRepo-Optimized-00A3E0?style=for-the-badge&logo=turbo&logoColor=white" alt="TurboRepo" />
|
|
10
|
+
<img src="https://img.shields.io/badge/License-MIT-black?style=for-the-badge&logo=open-source-initiative&logoColor=white" alt="License" />
|
|
11
|
+
<img src="https://img.shields.io/badge/Node-20.17.0+-339933?style=for-the-badge&logo=node.js&logoColor=white" alt="Node.js >=20.17.0" />
|
|
12
|
+
<img src="https://img.shields.io/badge/Yarn-1.22+-2C8EBB?style=for-the-badge&logo=yarn&logoColor=white" alt="Yarn >=1.22" />
|
|
13
|
+
<img src="https://img.shields.io/badge/NPM-10.8+-CB3837?style=for-the-badge&logo=npm&logoColor=white" alt="NPM >=10.8" />
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
Centralized **ESLint configuration presets** for AristoByte UI packages.
|
|
17
|
+
Provides **base**, **React**, and **Next.js** linting standards with TypeScript-first principles.
|
|
18
|
+
|
|
19
|
+
## π¦ Installation
|
|
2
20
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## π§ Overview
|
|
8
|
-
|
|
9
|
-
This package delivers a suite of opinionated ESLint configurations, designed to enforce code quality, consistency, and developer efficiency across the AristoByte ecosystem. Powered by ESLint Flat Config and aligned with monorepo-first tooling like TurboRepo and Prettier, it enables fast, frictionless linting with a single source of truth.
|
|
10
|
-
|
|
11
|
-
---
|
|
21
|
+
```bash
|
|
22
|
+
# Install via Yarn
|
|
23
|
+
yarn add -D @aristobyte-ui/eslint-config
|
|
12
24
|
|
|
13
|
-
|
|
25
|
+
# Or via npm
|
|
26
|
+
npm install -D @aristobyte-ui/eslint-config
|
|
14
27
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
| `@aristobyte-ui/eslint-config/react` | Optimized for internal React component libraries with hooks and JSX best practices. |
|
|
19
|
-
| `@aristobyte-ui/eslint-config/next` | Tailored specifically for Next.js applications, aligned with Nextβs linting expectations. |
|
|
28
|
+
# Or via pnpm
|
|
29
|
+
pnpm add -D @aristobyte-ui/eslint-config
|
|
30
|
+
```
|
|
20
31
|
|
|
21
|
-
|
|
32
|
+
## π Usage
|
|
22
33
|
|
|
23
|
-
|
|
34
|
+
Extend one of the provided configs in your `eslint.config.js` (Flat Config):
|
|
24
35
|
|
|
25
|
-
|
|
36
|
+
**Base (TypeScript + general rules):**
|
|
26
37
|
|
|
27
|
-
```
|
|
28
|
-
|
|
38
|
+
```js
|
|
39
|
+
import { config } from "@aristobyte-ui/eslint-config/base";
|
|
40
|
+
export default config;
|
|
29
41
|
```
|
|
30
42
|
|
|
31
|
-
|
|
43
|
+
**React (includes React + Hooks best practices):**
|
|
32
44
|
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
- `eslint-plugin-react-hooks`
|
|
38
|
-
- `eslint-plugin-turbo`
|
|
39
|
-
- `eslint-plugin-only-warn`
|
|
40
|
-
|
|
41
|
-
### 2. Configure Your ESLint Flat Config (eslint.config.js)
|
|
45
|
+
```js
|
|
46
|
+
import { config } from "@aristobyte-ui/eslint-config/react";
|
|
47
|
+
export default config;
|
|
48
|
+
```
|
|
42
49
|
|
|
43
|
-
|
|
50
|
+
**Next.js (includes React + Next.js rules):**
|
|
44
51
|
|
|
45
52
|
```js
|
|
46
|
-
import
|
|
47
|
-
|
|
53
|
+
import { nextJsConfig } from "@aristobyte-ui/eslint-config/next";
|
|
54
|
+
export default nextJsConfig;
|
|
55
|
+
```
|
|
48
56
|
|
|
49
|
-
|
|
57
|
+
## π Presets Available
|
|
58
|
+
|
|
59
|
+
- `base` β Core TypeScript + Prettier + TurboRepo rules.
|
|
60
|
+
- `react` β Extends base with React + React Hooks recommendations.
|
|
61
|
+
- `next` β Extends base with Next.js & Core Web Vitals rules.
|
|
62
|
+
|
|
63
|
+
## π§ Example in a Package
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"name": "@aristobyte-ui/button",
|
|
68
|
+
"version": "1.0.0",
|
|
69
|
+
"scripts": {
|
|
70
|
+
"lint": "eslint ."
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@aristobyte-ui/eslint-config": "*",
|
|
74
|
+
"eslint": "^9.0.0"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
50
77
|
```
|
|
51
78
|
|
|
52
|
-
|
|
79
|
+
And `eslint.config.js:`
|
|
53
80
|
|
|
54
81
|
```js
|
|
55
|
-
import
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
export default [...base, ...next];
|
|
82
|
+
import { config } from "@aristobyte-ui/eslint-config/react";
|
|
83
|
+
export default config;
|
|
59
84
|
```
|
|
60
85
|
|
|
61
|
-
##
|
|
86
|
+
## π Why This Matters
|
|
87
|
+
|
|
88
|
+
| Feature | Benefit |
|
|
89
|
+
| ----------------------- | ------------------------------------------- |
|
|
90
|
+
| Flat Config (ESLint 9) | Modern, future-proof linting structure |
|
|
91
|
+
| TypeScript support | Type-aware linting for safer codebases |
|
|
92
|
+
| Prettier integration | Automatic formatting alignment |
|
|
93
|
+
| React & Hooks rules | Enforces idiomatic React code |
|
|
94
|
+
| Next.js core-web-vitals | Ensures optimal Next.js app performance |
|
|
95
|
+
| TurboRepo plugin | Catches misconfigured env vars in monorepos |
|
|
96
|
+
|
|
97
|
+
## π Philosophy
|
|
62
98
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
- Flat Config architecture for modern ESLint performance and flexibility.
|
|
66
|
-
- First-class Prettier integration with zero conflicts.
|
|
67
|
-
- TurboRepo-friendly β supports parallelized linting out of the box.
|
|
99
|
+
At **AristoByte**, linting is not just about **style** β itβs about **preventing bugs, scaling teams, and enforcing architectural patterns**.
|
|
100
|
+
This config empowers developers with **out-of-the-box rules** that evolve alongside the ecosystem.
|
|
68
101
|
|
|
69
|
-
##
|
|
102
|
+
## π License
|
|
70
103
|
|
|
71
|
-
|
|
104
|
+
[MIT](./LICENSE) Β© AristoByte
|
|
72
105
|
|
|
73
|
-
|
|
106
|
+
## π‘ Shields Showcase
|
|
74
107
|
|
|
75
|
-
|
|
108
|
+
<p align="center">
|
|
109
|
+
<img src="https://img.shields.io/badge/Consistency-100%25-green?style=for-the-badge&logo=eslint" />
|
|
110
|
+
<img src="https://img.shields.io/badge/Maintained-Active-brightgreen?style=for-the-badge&logo=github" />
|
|
111
|
+
<img src="https://img.shields.io/badge/Prettier-Integrated-ff69b4?style=for-the-badge&logo=prettier" />
|
|
112
|
+
<img src="https://img.shields.io/badge/React-Hooks-optimized?style=for-the-badge&logo=react" />
|
|
113
|
+
<img src="https://img.shields.io/badge/Next.js-Core%20Web%20Vitals-black?style=for-the-badge&logo=nextdotjs" />
|
|
114
|
+
<img src="https://img.shields.io/badge/TurboRepo-Ready-blue?style=for-the-badge&logo=turbo" />
|
|
115
|
+
</p>
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aristobyte-ui/eslint-config",
|
|
3
|
-
"description": "AristoByteUI ESLint
|
|
4
|
-
"version": "1.0.
|
|
3
|
+
"description": "AristoByteUI ESLint configuration presets for TypeScript, React, and Next.js packages. Provides base, React, and Next.js rules optimized for monorepo workflows, Prettier integration, and developer productivity.",
|
|
4
|
+
"version": "1.0.9",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"author": "AristoByte <info@aristobyte.com>",
|
|
10
|
-
"homepage": "https://
|
|
10
|
+
"homepage": "https://www.npmjs.com/package/@aristobyte-ui/eslint-config",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "https://github.com/aristobyte-team/aristobyte-ui.git",
|
|
13
|
+
"url": "git+https://github.com/aristobyte-team/aristobyte-ui.git",
|
|
14
14
|
"directory": "packages/eslint-config"
|
|
15
15
|
},
|
|
16
16
|
"bugs": {
|
|
@@ -23,12 +23,20 @@
|
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
|
25
25
|
"eslint",
|
|
26
|
-
"config",
|
|
26
|
+
"eslint-config",
|
|
27
27
|
"typescript",
|
|
28
|
-
"nextjs",
|
|
29
28
|
"react",
|
|
29
|
+
"nextjs",
|
|
30
|
+
"prettier",
|
|
31
|
+
"linting",
|
|
32
|
+
"flat-config",
|
|
33
|
+
"monorepo",
|
|
34
|
+
"workspace",
|
|
30
35
|
"aristobyte",
|
|
31
|
-
"aristobyte-ui"
|
|
36
|
+
"aristobyte-ui",
|
|
37
|
+
"turbo",
|
|
38
|
+
"code-quality",
|
|
39
|
+
"best-practices"
|
|
32
40
|
],
|
|
33
41
|
"exports": {
|
|
34
42
|
"./base": "./dist/eslint.base.js",
|
|
@@ -38,12 +46,12 @@
|
|
|
38
46
|
"files": [
|
|
39
47
|
"dist"
|
|
40
48
|
],
|
|
41
|
-
"scripts": {
|
|
42
|
-
"build": "tsc --project tsconfig.json"
|
|
43
|
-
},
|
|
44
49
|
"publishConfig": {
|
|
45
50
|
"access": "public"
|
|
46
51
|
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "tsc --project tsconfig.json"
|
|
54
|
+
},
|
|
47
55
|
"dependencies": {
|
|
48
56
|
"@eslint/js": "^9.27.0",
|
|
49
57
|
"@next/eslint-plugin-next": "^15.3.0",
|