@sinemacula/coding-standards 1.16.0 → 1.18.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 +12 -7
- package/js/eslint/rules/comment-classifier.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://packagist.org/packages/sinemacula/coding-standards)
|
|
4
4
|
[](https://www.npmjs.com/package/@sinemacula/coding-standards)
|
|
5
|
+
[](https://github.com/sinemacula/coding-standards/actions/workflows/tests.yml)
|
|
6
|
+
[](https://github.com/sinemacula/coding-standards/actions/workflows/quality-gates.yml)
|
|
5
7
|
[](https://qlty.sh/gh/sinemacula/projects/coding-standards)
|
|
6
8
|
[](https://qlty.sh/gh/sinemacula/projects/coding-standards)
|
|
7
9
|
[](https://packagist.org/packages/sinemacula/coding-standards)
|
|
@@ -335,7 +337,8 @@ one line where present; a free function keeps the freedom of either shape.
|
|
|
335
337
|
`comment-line-wrap` takes `maxLength` (default 80) and is the syntax-only counterpart of the PHP
|
|
336
338
|
`SineMacula.Commenting.CommentLineLength` sniff. It fills standalone `//` runs and multi-line docblock prose greedily,
|
|
337
339
|
reporting an overflowing line and a prematurely wrapped line on their own footings and autofixing both. Markdown
|
|
338
|
-
headings, docblock tag lines,
|
|
340
|
+
headings, docblock tag lines, machine-parsed tool directives (`eslint`, `biome-ignore`, `@ts-`, `Stryker`, `c8`/`v8`/
|
|
341
|
+
`istanbul ignore`, `@vite-ignore` and the like), fenced code, an indented code or command block, a doc-tag whose
|
|
339
342
|
value opens a multi-line bracketed type (an `array{...}` shape, a `<...>` generic or a `\Closure(...)` signature),
|
|
340
343
|
tables, separators, a line whose overflow is a single unbreakable token such as a long name or URL, trailing comments
|
|
341
344
|
after code and compact single-line docblocks are left untouched.
|
|
@@ -356,12 +359,14 @@ single-line blocks included. The type-checked layer adds `@typescript-eslint/exp
|
|
|
356
359
|
## Testing
|
|
357
360
|
|
|
358
361
|
```bash
|
|
359
|
-
composer test
|
|
360
|
-
composer test:coverage
|
|
361
|
-
composer
|
|
362
|
-
composer
|
|
363
|
-
composer
|
|
364
|
-
composer
|
|
362
|
+
composer test # PHPUnit suite for the custom sniffs and PHPStan rule
|
|
363
|
+
composer test:coverage # suite with Clover coverage output
|
|
364
|
+
composer test:mutation # Infection mutation gate (min MSI 90)
|
|
365
|
+
composer test:mutation:full # full mutation suite without thresholds
|
|
366
|
+
composer analyse # PHPStan static analysis
|
|
367
|
+
composer check # static analysis and lint via qlty
|
|
368
|
+
composer format # format via qlty
|
|
369
|
+
composer smells # duplication / complexity smells via qlty
|
|
365
370
|
```
|
|
366
371
|
|
|
367
372
|
## Changelog
|
|
@@ -18,7 +18,7 @@ const FENCE = /^(```|~~~)/;
|
|
|
18
18
|
const TAG = new RegExp(`^@[A-Za-z][A-Za-z0-9-]*(?=${WS}|$)`);
|
|
19
19
|
const LIST = new RegExp(`^${WS}*([-*+]|\\d+[.)])${WS}+`);
|
|
20
20
|
const HEADING = new RegExp(`^#{1,6}${WS}`);
|
|
21
|
-
const DIRECTIVE = /^(phpcs:|phpstan-ignore|@phpstan-|@psalm-|@phan-|eslint
|
|
21
|
+
const DIRECTIVE = /^(phpcs:|phpstan-ignore|@phpstan-|@psalm-|@phan-|eslint\b|globals?\b|exported\b|biome-ignore\b|@ts-|prettier-ignore|stylelint-|Stryker (?:disable|restore)\b|(?:c8|v8|istanbul) ignore\b|@vite-ignore\b|webpackChunkName\b|@preserve\b|@license\b|@codingStandards|@SuppressWarnings|NOSONAR|qlty-ignore)/;
|
|
22
22
|
const SEPARATOR = /^[=\-~*_#.+ ]{3,}$/;
|
|
23
23
|
const CODE = new RegExp(`=>|->|::|;${WS}*$|\\{${WS}*$|^\\}|^(?:if|elseif|for|foreach|while|switch|catch)${WS}*\\(|^[\\w$>[\\]'.-]+${WS}*=[^=>]|^\\$`);
|
|
24
24
|
const SPAN = /`[^`]*`|\{@[^}]*\}|\[[^\]]*\]\([^)]*\)/g;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sinemacula/coding-standards",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "Centralized coding standards, static analysis configurations, and code quality tooling for all Sine Macula repositories.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Ben Carey <bdmc@sinemacula.co.uk>",
|