mikey-pro 10.3.3 → 10.3.7
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 +22 -1
- package/eslint-config/base-config.js +15 -4
- package/eslint-config/overrides.js +46 -4
- package/package.json +5 -3
- package/stylelint-config/index.js +14 -5
- package/eslint-config/LICENSE +0 -21
- package/eslint-config/README.md +0 -34
- package/prettier-config/LICENSE +0 -21
- package/prettier-config/README.md +0 -32
- package/stylelint-config/LICENSE +0 -21
- package/stylelint-config/README.md +0 -32
package/README.md
CHANGED
|
@@ -36,12 +36,33 @@ export { default } from 'mikey-pro';
|
|
|
36
36
|
}
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
Or as standalone config files, using the same subpaths:
|
|
40
|
+
|
|
41
|
+
**prettier.config.js**
|
|
42
|
+
|
|
43
|
+
```js
|
|
44
|
+
export { default } from 'mikey-pro/prettier';
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**stylelint.config.js**
|
|
48
|
+
|
|
49
|
+
```js
|
|
50
|
+
export { default } from 'mikey-pro/stylelint';
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
> Import the `mikey-pro/prettier` and `mikey-pro/stylelint` subpaths, not
|
|
54
|
+
> `@mikey-pro/prettier-config` / `@mikey-pro/stylelint-config`. Those standalone
|
|
55
|
+
> packages are for projects that want only that one config and are not installed
|
|
56
|
+
> by the command above, so importing them from a shim fails with
|
|
57
|
+
> `ERR_MODULE_NOT_FOUND`.
|
|
58
|
+
|
|
39
59
|
## What's Included
|
|
40
60
|
|
|
41
61
|
- **ESLint 10** flat config with 25+ plugins — code quality, security, imports, TypeScript, formatting
|
|
42
62
|
- **Prettier** config — consistent formatting across JS, TS, JSON, CSS, HTML, Markdown, YAML
|
|
43
63
|
- **Stylelint** config — CSS/SCSS best practices, property ordering, selector limits
|
|
44
|
-
- **
|
|
64
|
+
- **Targeted escapes** — `// eslint-disable` comments are allowed
|
|
65
|
+
(`noInlineConfig: false`) for genuine edge cases, and unused ones are reported
|
|
45
66
|
|
|
46
67
|
## Subpath Exports
|
|
47
68
|
|
|
@@ -63,7 +63,7 @@ export const globalPlugins = {
|
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
export const baseConfig = {
|
|
66
|
-
files: ['**/*.{js,jsx,ts,tsx,mjs,cjs}'],
|
|
66
|
+
files: ['**/*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}'],
|
|
67
67
|
languageOptions: {
|
|
68
68
|
ecmaVersion: 'latest',
|
|
69
69
|
globals: {
|
|
@@ -117,9 +117,19 @@ export const baseConfig = {
|
|
|
117
117
|
'error',
|
|
118
118
|
{
|
|
119
119
|
devDependencies: [
|
|
120
|
-
'**/*.test.{js,ts}',
|
|
121
|
-
'
|
|
120
|
+
'**/*.{test,spec}.{js,jsx,mjs,cjs,ts,tsx,mts,cts}',
|
|
121
|
+
'**/__tests__/**',
|
|
122
|
+
'**/__mocks__/**',
|
|
122
123
|
'**/test/**',
|
|
124
|
+
'**/tests/**',
|
|
125
|
+
'**/{test,vitest,jest}.setup.*',
|
|
126
|
+
'**/setupTests.*',
|
|
127
|
+
'**/testSetup.*',
|
|
128
|
+
'**/vitest.config.*',
|
|
129
|
+
'**/vite.config.*',
|
|
130
|
+
'**/jest.config.*',
|
|
131
|
+
'**/playwright.config.*',
|
|
132
|
+
'**/cypress.config.*',
|
|
123
133
|
],
|
|
124
134
|
},
|
|
125
135
|
],
|
|
@@ -381,7 +391,8 @@ export const baseConfig = {
|
|
|
381
391
|
'sort-imports': 'off',
|
|
382
392
|
|
|
383
393
|
'sort-vars': 'warn',
|
|
384
|
-
|
|
394
|
+
// markers: ['/'] exempts TypeScript triple-slash directives (`/// <reference />`)
|
|
395
|
+
'spaced-comment': ['warn', 'always', { markers: ['/'] }],
|
|
385
396
|
strict: ['error', 'never'],
|
|
386
397
|
'symbol-description': 'error',
|
|
387
398
|
|
|
@@ -17,7 +17,7 @@ import * as yamlParser from 'yaml-eslint-parser';
|
|
|
17
17
|
|
|
18
18
|
// TypeScript configuration
|
|
19
19
|
export const ts = {
|
|
20
|
-
files: ['**/*.ts', '**/*.tsx'],
|
|
20
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'],
|
|
21
21
|
languageOptions: {
|
|
22
22
|
ecmaVersion: 'latest',
|
|
23
23
|
parser: tsParser,
|
|
@@ -195,10 +195,20 @@ export const ts = {
|
|
|
195
195
|
'@typescript-eslint/switch-exhaustiveness-check': 'error',
|
|
196
196
|
'@typescript-eslint/unbound-method': 'off',
|
|
197
197
|
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'off',
|
|
198
|
+
// Override base config's babel parser for TypeScript files
|
|
199
|
+
'prettier/prettier': [
|
|
200
|
+
'warn',
|
|
201
|
+
{
|
|
202
|
+
endOfLine: 'lf',
|
|
203
|
+
parser: 'typescript',
|
|
204
|
+
singleQuote: true,
|
|
205
|
+
trailingComma: 'all',
|
|
206
|
+
},
|
|
207
|
+
],
|
|
198
208
|
},
|
|
199
209
|
settings: {
|
|
200
210
|
'import-x/parsers': {
|
|
201
|
-
'@typescript-eslint/parser': ['.ts', '.tsx', '.d.ts'],
|
|
211
|
+
'@typescript-eslint/parser': ['.ts', '.tsx', '.mts', '.cts', '.d.ts'],
|
|
202
212
|
},
|
|
203
213
|
'import-x/resolver': {
|
|
204
214
|
typescript: { alwaysTryTypes: true },
|
|
@@ -389,7 +399,11 @@ export const json5 = {
|
|
|
389
399
|
|
|
390
400
|
// Jest JavaScript files
|
|
391
401
|
export const jestJs = {
|
|
392
|
-
files: [
|
|
402
|
+
files: [
|
|
403
|
+
'**/*.{test,spec}.{js,jsx,mjs,cjs}',
|
|
404
|
+
'**/__tests__/**/*.{js,jsx,mjs,cjs}',
|
|
405
|
+
'**/__mocks__/**/*.{js,jsx,mjs,cjs}',
|
|
406
|
+
],
|
|
393
407
|
languageOptions: {
|
|
394
408
|
globals: { jest: true },
|
|
395
409
|
},
|
|
@@ -432,14 +446,36 @@ export const jestJs = {
|
|
|
432
446
|
'unicorn/no-array-callback-reference': 'off',
|
|
433
447
|
'unicorn/prevent-abbreviations': ['warn', { ignore: [/e2e/] }],
|
|
434
448
|
},
|
|
449
|
+
settings: {
|
|
450
|
+
jest: {
|
|
451
|
+
// Recognize Vitest's import { describe, it, expect } from 'vitest' as test globals
|
|
452
|
+
globalPackage: 'vitest',
|
|
453
|
+
},
|
|
454
|
+
},
|
|
435
455
|
};
|
|
436
456
|
|
|
437
457
|
// Jest TypeScript files
|
|
438
458
|
export const jestTs = {
|
|
439
|
-
files: [
|
|
459
|
+
files: [
|
|
460
|
+
'**/*.{test,spec}.{ts,tsx,mts,cts}',
|
|
461
|
+
'**/__tests__/**/*.{ts,tsx,mts,cts}',
|
|
462
|
+
'**/__mocks__/**/*.{ts,tsx,mts,cts}',
|
|
463
|
+
],
|
|
440
464
|
languageOptions: {
|
|
441
465
|
globals: { jest: true },
|
|
442
466
|
parser: tsParser,
|
|
467
|
+
// Preserve the `ts` override's JSX + type-aware parserOptions (overrides.js:20-29).
|
|
468
|
+
// Flat config merges languageOptions per matching block in array order; this
|
|
469
|
+
// block matches after `ts`, and without an explicit parserOptions here a naive
|
|
470
|
+
// merge could drop JSX support for `.test.tsx`/`.spec.tsx` files. ESLint 10's
|
|
471
|
+
// languageOptions merge actually preserves keys the later block omits, but this
|
|
472
|
+
// is pinned explicitly so the behavior doesn't silently depend on merge internals.
|
|
473
|
+
parserOptions: {
|
|
474
|
+
ecmaFeatures: { jsx: true },
|
|
475
|
+
extraFileExtensions: ['.vue', '.svelte'],
|
|
476
|
+
project: true,
|
|
477
|
+
tsconfigRootDir: process.cwd(),
|
|
478
|
+
},
|
|
443
479
|
},
|
|
444
480
|
rules: {
|
|
445
481
|
...jest.configs['flat/all'].rules,
|
|
@@ -476,6 +512,12 @@ export const jestTs = {
|
|
|
476
512
|
'unicorn/no-array-callback-reference': 'off',
|
|
477
513
|
'unicorn/prevent-abbreviations': ['warn', { ignore: [/e2e/] }],
|
|
478
514
|
},
|
|
515
|
+
settings: {
|
|
516
|
+
jest: {
|
|
517
|
+
// Recognize Vitest's import { describe, it, expect } from 'vitest' as test globals
|
|
518
|
+
globalPackage: 'vitest',
|
|
519
|
+
},
|
|
520
|
+
},
|
|
479
521
|
};
|
|
480
522
|
|
|
481
523
|
// Cypress files
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mikey-pro",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.7",
|
|
4
4
|
"description": "AI agent code quality guardrails — ESLint, Prettier, and Stylelint unified config",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
|
14
14
|
"@typescript-eslint/parser": "^8.56.1",
|
|
15
15
|
"eslint-import-resolver-typescript": "^4.4.3",
|
|
16
|
-
"eslint-plugin-boundaries": "^
|
|
16
|
+
"eslint-plugin-boundaries": "^6.0.2",
|
|
17
17
|
"eslint-plugin-compat": "^7.0.1",
|
|
18
18
|
"eslint-plugin-cypress": "^6.1.0",
|
|
19
19
|
"eslint-plugin-import-x": "^4.16.1",
|
|
@@ -146,7 +146,9 @@
|
|
|
146
146
|
"angular"
|
|
147
147
|
],
|
|
148
148
|
"author": "Mikl Wolfe <wolfe@mikl.io> (https://mikl.io)",
|
|
149
|
-
"browserslist": [
|
|
149
|
+
"browserslist": [
|
|
150
|
+
"defaults"
|
|
151
|
+
],
|
|
150
152
|
"engines": {
|
|
151
153
|
"node": ">=20.19.0",
|
|
152
154
|
"npm": ">=9.0.0",
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
const durationValues = [
|
|
2
|
+
String.raw`/\d*\.?\d+m?s\b/`,
|
|
3
|
+
'/^(none|inherit|initial|unset|revert)$/i',
|
|
4
|
+
'/var\\(/',
|
|
5
|
+
];
|
|
6
|
+
|
|
1
7
|
const config = {
|
|
2
8
|
extends: [
|
|
3
9
|
'stylelint-config-standard',
|
|
@@ -20,16 +26,20 @@ const config = {
|
|
|
20
26
|
rules: {
|
|
21
27
|
'color-function-notation': 'modern',
|
|
22
28
|
'color-named': 'never',
|
|
23
|
-
|
|
29
|
+
// Stylelint matches the name WITHOUT the leading `--`.
|
|
30
|
+
'custom-property-pattern': '^[a-z0-9-]+$',
|
|
24
31
|
'declaration-no-important': true,
|
|
32
|
+
// Require an explicit time unit anywhere in the value (decimals and any
|
|
33
|
+
// component order are fine); keywords and var() pass through.
|
|
25
34
|
'declaration-property-value-allowed-list': {
|
|
26
|
-
animation:
|
|
27
|
-
transition:
|
|
35
|
+
animation: durationValues,
|
|
36
|
+
transition: durationValues,
|
|
28
37
|
},
|
|
29
38
|
'declaration-property-value-disallowed-list': {
|
|
30
39
|
'/^grid/': ['auto'],
|
|
31
40
|
},
|
|
32
|
-
|
|
41
|
+
// Plugin rules are namespaced; the bare name is an "Unknown rule".
|
|
42
|
+
'scale-unlimited/declaration-strict-value': [
|
|
33
43
|
['/color/', 'z-index'],
|
|
34
44
|
{
|
|
35
45
|
ignoreKeywords: ['transparent', 'inherit', 'currentColor'],
|
|
@@ -38,7 +48,6 @@ const config = {
|
|
|
38
48
|
'function-calc-no-unspaced-operator': true,
|
|
39
49
|
'max-nesting-depth': 3,
|
|
40
50
|
'media-feature-name-no-vendor-prefix': true,
|
|
41
|
-
'media-query-list-comma-newline-after': 'always-multi-line',
|
|
42
51
|
'number-max-precision': 4,
|
|
43
52
|
'order/properties-alphabetical-order': true,
|
|
44
53
|
'property-no-vendor-prefix': true,
|
package/eslint-config/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Mikl Wolfe
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/eslint-config/README.md
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# @mikey-pro/eslint-config
|
|
2
|
-
|
|
3
|
-
Core ESLint 10 flat config — 25+ plugins for code quality, security, and formatting.
|
|
4
|
-
|
|
5
|
-
**Recommended:** Install `mikey-pro` instead for the full suite (ESLint + Prettier + Stylelint):
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install --save-dev mikey-pro
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Standalone Install
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npm install --save-dev @mikey-pro/eslint-config
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
```js
|
|
18
|
-
// eslint.config.js
|
|
19
|
-
export { default } from '@mikey-pro/eslint-config';
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Features
|
|
23
|
-
|
|
24
|
-
- 25+ ESLint plugins for comprehensive code quality
|
|
25
|
-
- TypeScript strict mode with project-aware rules
|
|
26
|
-
- Security, performance, and import organization rules
|
|
27
|
-
- Prettier integration for formatting
|
|
28
|
-
- noInlineConfig enabled — disable comments are blocked
|
|
29
|
-
|
|
30
|
-
## Supported File Types
|
|
31
|
-
|
|
32
|
-
JavaScript, TypeScript, JSON, YAML, TOML, HTML, CSS, SCSS, Markdown
|
|
33
|
-
|
|
34
|
-
See [Mikey Pro](https://github.com/chiefmikey/mikey-pro) for full documentation.
|
package/prettier-config/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Mikl Wolfe
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# @mikey-pro/prettier-config
|
|
2
|
-
|
|
3
|
-
Prettier configuration for consistent code formatting.
|
|
4
|
-
|
|
5
|
-
**Recommended:** Install `mikey-pro` instead — includes this config plus ESLint and Stylelint:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install --save-dev mikey-pro
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
```json
|
|
12
|
-
{ "prettier": "mikey-pro/prettier" }
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Standalone Install
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install --save-dev @mikey-pro/prettier-config
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
```json
|
|
22
|
-
{ "prettier": "@mikey-pro/prettier-config" }
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Features
|
|
26
|
-
|
|
27
|
-
- Single quotes, trailing commas, semicolons
|
|
28
|
-
- 80 character print width
|
|
29
|
-
- Framework-aware formatting
|
|
30
|
-
- JS, TS, JSON, CSS, HTML, Markdown, YAML support
|
|
31
|
-
|
|
32
|
-
See [Mikey Pro](https://github.com/chiefmikey/mikey-pro) for full documentation.
|
package/stylelint-config/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Mikl Wolfe
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# @mikey-pro/stylelint-config
|
|
2
|
-
|
|
3
|
-
Stylelint configuration for CSS/SCSS best practices.
|
|
4
|
-
|
|
5
|
-
**Recommended:** Install `mikey-pro` instead — includes this config plus ESLint and Prettier:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install --save-dev mikey-pro
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
```json
|
|
12
|
-
{ "stylelint": { "extends": "mikey-pro/stylelint" } }
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Standalone Install
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install --save-dev @mikey-pro/stylelint-config
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
```json
|
|
22
|
-
{ "stylelint": { "extends": "@mikey-pro/stylelint-config" } }
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Features
|
|
26
|
-
|
|
27
|
-
- CSS/SCSS best practices
|
|
28
|
-
- Property ordering
|
|
29
|
-
- Selector specificity limits
|
|
30
|
-
- Color and font consistency
|
|
31
|
-
|
|
32
|
-
See [Mikey Pro](https://github.com/chiefmikey/mikey-pro) for full documentation.
|