@plumeria/eslint-plugin 19.10.2 → 19.10.3
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/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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/eslint-plugin",
|
|
3
|
-
"version": "19.10.
|
|
3
|
+
"version": "19.10.3",
|
|
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.3"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"build": "rimraf dist && pnpm cjs",
|