@plumeria/eslint-plugin 19.10.2 → 19.10.4
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 +2 -1
- package/bin/oxlint.js +5 -1
- package/dist/guard.d.ts +1 -0
- package/dist/guard.js +14 -0
- package/dist/rules/no-unknown-css-properties.js +68 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -34,7 +34,8 @@ export default [plumeria.configs.recommended];
|
|
|
34
34
|
|
|
35
35
|
## Configuring the styling prop
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
`custom-props-require-import`, `no-inline-object`, `no-mixed-styling-props`,
|
|
38
|
+
`no-style-prop-relay` and `no-unresolved-composition` need to know which JSX
|
|
38
39
|
prop carries styles. It is `classStyle` unless you changed it, so most projects
|
|
39
40
|
configure nothing.
|
|
40
41
|
|
package/bin/oxlint.js
CHANGED
|
@@ -12,7 +12,7 @@ const oxlintBin = path.join(
|
|
|
12
12
|
);
|
|
13
13
|
|
|
14
14
|
const { cliOverrides } = require('../dist/cli.js');
|
|
15
|
-
const { lintConfig } = require('../dist/guard.js');
|
|
15
|
+
const { lintConfig, lowerPriority } = require('../dist/guard.js');
|
|
16
16
|
|
|
17
17
|
const doubleDashIndex = process.argv.indexOf('--');
|
|
18
18
|
let cliArgs = [];
|
|
@@ -40,10 +40,14 @@ async function startOxlint() {
|
|
|
40
40
|
config,
|
|
41
41
|
'--deny-warnings',
|
|
42
42
|
'--no-error-on-unmatched-pattern',
|
|
43
|
+
...(rest.some((arg) => arg.startsWith('--threads'))
|
|
44
|
+
? []
|
|
45
|
+
: ['--threads=2']),
|
|
43
46
|
...rest,
|
|
44
47
|
],
|
|
45
48
|
{ stdio: 'inherit' },
|
|
46
49
|
);
|
|
50
|
+
lowerPriority(child.pid);
|
|
47
51
|
if (config !== oxlintConfig) {
|
|
48
52
|
child.on('close', () => fs.rmSync(config, { force: true }));
|
|
49
53
|
}
|
package/dist/guard.d.ts
CHANGED
|
@@ -16,5 +16,6 @@ export interface LintOverrides {
|
|
|
16
16
|
}
|
|
17
17
|
export declare function lintOverrides(options: LintOptions): LintOverrides;
|
|
18
18
|
export declare function lintConfig(overrides: LintOverrides): string;
|
|
19
|
+
export declare function lowerPriority(pid: number | undefined): boolean;
|
|
19
20
|
export declare function startLintGuard(overrides?: LintOverrides): boolean;
|
|
20
21
|
export {};
|
package/dist/guard.js
CHANGED
|
@@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.lintOverrides = lintOverrides;
|
|
37
37
|
exports.lintConfig = lintConfig;
|
|
38
|
+
exports.lowerPriority = lowerPriority;
|
|
38
39
|
exports.startLintGuard = startLintGuard;
|
|
39
40
|
const child_process_1 = require("child_process");
|
|
40
41
|
const fs = __importStar(require("fs"));
|
|
@@ -72,6 +73,17 @@ function lintConfig(overrides) {
|
|
|
72
73
|
fs.writeFileSync(file, JSON.stringify({ extends: [BASE_CONFIG], ...overrides }));
|
|
73
74
|
return file;
|
|
74
75
|
}
|
|
76
|
+
function lowerPriority(pid) {
|
|
77
|
+
if (!pid)
|
|
78
|
+
return false;
|
|
79
|
+
try {
|
|
80
|
+
os.setPriority(pid, os.constants.priority.PRIORITY_LOW);
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
75
87
|
function startLintGuard(overrides = {}) {
|
|
76
88
|
if (process.env[GUARD_ENV])
|
|
77
89
|
return false;
|
|
@@ -83,7 +95,9 @@ function startLintGuard(overrides = {}) {
|
|
|
83
95
|
config,
|
|
84
96
|
'--deny-warnings',
|
|
85
97
|
'--no-error-on-unmatched-pattern',
|
|
98
|
+
'--threads=2',
|
|
86
99
|
], { stdio: 'inherit' });
|
|
100
|
+
lowerPriority(child.pid);
|
|
87
101
|
const exit = process.exit.bind(process);
|
|
88
102
|
let lintCode = null;
|
|
89
103
|
let pendingCode = null;
|
|
@@ -4,7 +4,74 @@ exports.noUnknownCssProperties = void 0;
|
|
|
4
4
|
const known_css_properties_1 = require("known-css-properties");
|
|
5
5
|
const zss_engine_1 = require("zss-engine");
|
|
6
6
|
const styleObject_1 = require("../util/styleObject");
|
|
7
|
-
const knownProperties = new Set(
|
|
7
|
+
const knownProperties = new Set([
|
|
8
|
+
...known_css_properties_1.all,
|
|
9
|
+
'border-shape',
|
|
10
|
+
'corner-shape',
|
|
11
|
+
'corner-top-shape',
|
|
12
|
+
'corner-right-shape',
|
|
13
|
+
'corner-bottom-shape',
|
|
14
|
+
'corner-left-shape',
|
|
15
|
+
'corner-top-left-shape',
|
|
16
|
+
'corner-top-right-shape',
|
|
17
|
+
'corner-bottom-left-shape',
|
|
18
|
+
'corner-bottom-right-shape',
|
|
19
|
+
'corner-block-start-shape',
|
|
20
|
+
'corner-block-end-shape',
|
|
21
|
+
'corner-inline-start-shape',
|
|
22
|
+
'corner-inline-end-shape',
|
|
23
|
+
'corner-start-start-shape',
|
|
24
|
+
'corner-start-end-shape',
|
|
25
|
+
'corner-end-start-shape',
|
|
26
|
+
'corner-end-end-shape',
|
|
27
|
+
'flex-line-count',
|
|
28
|
+
'flow-tolerance',
|
|
29
|
+
'interest-delay',
|
|
30
|
+
'interest-delay-start',
|
|
31
|
+
'interest-delay-end',
|
|
32
|
+
'rule-inset',
|
|
33
|
+
'rule-inset-start',
|
|
34
|
+
'rule-inset-end',
|
|
35
|
+
'rule-inset-cap',
|
|
36
|
+
'rule-inset-junction',
|
|
37
|
+
'rule-overlap',
|
|
38
|
+
'rule-visibility-items',
|
|
39
|
+
'column-rule-inset',
|
|
40
|
+
'column-rule-inset-start',
|
|
41
|
+
'column-rule-inset-end',
|
|
42
|
+
'column-rule-inset-cap',
|
|
43
|
+
'column-rule-inset-cap-start',
|
|
44
|
+
'column-rule-inset-cap-end',
|
|
45
|
+
'column-rule-inset-junction',
|
|
46
|
+
'column-rule-inset-junction-start',
|
|
47
|
+
'column-rule-inset-junction-end',
|
|
48
|
+
'column-rule-visibility-items',
|
|
49
|
+
'row-rule-inset',
|
|
50
|
+
'row-rule-inset-start',
|
|
51
|
+
'row-rule-inset-end',
|
|
52
|
+
'row-rule-inset-cap',
|
|
53
|
+
'row-rule-inset-cap-start',
|
|
54
|
+
'row-rule-inset-cap-end',
|
|
55
|
+
'row-rule-inset-junction',
|
|
56
|
+
'row-rule-inset-junction-start',
|
|
57
|
+
'row-rule-inset-junction-end',
|
|
58
|
+
'row-rule-visibility-items',
|
|
59
|
+
'scroll-axis-lock',
|
|
60
|
+
'text-decoration-inset',
|
|
61
|
+
'text-fit',
|
|
62
|
+
'timeline-trigger',
|
|
63
|
+
'timeline-trigger-name',
|
|
64
|
+
'timeline-trigger-source',
|
|
65
|
+
'timeline-trigger-activation-range',
|
|
66
|
+
'timeline-trigger-activation-range-start',
|
|
67
|
+
'timeline-trigger-activation-range-end',
|
|
68
|
+
'timeline-trigger-active-range',
|
|
69
|
+
'timeline-trigger-active-range-start',
|
|
70
|
+
'timeline-trigger-active-range-end',
|
|
71
|
+
'trigger-scope',
|
|
72
|
+
'view-transition-scope',
|
|
73
|
+
'window-drag',
|
|
74
|
+
]);
|
|
8
75
|
exports.noUnknownCssProperties = {
|
|
9
76
|
meta: {
|
|
10
77
|
type: 'problem',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/eslint-plugin",
|
|
3
|
-
"version": "19.10.
|
|
3
|
+
"version": "19.10.4",
|
|
4
4
|
"description": "Plumeria ESLint plugin",
|
|
5
5
|
"author": "Refirst 11",
|
|
6
6
|
"license": "MIT",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"known-css-properties": "^0.37.0",
|
|
60
60
|
"oxlint": "1.87.0",
|
|
61
61
|
"zss-engine": "2.9.1",
|
|
62
|
-
"@plumeria/compiler": "19.10.
|
|
62
|
+
"@plumeria/compiler": "19.10.4"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"build": "rimraf dist && pnpm cjs",
|