@noxickon/codex 1.4.0 → 2.0.0

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 CHANGED
@@ -37,7 +37,7 @@ npm install --save-dev \
37
37
  npm install --save-dev \
38
38
  @eslint-react/eslint-plugin \
39
39
  eslint-plugin-better-tailwindcss \
40
- eslint-plugin-react-compiler \
40
+ eslint-plugin-react-hooks \
41
41
  eslint-plugin-react-refresh
42
42
  ```
43
43
 
@@ -68,7 +68,7 @@ npm install --save-dev \
68
68
  prettier-plugin-tailwindcss \
69
69
  @eslint-react/eslint-plugin \
70
70
  eslint-plugin-better-tailwindcss \
71
- eslint-plugin-react-compiler \
71
+ eslint-plugin-react-hooks \
72
72
  eslint-plugin-react-refresh
73
73
  ```
74
74
 
@@ -120,6 +120,26 @@ export default createReactConfig({
120
120
  });
121
121
  ```
122
122
 
123
+ ##### Blank-line spacing (CSS / HTML):
124
+
125
+ The `@noxickon/blank-line-spacing` rule enforces direction-aware blank lines between statements. It is already included in the base, React, and Node configs for `.ts` / `.tsx` / `.js` / `.jsx` files — no setup needed.
126
+
127
+ For CSS and HTML, add the matching configs. Each requires its optional peer dependency (`@eslint/css` and `@html-eslint/parser` respectively):
128
+
129
+ ###### eslint.config.js
130
+
131
+ ```
132
+ import { createReactConfig } from '@noxickon/codex/eslint/react';
133
+ import { createCssConfig } from '@noxickon/codex/eslint/css';
134
+ import { createHtmlConfig } from '@noxickon/codex/eslint/html';
135
+
136
+ export default [
137
+ ...createReactConfig(),
138
+ ...createCssConfig(),
139
+ ...createHtmlConfig(),
140
+ ];
141
+ ```
142
+
123
143
  ### Prettier
124
144
 
125
145
  ##### Basic usage:
@@ -174,12 +194,13 @@ export default createPrettierConfig({
174
194
  - Perfectionist (Auto-sorting)
175
195
  - Unused Imports
176
196
  - Sort Destructure Keys
197
+ - Codex (`@noxickon/blank-line-spacing` — direction-aware blank-line spacing; CSS/HTML variants opt-in)
177
198
  - ESLint Config Prettier (Disables ESLint rules that conflict with Prettier)
178
199
 
179
200
  **React (additional):**
180
201
 
181
- - ESLint React (Rules of Hooks, JSX, DOM, RSC, Web API leak detection)
182
- - React Compiler
202
+ - ESLint React (JSX, DOM, RSC, Web API leak detection)
203
+ - React Hooks (Rules of Hooks, exhaustive-deps, React Compiler rules — `recommended-latest`)
183
204
  - React Refresh (Vite)
184
205
  - Better Tailwind CSS
185
206
 
@@ -120,12 +120,22 @@ export function createBaseConfig(options = {}) {
120
120
  // Too opinionated - disabled:
121
121
  'unicorn/no-null': 'off',
122
122
  'unicorn/no-array-reduce': 'off',
123
- 'unicorn/no-array-for-each': 'off',
123
+ 'unicorn/no-for-each': 'off',
124
124
  'unicorn/prefer-top-level-await': 'off',
125
125
  'unicorn/filename-case': 'off',
126
126
  'unicorn/switch-case-braces': 'off',
127
127
  'unicorn/no-negated-condition': 'off',
128
128
  'unicorn/prefer-ternary': 'off',
129
+ 'unicorn/no-negated-comparison': 'off',
130
+ 'unicorn/consistent-function-style': 'off',
131
+ 'unicorn/comment-content': 'off',
132
+ 'unicorn/no-asterisk-prefix-in-documentation-comments': 'off',
133
+ 'unicorn/no-top-level-side-effects': 'off',
134
+
135
+ // Bleeding-edge APIs - insufficient runtime support:
136
+ 'unicorn/prefer-temporal': 'off',
137
+ 'unicorn/prefer-dispose': 'off',
138
+ 'unicorn/prefer-uint8array-base64': 'off',
129
139
 
130
140
  // Modern best practices - as warnings:
131
141
  'unicorn/prefer-query-selector': 'warn',
@@ -8,7 +8,7 @@
8
8
 
9
9
  import eslintReact from '@eslint-react/eslint-plugin';
10
10
  import perfectionist from 'eslint-plugin-perfectionist';
11
- import reactCompiler from 'eslint-plugin-react-compiler';
11
+ import reactHooks from 'eslint-plugin-react-hooks';
12
12
  import { reactRefresh } from 'eslint-plugin-react-refresh';
13
13
 
14
14
  import { createBaseConfig } from './base.config.js';
@@ -21,13 +21,13 @@ export function createReactConfig(options = {}) {
21
21
  ...eslintReact.configs['recommended-typescript'],
22
22
  plugins: {
23
23
  ...eslintReact.configs['recommended-typescript'].plugins,
24
+ ...reactHooks.configs.flat['recommended-latest'].plugins,
24
25
  perfectionist,
25
- 'react-compiler': reactCompiler,
26
26
  'react-refresh': reactRefresh.plugin,
27
27
  },
28
28
  rules: {
29
29
  ...eslintReact.configs['recommended-typescript'].rules,
30
- 'react-compiler/react-compiler': 'error',
30
+ ...reactHooks.configs.flat['recommended-latest'].rules,
31
31
  'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
32
32
 
33
33
  // Perfectionist - JSX Props sorting
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@noxickon/codex",
3
- "version": "1.4.0",
3
+ "version": "2.0.0",
4
4
  "author": "noxickon",
5
5
  "license": "MIT",
6
6
  "description": "Shared ESLint & Prettier configuration for noxickon projects",
7
7
  "type": "module",
8
8
  "engines": {
9
- "node": ">=20.19.0"
9
+ "node": ">=22.0.0"
10
10
  },
11
11
  "scripts": {
12
12
  "test": "node --test \"eslint/**/*.test.js\""
@@ -14,6 +14,7 @@
14
14
  "devDependencies": {
15
15
  "@eslint/css": ">=0.12.0",
16
16
  "@html-eslint/parser": ">=0.62.0",
17
+ "eslint-plugin-react-hooks": ">=6.0.0",
17
18
  "vue-eslint-parser": ">=10.0.0"
18
19
  },
19
20
  "exports": {
@@ -35,27 +36,27 @@
35
36
  "config"
36
37
  ],
37
38
  "peerDependencies": {
39
+ "@eslint-react/eslint-plugin": ">=4.0.0",
40
+ "@eslint/css": ">=0.12.0",
38
41
  "@eslint/js": ">=10.0.0",
39
- "eslint": ">=10.0.0",
42
+ "@html-eslint/parser": ">=0.62.0",
43
+ "eslint": ">=10.4.0",
40
44
  "eslint-config-prettier": ">=10.0.0",
41
45
  "eslint-plugin-better-tailwindcss": ">=4.0.0",
42
46
  "eslint-plugin-n": ">=17.0.0",
43
47
  "eslint-plugin-perfectionist": ">=5.6.0",
44
- "eslint-plugin-regexp": ">=3.0.0",
45
- "@eslint-react/eslint-plugin": ">=4.0.0",
46
- "eslint-plugin-react-compiler": "*",
48
+ "eslint-plugin-react-hooks": ">=6.0.0",
47
49
  "eslint-plugin-react-refresh": ">=0.5.0",
50
+ "eslint-plugin-regexp": ">=3.0.0",
48
51
  "eslint-plugin-sonarjs": ">=4.0.0",
49
52
  "eslint-plugin-sort-destructure-keys": ">=3.0.0",
50
- "eslint-plugin-unicorn": ">=63.0.0",
53
+ "eslint-plugin-unicorn": ">=66.0.0",
51
54
  "eslint-plugin-unused-imports": ">=4.0.0",
52
55
  "globals": ">=17.1.0",
53
56
  "prettier": ">=3.8.1",
54
57
  "prettier-plugin-tailwindcss": ">=0.7.0",
55
58
  "typescript-eslint": ">=8.57.0",
56
- "vue-eslint-parser": ">=10.0.0",
57
- "@html-eslint/parser": ">=0.62.0",
58
- "@eslint/css": ">=0.12.0"
59
+ "vue-eslint-parser": ">=10.0.0"
59
60
  },
60
61
  "peerDependenciesMeta": {
61
62
  "eslint-plugin-better-tailwindcss": {
@@ -76,7 +77,7 @@
76
77
  "@eslint-react/eslint-plugin": {
77
78
  "optional": true
78
79
  },
79
- "eslint-plugin-react-compiler": {
80
+ "eslint-plugin-react-hooks": {
80
81
  "optional": true
81
82
  },
82
83
  "eslint-plugin-react-refresh": {