Upgrade frontend ESLint security dependencies

This commit is contained in:
rcourtman 2026-03-26 20:54:42 +00:00
parent a5b5c797d2
commit 640c414c0c
36 changed files with 14802 additions and 899 deletions

View file

@ -21,6 +21,7 @@ export default tseslint.config(
},
rules: {
...solid.configs.typescript.rules,
"no-unassigned-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{

File diff suppressed because it is too large Load diff

View file

@ -39,16 +39,16 @@
"seroval-plugins": "^1.4.1"
},
"devDependencies": {
"@eslint/js": "^9.39.2",
"@eslint/js": "^10.0.1",
"@solidjs/testing-library": "^0.8.5",
"@tailwindcss/typography": "^0.5.19",
"@testing-library/jest-dom": "^6.5.0",
"@types/node": "^20.10.0",
"@vitest/coverage-v8": "^4.1.2",
"autoprefixer": "^10.4.0",
"eslint": "^9.20.0",
"eslint": "^10.1.0",
"eslint-config-prettier": "^10.0.0",
"eslint-plugin-solid": "^0.14.5",
"eslint-plugin-solid": "file:vendor/eslint-plugin-solid",
"globals": "^17.3.0",
"jsdom": "^24.1.0",
"postcss": "^8.4.0",

View file

@ -74,7 +74,11 @@ export class MonitoringAPI {
const parsed = JSON.parse(text) as DeleteDockerHostResponse;
return parsed;
} catch (err) {
throw new Error((err as Error).message || 'Failed to parse delete docker host response');
const parseError = Object.assign(
new Error((err as Error).message || 'Failed to parse delete docker host response'),
{ cause: err },
);
throw parseError;
}
}
@ -291,7 +295,13 @@ export class MonitoringAPI {
try {
return JSON.parse(text) as DeleteKubernetesClusterResponse;
} catch (err) {
throw new Error((err as Error).message || 'Failed to parse delete kubernetes cluster response');
const parseError = Object.assign(
new Error(
(err as Error).message || 'Failed to parse delete kubernetes cluster response',
),
{ cause: err },
);
throw parseError;
}
}
@ -650,7 +660,11 @@ export class MonitoringAPI {
try {
return JSON.parse(text) as UpdateDockerContainerResponse;
} catch (err) {
throw new Error((err as Error).message || 'Failed to parse update container response');
const parseError = Object.assign(
new Error((err as Error).message || 'Failed to parse update container response'),
{ cause: err },
);
throw parseError;
}
}
@ -692,7 +706,11 @@ export class MonitoringAPI {
try {
return JSON.parse(text) as { success: boolean; commandId?: string };
} catch (err) {
throw new Error((err as Error).message || 'Failed to parse check updates response');
const parseError = Object.assign(
new Error((err as Error).message || 'Failed to parse check updates response'),
{ cause: err },
);
throw parseError;
}
}
}

View file

@ -1940,18 +1940,20 @@ const UnifiedBackups: Component = () => {
barsGroup.appendChild(barGroup);
// Date labels
let showLabel = false;
if (chartTimeRange() <= 7) {
showLabel = true;
} else if (chartTimeRange() <= 30) {
showLabel =
i % Math.ceil(data.length / 10) === 0 || i === data.length - 1;
} else if (chartTimeRange() <= 90) {
const timeRange = chartTimeRange();
const showLabel =
timeRange <= 7
? true
: timeRange <= 30
? i % Math.ceil(data.length / 10) === 0 || i === data.length - 1
: timeRange <= 90
? (() => {
const dayOfWeek = barDate.getDay();
showLabel = dayOfWeek === 0 || i === 0 || i === data.length - 1;
} else {
showLabel = barDate.getDate() === 1 || i === 0 || i === data.length - 1;
}
return dayOfWeek === 0 || i === 0 || i === data.length - 1;
})()
: barDate.getDate() === 1 ||
i === 0 ||
i === data.length - 1;
if (showLabel) {
const text = document.createElementNS(
@ -1968,10 +1970,10 @@ const UnifiedBackups: Component = () => {
// Use shorter format for horizontal labels
let labelText;
if (chartTimeRange() <= 7) {
if (timeRange <= 7) {
// For 7 days, show month/day
labelText = `${barDate.getMonth() + 1}/${barDate.getDate()}`;
} else if (chartTimeRange() <= 30) {
} else if (timeRange <= 30) {
// For 30 days, show day only (or month/day for first of month)
labelText =
barDate.getDate() === 1

View file

@ -964,32 +964,33 @@ export const HostsOverview: Component = () => {
const direction = sortDirection();
return hostList.sort((a: Host, b: Host) => {
let comparison = 0;
switch (key) {
case 'name':
comparison = (a.displayName || a.hostname || a.id).localeCompare(b.displayName || b.hostname || b.id);
break;
case 'platform':
comparison = (a.platform || '').localeCompare(b.platform || '');
break;
case 'cpu':
comparison = (a.cpuUsage ?? 0) - (b.cpuUsage ?? 0);
break;
case 'memory':
comparison = (a.memory?.usage ?? 0) - (b.memory?.usage ?? 0);
break;
case 'disk': {
const aDisk = a.disks?.reduce((sum: number, d: { usage?: number }) => sum + (d.usage ?? 0), 0) ?? 0;
const bDisk = b.disks?.reduce((sum: number, d: { usage?: number }) => sum + (d.usage ?? 0), 0) ?? 0;
comparison = aDisk - bDisk;
break;
const comparison = (() => {
switch (key) {
case 'name':
return (a.displayName || a.hostname || a.id).localeCompare(
b.displayName || b.hostname || b.id,
);
case 'platform':
return (a.platform || '').localeCompare(b.platform || '');
case 'cpu':
return (a.cpuUsage ?? 0) - (b.cpuUsage ?? 0);
case 'memory':
return (a.memory?.usage ?? 0) - (b.memory?.usage ?? 0);
case 'disk': {
const aDisk =
a.disks?.reduce((sum: number, d: { usage?: number }) => sum + (d.usage ?? 0), 0) ??
0;
const bDisk =
b.disks?.reduce((sum: number, d: { usage?: number }) => sum + (d.usage ?? 0), 0) ??
0;
return aDisk - bDisk;
}
case 'uptime':
return (a.uptimeSeconds ?? 0) - (b.uptimeSeconds ?? 0);
default:
return 0;
}
case 'uptime':
comparison = (a.uptimeSeconds ?? 0) - (b.uptimeSeconds ?? 0);
break;
default:
comparison = 0;
}
})();
return direction === 'asc' ? comparison : -comparison;
});
});

View file

@ -750,18 +750,11 @@ export const KubernetesClusters: Component<KubernetesClustersProps> = (props) =>
// Sort clusters
return filtered.sort((a, b) => {
let cmp = 0;
switch (key) {
case 'name':
cmp = getClusterDisplayName(a).localeCompare(getClusterDisplayName(b));
break;
case 'status':
cmp =
(normalize(a.status) === 'online' ? 0 : 1) - (normalize(b.status) === 'online' ? 0 : 1);
break;
default:
cmp = getClusterDisplayName(a).localeCompare(getClusterDisplayName(b));
}
const cmp =
key === 'status'
? (normalize(a.status) === 'online' ? 0 : 1) -
(normalize(b.status) === 'online' ? 0 : 1)
: getClusterDisplayName(a).localeCompare(getClusterDisplayName(b));
return dir === 'desc' ? -cmp : cmp;
});
});
@ -796,20 +789,12 @@ export const KubernetesClusters: Component<KubernetesClustersProps> = (props) =>
// Sort nodes
return filtered.sort((a, b) => {
let cmp = 0;
switch (key) {
case 'name':
cmp = (a.node.name ?? '').localeCompare(b.node.name ?? '');
break;
case 'cluster':
cmp = getClusterDisplayName(a.cluster).localeCompare(getClusterDisplayName(b.cluster));
break;
case 'status':
cmp = (a.node.ready ? 0 : 1) - (b.node.ready ? 0 : 1);
break;
default:
cmp = (a.node.name ?? '').localeCompare(b.node.name ?? '');
}
const cmp =
key === 'cluster'
? getClusterDisplayName(a.cluster).localeCompare(getClusterDisplayName(b.cluster))
: key === 'status'
? (a.node.ready ? 0 : 1) - (b.node.ready ? 0 : 1)
: (a.node.name ?? '').localeCompare(b.node.name ?? '');
return dir === 'desc' ? -cmp : cmp;
});
});
@ -847,29 +832,23 @@ export const KubernetesClusters: Component<KubernetesClustersProps> = (props) =>
// Sort
return filtered.sort((a, b) => {
let cmp = 0;
switch (key) {
case 'name':
cmp = (a.pod.name ?? '').localeCompare(b.pod.name ?? '');
break;
case 'namespace':
cmp = (a.pod.namespace ?? '').localeCompare(b.pod.namespace ?? '');
break;
case 'cluster':
cmp = getClusterDisplayName(a.cluster).localeCompare(getClusterDisplayName(b.cluster));
break;
case 'restarts':
cmp = (a.pod.restarts ?? 0) - (b.pod.restarts ?? 0);
break;
case 'age':
cmp = (a.pod.createdAt ?? 0) - (b.pod.createdAt ?? 0);
break;
case 'status':
cmp = (isPodHealthy(a.pod) ? 0 : 1) - (isPodHealthy(b.pod) ? 0 : 1);
break;
default:
cmp = (a.pod.name ?? '').localeCompare(b.pod.name ?? '');
}
const cmp = (() => {
switch (key) {
case 'namespace':
return (a.pod.namespace ?? '').localeCompare(b.pod.namespace ?? '');
case 'cluster':
return getClusterDisplayName(a.cluster).localeCompare(getClusterDisplayName(b.cluster));
case 'restarts':
return (a.pod.restarts ?? 0) - (b.pod.restarts ?? 0);
case 'age':
return (a.pod.createdAt ?? 0) - (b.pod.createdAt ?? 0);
case 'status':
return (isPodHealthy(a.pod) ? 0 : 1) - (isPodHealthy(b.pod) ? 0 : 1);
case 'name':
default:
return (a.pod.name ?? '').localeCompare(b.pod.name ?? '');
}
})();
return dir === 'desc' ? -cmp : cmp;
});
});
@ -900,31 +879,26 @@ export const KubernetesClusters: Component<KubernetesClustersProps> = (props) =>
// Sort
return filtered.sort((a, b) => {
let cmp = 0;
switch (key) {
case 'name':
cmp = (a.deployment.name ?? '').localeCompare(b.deployment.name ?? '');
break;
case 'namespace':
cmp = (a.deployment.namespace ?? '').localeCompare(b.deployment.namespace ?? '');
break;
case 'cluster':
cmp = getClusterDisplayName(a.cluster).localeCompare(getClusterDisplayName(b.cluster));
break;
case 'replicas':
cmp = (a.deployment.desiredReplicas ?? 0) - (b.deployment.desiredReplicas ?? 0);
break;
case 'ready':
cmp = (a.deployment.readyReplicas ?? 0) - (b.deployment.readyReplicas ?? 0);
break;
case 'status':
cmp =
(isDeploymentHealthy(a.deployment) ? 0 : 1) -
(isDeploymentHealthy(b.deployment) ? 0 : 1);
break;
default:
cmp = (a.deployment.name ?? '').localeCompare(b.deployment.name ?? '');
}
const cmp = (() => {
switch (key) {
case 'namespace':
return (a.deployment.namespace ?? '').localeCompare(b.deployment.namespace ?? '');
case 'cluster':
return getClusterDisplayName(a.cluster).localeCompare(getClusterDisplayName(b.cluster));
case 'replicas':
return (a.deployment.desiredReplicas ?? 0) - (b.deployment.desiredReplicas ?? 0);
case 'ready':
return (a.deployment.readyReplicas ?? 0) - (b.deployment.readyReplicas ?? 0);
case 'status':
return (
(isDeploymentHealthy(a.deployment) ? 0 : 1) -
(isDeploymentHealthy(b.deployment) ? 0 : 1)
);
case 'name':
default:
return (a.deployment.name ?? '').localeCompare(b.deployment.name ?? '');
}
})();
return dir === 'desc' ? -cmp : cmp;
});
});

View file

@ -412,41 +412,34 @@ const Storage: Component = () => {
};
const result = storage.sort((a, b) => {
let comparison = 0;
switch (sortKey()) {
case 'node': {
const nodeA = (a.nodes && a.nodes.length > 0 ? a.nodes[0] : a.node) ?? '';
const nodeB = (b.nodes && b.nodes.length > 0 ? b.nodes[0] : b.node) ?? '';
comparison = nodeA.localeCompare(nodeB, undefined, { sensitivity: 'base' });
break;
let comparison = (() => {
switch (sortKey()) {
case 'node': {
const nodeA = (a.nodes && a.nodes.length > 0 ? a.nodes[0] : a.node) ?? '';
const nodeB = (b.nodes && b.nodes.length > 0 ? b.nodes[0] : b.node) ?? '';
return nodeA.localeCompare(nodeB, undefined, { sensitivity: 'base' });
}
case 'type':
return (a.type ?? '').localeCompare(b.type ?? '', undefined, {
sensitivity: 'base',
});
case 'status':
return (a.status ?? '').localeCompare(b.status ?? '', undefined, {
sensitivity: 'base',
});
case 'usage':
return numericCompare(a.usage ?? 0, b.usage ?? 0);
case 'free':
return numericCompare(a.free ?? 0, b.free ?? 0);
case 'total':
return numericCompare(a.total ?? 0, b.total ?? 0);
case 'name':
default:
return (a.name ?? '').localeCompare(b.name ?? '', undefined, {
sensitivity: 'base',
});
}
case 'type':
comparison = (a.type ?? '').localeCompare(b.type ?? '', undefined, {
sensitivity: 'base',
});
break;
case 'status':
comparison = (a.status ?? '').localeCompare(b.status ?? '', undefined, {
sensitivity: 'base',
});
break;
case 'usage':
comparison = numericCompare(a.usage ?? 0, b.usage ?? 0);
break;
case 'free':
comparison = numericCompare(a.free ?? 0, b.free ?? 0);
break;
case 'total':
comparison = numericCompare(a.total ?? 0, b.total ?? 0);
break;
case 'name':
default:
comparison = (a.name ?? '').localeCompare(b.name ?? '', undefined, {
sensitivity: 'base',
});
break;
}
})();
if (comparison === 0) {
comparison = (a.name ?? '').localeCompare(b.name ?? '', undefined, { sensitivity: 'base' });

View file

@ -307,16 +307,22 @@ export const HistoryChart: Component<HistoryChartProps> = (props) => {
ctx.font = '10px sans-serif';
ctx.textAlign = 'right';
ctx.textBaseline = 'middle';
let label = '';
if (isPercentLike) {
label = pct === 0 ? '0%' : pct === 1 ? '100%' : '50%';
} else if (isByteLike) {
label = pct === 0 ? '0' : pct === 1 ? 'Max' : 'Avg';
} else {
// Absolute numeric values (temperature, counters) — show computed scale
const scaleVal = Math.round(minValue + pct * (maxValue - minValue));
label = pct === 0 ? '0' : `${scaleVal}`;
}
const label = isPercentLike
? pct === 0
? '0%'
: pct === 1
? '100%'
: '50%'
: isByteLike
? pct === 0
? '0'
: pct === 1
? 'Max'
: 'Avg'
: (() => {
const scaleVal = Math.round(minValue + pct * (maxValue - minValue));
return pct === 0 ? '0' : `${scaleVal}`;
})();
ctx.fillText(label, 35, y);
});

View file

@ -45,21 +45,10 @@ const Tooltip: Component<TooltipProps> = (props) => {
const rect = tooltipRef.getBoundingClientRect();
const padding = 8;
let left = props.x;
let top = props.y;
const align = props.align ?? 'center';
const direction = props.direction ?? 'up';
if (align === 'center') {
left = props.x - rect.width / 2;
}
if (direction === 'up') {
top = props.y - rect.height - padding;
} else {
top = props.y + padding;
}
let left = align === 'center' ? props.x - rect.width / 2 : props.x;
let top = direction === 'up' ? props.y - rect.height - padding : props.y + padding;
// Clamp to viewport bounds with small offset to avoid touching edges
const viewportPadding = 4;

View file

@ -377,9 +377,12 @@ class ApiClient {
try {
return JSON.parse(text) as T;
} catch (_err) {
} catch (err) {
logger.error('Failed to parse JSON response', text);
throw new Error('Invalid JSON response from server');
const parseError = Object.assign(new Error('Invalid JSON response from server'), {
cause: err,
});
throw parseError;
}
}

View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Josh Wilson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -0,0 +1,225 @@
<p>
<img width="100%" src="https://assets.solidjs.com/banner?type=ESLint%20Plugin&background=tiles&project=%20" alt="Solid ESLint Extension">
</p>
# Solid ESLint Plugin
[![npm version](https://img.shields.io/npm/v/eslint-plugin-solid?style=for-the-badge)](https://npmjs.com/package/eslint-plugin-solid)
[![GitHub package version](https://img.shields.io/github/package-json/v/solidjs-community/eslint-plugin-solid?style=for-the-badge)](https://github.com/solidjs-community/eslint-plugin-solid)
![ESLint peer dependency](https://img.shields.io/badge/eslint-6.x--8.x-blue?style=for-the-badge)
[![CI](https://github.com/solidjs-community/eslint-plugin-solid/actions/workflows/ci.yml/badge.svg?style=for-the-badge)](https://github.com/solidjs-community/eslint-plugin-solid/actions/workflows/ci.yml)
This package contains [Solid](https://www.solidjs.com/)-specific linting rules for ESLint. It can
ease Solid's learning curve by finding and fixing problems around Solid's reactivity system, and can
migrate some React patterns to Solid code.
It's approaching a `1.0.0` release, and it's well tested and should be helpful in Solid projects
today.
<!-- doc-gen TOC -->
- [Installation](#installation)
- [Configuration](#configuration)
- [TypeScript](#typescript)
- [Manual Configuration](#manual-configuration)
- [Flat Configuration](#flat-configuration)
- [Rules](#rules)
- [Troubleshooting](#troubleshooting)
- [Versioning](#versioning)
<!-- end-doc-gen -->
## Installation
Install `eslint` and `eslint-plugin-solid` locally.
```sh
npm install --save-dev eslint eslint-plugin-solid
# or
pnpm add --save-dev eslint eslint-plugin-solid
yarn add --dev eslint eslint-plugin-solid
# optional, to create an ESLint config file
npx eslint --init
# or
pnpm eslint --init
yarn eslint --init
```
If you're using VSCode, you'll want to install the [ESLint
extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint). You're
encouraged to enable auto-fixing problems on save by adding the following to your `settings.json`
file.
```json
{
"editor.codeActionsOnSave": {
"source.fixAll": true
}
}
```
If you're using Vite, you may want to install
[vite-plugin-eslint](https://github.com/gxmari007/vite-plugin-eslint).
You may also want to check out
[eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y), which provides
useful rules for writing accessible HTML.
## Configuration
Use the `"plugin:solid/recommended"` configuration to get reasonable defaults as shown [below](#rules).
```json
{
"plugins": ["solid"],
"extends": ["eslint:recommended", "plugin:solid/recommended"]
}
```
### TypeScript
If you're using TypeScript, use the `"plugin:solid/typescript"` configuration instead.
This disables some features that overlap with type checking.
```json
{
"parser": "@typescript-eslint/parser",
"plugins": ["solid"],
"extends": ["eslint:recommended", "plugin:solid/typescript"]
}
```
### Manual Configuration
If you don't want to use a preset, you can configure rules individually. Add the `"solid"` plugin,
enable JSX with the parser options (or use the equivalent options for `@typescript-eslint/parser` or
`@babel/eslint-parser`), and configure the rules you would like to use. Some rules have additional
options you can set.
```json
{
"plugins": ["solid"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"solid/reactivity": "warn",
"solid/no-destructure": "warn",
"solid/jsx-no-undef": "error"
}
}
```
### Flat Configuration
ESLint's new configuration system, [Flat
Configuration](https://eslint.org/docs/latest/use/configure/configuration-files-new#using-configurations-included-in-plugins),
is available starting in ESLint [v8.23.0](https://github.com/eslint/eslint/releases/tag/v8.23.0). To
use it, create an `eslint.config.js` file at the root of your project, instead of `.eslintrc.*`
and/or `.eslintignore`.
```js
import js from "@eslint/js";
import solid from "eslint-plugin-solid/configs/recommended";
export default [
js.configs.recommended, // replaces eslint:recommended
solid,
];
```
For TypeScript:
```js
import js from "@eslint/js";
import solid from "eslint-plugin-solid/configs/typescript";
import * as tsParser from "@typescript-eslint/parser";
export default [
js.configs.recommended,
{
files: ["**/*.{ts,tsx}"],
...solid,
languageOptions: {
parser: tsParser,
parserOptions: {
project: "tsconfig.json",
},
},
},
];
```
These configurations do not configure global variables in ESLint. You can do this yourself manually
or with a package like [globals](https://www.npmjs.com/package/globals) by creating a configuration
with a `languageOptions.globals` object. We recommend setting up global variables for Browser APIs
as well as at least ES2015.
Note for the ESLint VSCode Extension: Enable the "Use Flat Config" setting for your workspace to
enable Flat Config support.
Flat configs are also available as `plugin.configs['flat/recommended']` and `plugin.configs['flat/typescript']`, after using `import plugin from 'eslint-plugin-solid'`.
## Rules
✔: Enabled in the `recommended` configuration.
🔧: Fixable with [`eslint --fix`](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems)/IDE auto-fix.
<!-- doc-gen RULES -->
| ✔ | 🔧 | Rule | Description |
| :---: | :---: | :--- | :--- |
| ✔ | 🔧 | [solid/components-return-once](/packages/eslint-plugin-solid/docs/components-return-once.md) | Disallow early returns in components. Solid components only run once, and so conditionals should be inside JSX. |
| ✔ | 🔧 | [solid/event-handlers](/packages/eslint-plugin-solid/docs/event-handlers.md) | Enforce naming DOM element event handlers consistently and prevent Solid's analysis from misunderstanding whether a prop should be an event handler. |
| ✔ | 🔧 | [solid/imports](/packages/eslint-plugin-solid/docs/imports.md) | Enforce consistent imports from "solid-js", "solid-js/web", and "solid-js/store". |
| ✔ | | [solid/jsx-no-duplicate-props](/packages/eslint-plugin-solid/docs/jsx-no-duplicate-props.md) | Disallow passing the same prop twice in JSX. |
| ✔ | | [solid/jsx-no-script-url](/packages/eslint-plugin-solid/docs/jsx-no-script-url.md) | Disallow javascript: URLs. |
| ✔ | 🔧 | [solid/jsx-no-undef](/packages/eslint-plugin-solid/docs/jsx-no-undef.md) | Disallow references to undefined variables in JSX. Handles custom directives. |
| ✔ | | [solid/jsx-uses-vars](/packages/eslint-plugin-solid/docs/jsx-uses-vars.md) | Prevent variables used in JSX from being marked as unused. |
| | | [solid/no-array-handlers](/packages/eslint-plugin-solid/docs/no-array-handlers.md) | Disallow usage of type-unsafe event handlers. |
| ✔ | 🔧 | [solid/no-destructure](/packages/eslint-plugin-solid/docs/no-destructure.md) | Disallow destructuring props. In Solid, props must be used with property accesses (`props.foo`) to preserve reactivity. This rule only tracks destructuring in the parameter list. |
| ✔ | 🔧 | [solid/no-innerhtml](/packages/eslint-plugin-solid/docs/no-innerhtml.md) | Disallow usage of the innerHTML attribute, which can often lead to security vulnerabilities. |
| | | [solid/no-proxy-apis](/packages/eslint-plugin-solid/docs/no-proxy-apis.md) | Disallow usage of APIs that use ES6 Proxies, only to target environments that don't support them. |
| ✔ | 🔧 | [solid/no-react-deps](/packages/eslint-plugin-solid/docs/no-react-deps.md) | Disallow usage of dependency arrays in `createEffect` and `createMemo`. |
| ✔ | 🔧 | [solid/no-react-specific-props](/packages/eslint-plugin-solid/docs/no-react-specific-props.md) | Disallow usage of React-specific `className`/`htmlFor` props, which were deprecated in v1.4.0. |
| ✔ | | [solid/no-unknown-namespaces](/packages/eslint-plugin-solid/docs/no-unknown-namespaces.md) | Enforce using only Solid-specific namespaced attribute names (i.e. `'on:'` in `<div on:click={...} />`). |
| | 🔧 | [solid/prefer-classlist](/packages/eslint-plugin-solid/docs/prefer-classlist.md) | Enforce using the classlist prop over importing a classnames helper. The classlist prop accepts an object `{ [class: string]: boolean }` just like classnames. |
| ✔ | 🔧 | [solid/prefer-for](/packages/eslint-plugin-solid/docs/prefer-for.md) | Enforce using Solid's `<For />` component for mapping an array to JSX elements. |
| | 🔧 | [solid/prefer-show](/packages/eslint-plugin-solid/docs/prefer-show.md) | Enforce using Solid's `<Show />` component for conditionally showing content. Solid's compiler covers this case, so it's a stylistic rule only. |
| ✔ | | [solid/reactivity](/packages/eslint-plugin-solid/docs/reactivity.md) | Enforce that reactivity (props, signals, memos, etc.) is properly used, so changes in those values will be tracked and update the view as expected. |
| ✔ | 🔧 | [solid/self-closing-comp](/packages/eslint-plugin-solid/docs/self-closing-comp.md) | Disallow extra closing tags for components without children. |
| ✔ | 🔧 | [solid/style-prop](/packages/eslint-plugin-solid/docs/style-prop.md) | Require CSS properties in the `style` prop to be valid and kebab-cased (ex. 'font-size'), not camel-cased (ex. 'fontSize') like in React, and that property values with dimensions are strings, not numbers with implicit 'px' units. |
<!-- end-doc-gen -->
## Troubleshooting
The rules in this plugin provide sensible guidelines as well as possible, but there may be times
where you know better than the rule and want to ignore a warning. To do that, [add a
comment](https://eslint.org/docs/latest/user-guide/configuring/rules#disabling-rules) like the
following:
```jsx
// eslint-disable-next-line solid/reactivity
const [editedValue, setEditedValue] = createSignal(props.value);
```
_Please note_: there may also be times where a rule correctly warns about a subtle problem,
even if it looks like a false positive at first. With `solid/reactivity`, please look at the
[reactivity docs](https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/reactivity.md#troubleshooting) before deciding to disable the rule.
When in doubt, feel free to [file an
issue](https://github.com/solidjs-community/eslint-plugin-solid/issues/new/choose).
## Versioning
Pre-1.0.0, the rules and the `recommended` and `typescript` configuations will be
stable across patch (`0.0.x`) versions, but may change across minor (`0.x`) versions.
If you want to pin a minor version, use a tilde in your `package.json`.
<!-- doc-gen TILDE -->
```diff
- "eslint-plugin-solid": "^0.14.5"
+ "eslint-plugin-solid": "~0.14.5"
```
<!-- end-doc-gen -->

View file

@ -0,0 +1,32 @@
import {
__commonJS,
__toESM,
require_recommended
} from "./chunk-5IRTCPIR.mjs";
// src/configs/typescript.ts
var require_typescript = __commonJS({
"src/configs/typescript.ts"(exports, module) {
var import_recommended = __toESM(require_recommended());
var typescript = {
// no files; either apply to all files, or let users spread in this config
// and specify matching patterns. This is eslint-plugin-react's take.
plugins: import_recommended.default.plugins,
// no languageOptions; ESLint's default parser can't parse TypeScript,
// and parsers are configured in languageOptions, so let the user handle
// this rather than cause potential conflicts
rules: {
...import_recommended.default.rules,
"solid/jsx-no-undef": [2, { typescriptEnabled: true }],
// namespaces taken care of by TS
"solid/no-unknown-namespaces": 0
}
};
module.exports = typescript;
}
});
export {
require_typescript
};
//# sourceMappingURL=chunk-2RM2RZIF.mjs.map

View file

@ -0,0 +1 @@
{"version":3,"sources":["../src/configs/typescript.ts"],"sourcesContent":["import type { TSESLint } from \"@typescript-eslint/utils\";\nimport { Linter } from \"eslint\";\n\nimport recommended from \"./recommended\";\n\nconst typescript = {\n // no files; either apply to all files, or let users spread in this config\n // and specify matching patterns. This is eslint-plugin-react's take.\n plugins: recommended.plugins,\n // no languageOptions; ESLint's default parser can't parse TypeScript,\n // and parsers are configured in languageOptions, so let the user handle\n // this rather than cause potential conflicts\n rules: {\n ...recommended.rules,\n \"solid/jsx-no-undef\": [2, { typescriptEnabled: true }] satisfies Linter.RuleEntry,\n // namespaces taken care of by TS\n \"solid/no-unknown-namespaces\": 0,\n },\n} satisfies TSESLint.FlatConfig.Config;\n\nexport = typescript;\n"],"mappings":";;;;;;;AAAA;AAAA;AAGA,6BAAwB;AAExB,QAAM,aAAa;AAAA;AAAA;AAAA,MAGjB,SAAS,mBAAAA,QAAY;AAAA;AAAA;AAAA;AAAA,MAIrB,OAAO;AAAA,QACL,GAAG,mBAAAA,QAAY;AAAA,QACf,sBAAsB,CAAC,GAAG,EAAE,mBAAmB,KAAK,CAAC;AAAA;AAAA,QAErD,+BAA+B;AAAA,MACjC;AAAA,IACF;AAEA,qBAAS;AAAA;AAAA;","names":["recommended"]}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,89 @@
import { TSESLint } from '@typescript-eslint/utils';
declare const recommended: {
plugins: {
solid: {
meta: {
name: any;
version: any;
};
rules: {
"components-return-once": TSESLint.RuleModule<"noEarlyReturn" | "noConditionalReturn", [], unknown, TSESLint.RuleListener>;
"event-handlers": TSESLint.RuleModule<"naming" | "capitalization" | "nonstandard" | "make-handler" | "make-attr" | "detected-attr" | "spread-handler", [({
ignoreCase?: boolean;
warnOnSpread?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
imports: TSESLint.RuleModule<"prefer-source", [], unknown, TSESLint.RuleListener>;
"jsx-no-duplicate-props": TSESLint.RuleModule<"noDuplicateProps" | "noDuplicateClass" | "noDuplicateChildren", [({
ignoreCase?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-undef": TSESLint.RuleModule<"undefined" | "customDirectiveUndefined" | "autoImport", [({
allowGlobals?: boolean;
autoImport?: boolean;
typescriptEnabled?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-script-url": TSESLint.RuleModule<"noJSURL", [], unknown, TSESLint.RuleListener>;
"jsx-uses-vars": TSESLint.RuleModule<never, [], unknown, TSESLint.RuleListener>;
"no-destructure": TSESLint.RuleModule<"noDestructure", [], unknown, TSESLint.RuleListener>;
"no-innerhtml": TSESLint.RuleModule<"dangerous" | "conflict" | "notHtml" | "useInnerText" | "dangerouslySetInnerHTML", [({
allowStatic?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-proxy-apis": TSESLint.RuleModule<"noStore" | "spreadCall" | "spreadMember" | "proxyLiteral" | "mergeProps", [], unknown, TSESLint.RuleListener>;
"no-react-deps": TSESLint.RuleModule<"noUselessDep", [], unknown, TSESLint.RuleListener>;
"no-react-specific-props": TSESLint.RuleModule<"prefer" | "noUselessKey", [], unknown, TSESLint.RuleListener>;
"no-unknown-namespaces": TSESLint.RuleModule<"unknown" | "style" | "component" | "component-suggest", [({
allowedNamespaces: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-classlist": TSESLint.RuleModule<"preferClasslist", [({
classnames?: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-for": TSESLint.RuleModule<"preferFor" | "preferForOrIndex", [], unknown, TSESLint.RuleListener>;
"prefer-show": TSESLint.RuleModule<"preferShowAnd" | "preferShowTernary", [], unknown, TSESLint.RuleListener>;
reactivity: TSESLint.RuleModule<"noWrite" | "untrackedReactive" | "expectedFunctionGotExpression" | "badSignal" | "badUnnamedDerivedSignal" | "shouldDestructure" | "shouldAssign" | "noAsyncTrackedScope", [{
customReactiveFunctions: string[];
}], unknown, TSESLint.RuleListener>;
"self-closing-comp": TSESLint.RuleModule<"selfClose" | "dontSelfClose", [({
component?: "all" | "none";
html?: "all" | "void" | "none";
} | undefined)?], unknown, TSESLint.RuleListener>;
"style-prop": TSESLint.RuleModule<"kebabStyleProp" | "invalidStyleProp" | "numericStyleValue" | "stringStyle", [({
styleProps?: Array<string>;
allowString?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-array-handlers": TSESLint.RuleModule<"noArrayHandlers", [], unknown, TSESLint.RuleListener>;
};
};
};
languageOptions: {
sourceType: "module";
parserOptions: {
ecmaFeatures: {
jsx: true;
};
};
};
rules: {
"solid/jsx-no-duplicate-props": 2;
"solid/jsx-no-undef": 2;
"solid/jsx-uses-vars": 2;
"solid/no-unknown-namespaces": 2;
"solid/no-innerhtml": 2;
"solid/jsx-no-script-url": 2;
"solid/components-return-once": 1;
"solid/no-destructure": 2;
"solid/prefer-for": 2;
"solid/reactivity": 1;
"solid/event-handlers": 1;
"solid/imports": 1;
"solid/style-prop": 1;
"solid/no-react-deps": 1;
"solid/no-react-specific-props": 1;
"solid/self-closing-comp": 1;
"solid/no-array-handlers": 0;
"solid/prefer-show": 0;
"solid/no-proxy-apis": 0;
"solid/prefer-classlist": 0;
};
};
export { recommended as default };

View file

@ -0,0 +1,89 @@
import { TSESLint } from '@typescript-eslint/utils';
declare const recommended: {
plugins: {
solid: {
meta: {
name: any;
version: any;
};
rules: {
"components-return-once": TSESLint.RuleModule<"noEarlyReturn" | "noConditionalReturn", [], unknown, TSESLint.RuleListener>;
"event-handlers": TSESLint.RuleModule<"naming" | "capitalization" | "nonstandard" | "make-handler" | "make-attr" | "detected-attr" | "spread-handler", [({
ignoreCase?: boolean;
warnOnSpread?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
imports: TSESLint.RuleModule<"prefer-source", [], unknown, TSESLint.RuleListener>;
"jsx-no-duplicate-props": TSESLint.RuleModule<"noDuplicateProps" | "noDuplicateClass" | "noDuplicateChildren", [({
ignoreCase?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-undef": TSESLint.RuleModule<"undefined" | "customDirectiveUndefined" | "autoImport", [({
allowGlobals?: boolean;
autoImport?: boolean;
typescriptEnabled?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-script-url": TSESLint.RuleModule<"noJSURL", [], unknown, TSESLint.RuleListener>;
"jsx-uses-vars": TSESLint.RuleModule<never, [], unknown, TSESLint.RuleListener>;
"no-destructure": TSESLint.RuleModule<"noDestructure", [], unknown, TSESLint.RuleListener>;
"no-innerhtml": TSESLint.RuleModule<"dangerous" | "conflict" | "notHtml" | "useInnerText" | "dangerouslySetInnerHTML", [({
allowStatic?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-proxy-apis": TSESLint.RuleModule<"noStore" | "spreadCall" | "spreadMember" | "proxyLiteral" | "mergeProps", [], unknown, TSESLint.RuleListener>;
"no-react-deps": TSESLint.RuleModule<"noUselessDep", [], unknown, TSESLint.RuleListener>;
"no-react-specific-props": TSESLint.RuleModule<"prefer" | "noUselessKey", [], unknown, TSESLint.RuleListener>;
"no-unknown-namespaces": TSESLint.RuleModule<"unknown" | "style" | "component" | "component-suggest", [({
allowedNamespaces: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-classlist": TSESLint.RuleModule<"preferClasslist", [({
classnames?: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-for": TSESLint.RuleModule<"preferFor" | "preferForOrIndex", [], unknown, TSESLint.RuleListener>;
"prefer-show": TSESLint.RuleModule<"preferShowAnd" | "preferShowTernary", [], unknown, TSESLint.RuleListener>;
reactivity: TSESLint.RuleModule<"noWrite" | "untrackedReactive" | "expectedFunctionGotExpression" | "badSignal" | "badUnnamedDerivedSignal" | "shouldDestructure" | "shouldAssign" | "noAsyncTrackedScope", [{
customReactiveFunctions: string[];
}], unknown, TSESLint.RuleListener>;
"self-closing-comp": TSESLint.RuleModule<"selfClose" | "dontSelfClose", [({
component?: "all" | "none";
html?: "all" | "void" | "none";
} | undefined)?], unknown, TSESLint.RuleListener>;
"style-prop": TSESLint.RuleModule<"kebabStyleProp" | "invalidStyleProp" | "numericStyleValue" | "stringStyle", [({
styleProps?: Array<string>;
allowString?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-array-handlers": TSESLint.RuleModule<"noArrayHandlers", [], unknown, TSESLint.RuleListener>;
};
};
};
languageOptions: {
sourceType: "module";
parserOptions: {
ecmaFeatures: {
jsx: true;
};
};
};
rules: {
"solid/jsx-no-duplicate-props": 2;
"solid/jsx-no-undef": 2;
"solid/jsx-uses-vars": 2;
"solid/no-unknown-namespaces": 2;
"solid/no-innerhtml": 2;
"solid/jsx-no-script-url": 2;
"solid/components-return-once": 1;
"solid/no-destructure": 2;
"solid/prefer-for": 2;
"solid/reactivity": 1;
"solid/event-handlers": 1;
"solid/imports": 1;
"solid/style-prop": 1;
"solid/no-react-deps": 1;
"solid/no-react-specific-props": 1;
"solid/self-closing-comp": 1;
"solid/no-array-handlers": 0;
"solid/prefer-show": 0;
"solid/no-proxy-apis": 0;
"solid/prefer-classlist": 0;
};
};
export { recommended as default };

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,5 @@
import {
require_recommended
} from "../chunk-5IRTCPIR.mjs";
export default require_recommended();
//# sourceMappingURL=recommended.mjs.map

View file

@ -0,0 +1 @@
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}

View file

@ -0,0 +1,83 @@
import { TSESLint } from '@typescript-eslint/utils';
declare const typescript: {
plugins: {
solid: {
meta: {
name: any;
version: any;
};
rules: {
"components-return-once": TSESLint.RuleModule<"noEarlyReturn" | "noConditionalReturn", [], unknown, TSESLint.RuleListener>;
"event-handlers": TSESLint.RuleModule<"naming" | "capitalization" | "nonstandard" | "make-handler" | "make-attr" | "detected-attr" | "spread-handler", [({
ignoreCase?: boolean;
warnOnSpread?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
imports: TSESLint.RuleModule<"prefer-source", [], unknown, TSESLint.RuleListener>;
"jsx-no-duplicate-props": TSESLint.RuleModule<"noDuplicateProps" | "noDuplicateClass" | "noDuplicateChildren", [({
ignoreCase?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-undef": TSESLint.RuleModule<"undefined" | "customDirectiveUndefined" | "autoImport", [({
allowGlobals?: boolean;
autoImport?: boolean;
typescriptEnabled?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-script-url": TSESLint.RuleModule<"noJSURL", [], unknown, TSESLint.RuleListener>;
"jsx-uses-vars": TSESLint.RuleModule<never, [], unknown, TSESLint.RuleListener>;
"no-destructure": TSESLint.RuleModule<"noDestructure", [], unknown, TSESLint.RuleListener>;
"no-innerhtml": TSESLint.RuleModule<"dangerous" | "conflict" | "notHtml" | "useInnerText" | "dangerouslySetInnerHTML", [({
allowStatic?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-proxy-apis": TSESLint.RuleModule<"noStore" | "spreadCall" | "spreadMember" | "proxyLiteral" | "mergeProps", [], unknown, TSESLint.RuleListener>;
"no-react-deps": TSESLint.RuleModule<"noUselessDep", [], unknown, TSESLint.RuleListener>;
"no-react-specific-props": TSESLint.RuleModule<"prefer" | "noUselessKey", [], unknown, TSESLint.RuleListener>;
"no-unknown-namespaces": TSESLint.RuleModule<"unknown" | "style" | "component" | "component-suggest", [({
allowedNamespaces: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-classlist": TSESLint.RuleModule<"preferClasslist", [({
classnames?: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-for": TSESLint.RuleModule<"preferFor" | "preferForOrIndex", [], unknown, TSESLint.RuleListener>;
"prefer-show": TSESLint.RuleModule<"preferShowAnd" | "preferShowTernary", [], unknown, TSESLint.RuleListener>;
reactivity: TSESLint.RuleModule<"noWrite" | "untrackedReactive" | "expectedFunctionGotExpression" | "badSignal" | "badUnnamedDerivedSignal" | "shouldDestructure" | "shouldAssign" | "noAsyncTrackedScope", [{
customReactiveFunctions: string[];
}], unknown, TSESLint.RuleListener>;
"self-closing-comp": TSESLint.RuleModule<"selfClose" | "dontSelfClose", [({
component?: "all" | "none";
html?: "all" | "void" | "none";
} | undefined)?], unknown, TSESLint.RuleListener>;
"style-prop": TSESLint.RuleModule<"kebabStyleProp" | "invalidStyleProp" | "numericStyleValue" | "stringStyle", [({
styleProps?: Array<string>;
allowString?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-array-handlers": TSESLint.RuleModule<"noArrayHandlers", [], unknown, TSESLint.RuleListener>;
};
};
};
rules: {
"solid/jsx-no-undef": [2, {
typescriptEnabled: boolean;
}];
"solid/no-unknown-namespaces": 0;
"solid/jsx-no-duplicate-props": 2;
"solid/jsx-uses-vars": 2;
"solid/no-innerhtml": 2;
"solid/jsx-no-script-url": 2;
"solid/components-return-once": 1;
"solid/no-destructure": 2;
"solid/prefer-for": 2;
"solid/reactivity": 1;
"solid/event-handlers": 1;
"solid/imports": 1;
"solid/style-prop": 1;
"solid/no-react-deps": 1;
"solid/no-react-specific-props": 1;
"solid/self-closing-comp": 1;
"solid/no-array-handlers": 0;
"solid/prefer-show": 0;
"solid/no-proxy-apis": 0;
"solid/prefer-classlist": 0;
};
};
export { typescript as default };

View file

@ -0,0 +1,83 @@
import { TSESLint } from '@typescript-eslint/utils';
declare const typescript: {
plugins: {
solid: {
meta: {
name: any;
version: any;
};
rules: {
"components-return-once": TSESLint.RuleModule<"noEarlyReturn" | "noConditionalReturn", [], unknown, TSESLint.RuleListener>;
"event-handlers": TSESLint.RuleModule<"naming" | "capitalization" | "nonstandard" | "make-handler" | "make-attr" | "detected-attr" | "spread-handler", [({
ignoreCase?: boolean;
warnOnSpread?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
imports: TSESLint.RuleModule<"prefer-source", [], unknown, TSESLint.RuleListener>;
"jsx-no-duplicate-props": TSESLint.RuleModule<"noDuplicateProps" | "noDuplicateClass" | "noDuplicateChildren", [({
ignoreCase?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-undef": TSESLint.RuleModule<"undefined" | "customDirectiveUndefined" | "autoImport", [({
allowGlobals?: boolean;
autoImport?: boolean;
typescriptEnabled?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-script-url": TSESLint.RuleModule<"noJSURL", [], unknown, TSESLint.RuleListener>;
"jsx-uses-vars": TSESLint.RuleModule<never, [], unknown, TSESLint.RuleListener>;
"no-destructure": TSESLint.RuleModule<"noDestructure", [], unknown, TSESLint.RuleListener>;
"no-innerhtml": TSESLint.RuleModule<"dangerous" | "conflict" | "notHtml" | "useInnerText" | "dangerouslySetInnerHTML", [({
allowStatic?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-proxy-apis": TSESLint.RuleModule<"noStore" | "spreadCall" | "spreadMember" | "proxyLiteral" | "mergeProps", [], unknown, TSESLint.RuleListener>;
"no-react-deps": TSESLint.RuleModule<"noUselessDep", [], unknown, TSESLint.RuleListener>;
"no-react-specific-props": TSESLint.RuleModule<"prefer" | "noUselessKey", [], unknown, TSESLint.RuleListener>;
"no-unknown-namespaces": TSESLint.RuleModule<"unknown" | "style" | "component" | "component-suggest", [({
allowedNamespaces: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-classlist": TSESLint.RuleModule<"preferClasslist", [({
classnames?: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-for": TSESLint.RuleModule<"preferFor" | "preferForOrIndex", [], unknown, TSESLint.RuleListener>;
"prefer-show": TSESLint.RuleModule<"preferShowAnd" | "preferShowTernary", [], unknown, TSESLint.RuleListener>;
reactivity: TSESLint.RuleModule<"noWrite" | "untrackedReactive" | "expectedFunctionGotExpression" | "badSignal" | "badUnnamedDerivedSignal" | "shouldDestructure" | "shouldAssign" | "noAsyncTrackedScope", [{
customReactiveFunctions: string[];
}], unknown, TSESLint.RuleListener>;
"self-closing-comp": TSESLint.RuleModule<"selfClose" | "dontSelfClose", [({
component?: "all" | "none";
html?: "all" | "void" | "none";
} | undefined)?], unknown, TSESLint.RuleListener>;
"style-prop": TSESLint.RuleModule<"kebabStyleProp" | "invalidStyleProp" | "numericStyleValue" | "stringStyle", [({
styleProps?: Array<string>;
allowString?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-array-handlers": TSESLint.RuleModule<"noArrayHandlers", [], unknown, TSESLint.RuleListener>;
};
};
};
rules: {
"solid/jsx-no-undef": [2, {
typescriptEnabled: boolean;
}];
"solid/no-unknown-namespaces": 0;
"solid/jsx-no-duplicate-props": 2;
"solid/jsx-uses-vars": 2;
"solid/no-innerhtml": 2;
"solid/jsx-no-script-url": 2;
"solid/components-return-once": 1;
"solid/no-destructure": 2;
"solid/prefer-for": 2;
"solid/reactivity": 1;
"solid/event-handlers": 1;
"solid/imports": 1;
"solid/style-prop": 1;
"solid/no-react-deps": 1;
"solid/no-react-specific-props": 1;
"solid/self-closing-comp": 1;
"solid/no-array-handlers": 0;
"solid/prefer-show": 0;
"solid/no-proxy-apis": 0;
"solid/prefer-classlist": 0;
};
};
export { typescript as default };

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,6 @@
import {
require_typescript
} from "../chunk-2RM2RZIF.mjs";
import "../chunk-5IRTCPIR.mjs";
export default require_typescript();
//# sourceMappingURL=typescript.mjs.map

View file

@ -0,0 +1 @@
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}

View file

@ -0,0 +1,291 @@
import { TSESLint } from '@typescript-eslint/utils';
/**
* FIXME: remove this comments and import when below issue is fixed.
* This import is necessary for type generation due to a bug in the TypeScript compiler.
* See: https://github.com/microsoft/TypeScript/issues/42873
*/
declare const pluginLegacy: {
rules: {
"components-return-once": TSESLint.RuleModule<"noEarlyReturn" | "noConditionalReturn", [], unknown, TSESLint.RuleListener>;
"event-handlers": TSESLint.RuleModule<"naming" | "capitalization" | "nonstandard" | "make-handler" | "make-attr" | "detected-attr" | "spread-handler", [({
ignoreCase?: boolean;
warnOnSpread?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
imports: TSESLint.RuleModule<"prefer-source", [], unknown, TSESLint.RuleListener>;
"jsx-no-duplicate-props": TSESLint.RuleModule<"noDuplicateProps" | "noDuplicateClass" | "noDuplicateChildren", [({
ignoreCase?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-undef": TSESLint.RuleModule<"undefined" | "customDirectiveUndefined" | "autoImport", [({
allowGlobals?: boolean;
autoImport?: boolean;
typescriptEnabled?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-script-url": TSESLint.RuleModule<"noJSURL", [], unknown, TSESLint.RuleListener>;
"jsx-uses-vars": TSESLint.RuleModule<never, [], unknown, TSESLint.RuleListener>;
"no-destructure": TSESLint.RuleModule<"noDestructure", [], unknown, TSESLint.RuleListener>;
"no-innerhtml": TSESLint.RuleModule<"dangerous" | "conflict" | "notHtml" | "useInnerText" | "dangerouslySetInnerHTML", [({
allowStatic?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-proxy-apis": TSESLint.RuleModule<"noStore" | "spreadCall" | "spreadMember" | "proxyLiteral" | "mergeProps", [], unknown, TSESLint.RuleListener>;
"no-react-deps": TSESLint.RuleModule<"noUselessDep", [], unknown, TSESLint.RuleListener>;
"no-react-specific-props": TSESLint.RuleModule<"prefer" | "noUselessKey", [], unknown, TSESLint.RuleListener>;
"no-unknown-namespaces": TSESLint.RuleModule<"unknown" | "style" | "component" | "component-suggest", [({
allowedNamespaces: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-classlist": TSESLint.RuleModule<"preferClasslist", [({
classnames?: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-for": TSESLint.RuleModule<"preferFor" | "preferForOrIndex", [], unknown, TSESLint.RuleListener>;
"prefer-show": TSESLint.RuleModule<"preferShowAnd" | "preferShowTernary", [], unknown, TSESLint.RuleListener>;
reactivity: TSESLint.RuleModule<"noWrite" | "untrackedReactive" | "expectedFunctionGotExpression" | "badSignal" | "badUnnamedDerivedSignal" | "shouldDestructure" | "shouldAssign" | "noAsyncTrackedScope", [{
customReactiveFunctions: string[];
}], unknown, TSESLint.RuleListener>;
"self-closing-comp": TSESLint.RuleModule<"selfClose" | "dontSelfClose", [({
component?: "all" | "none";
html?: "all" | "void" | "none";
} | undefined)?], unknown, TSESLint.RuleListener>;
"style-prop": TSESLint.RuleModule<"kebabStyleProp" | "invalidStyleProp" | "numericStyleValue" | "stringStyle", [({
styleProps?: Array<string>;
allowString?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-array-handlers": TSESLint.RuleModule<"noArrayHandlers", [], unknown, TSESLint.RuleListener>;
};
configs: {
recommended: {
plugins: string[];
env: {
browser: boolean;
es6: boolean;
};
parserOptions: {
ecmaFeatures: {
jsx: true;
};
};
rules: {
"solid/jsx-no-duplicate-props": 2;
"solid/jsx-no-undef": 2;
"solid/jsx-uses-vars": 2;
"solid/no-unknown-namespaces": 2;
"solid/no-innerhtml": 2;
"solid/jsx-no-script-url": 2;
"solid/components-return-once": 1;
"solid/no-destructure": 2;
"solid/prefer-for": 2;
"solid/reactivity": 1;
"solid/event-handlers": 1;
"solid/imports": 1;
"solid/style-prop": 1;
"solid/no-react-deps": 1;
"solid/no-react-specific-props": 1;
"solid/self-closing-comp": 1;
"solid/no-array-handlers": 0;
"solid/prefer-show": 0;
"solid/no-proxy-apis": 0;
"solid/prefer-classlist": 0;
};
};
typescript: {
plugins: string[];
env: {
browser: boolean;
es6: boolean;
};
parserOptions: {
sourceType: string;
};
rules: {
"solid/jsx-no-undef": [2, {
typescriptEnabled: boolean;
}];
"solid/no-unknown-namespaces": 0;
"solid/jsx-no-duplicate-props": 2;
"solid/jsx-uses-vars": 2;
"solid/no-innerhtml": 2;
"solid/jsx-no-script-url": 2;
"solid/components-return-once": 1;
"solid/no-destructure": 2;
"solid/prefer-for": 2;
"solid/reactivity": 1;
"solid/event-handlers": 1;
"solid/imports": 1;
"solid/style-prop": 1;
"solid/no-react-deps": 1;
"solid/no-react-specific-props": 1;
"solid/self-closing-comp": 1;
"solid/no-array-handlers": 0;
"solid/prefer-show": 0;
"solid/no-proxy-apis": 0;
"solid/prefer-classlist": 0;
};
};
"flat/recommended": {
plugins: {
solid: {
meta: {
name: any;
version: any;
};
rules: {
"components-return-once": TSESLint.RuleModule<"noEarlyReturn" | "noConditionalReturn", [], unknown, TSESLint.RuleListener>;
"event-handlers": TSESLint.RuleModule<"naming" | "capitalization" | "nonstandard" | "make-handler" | "make-attr" | "detected-attr" | "spread-handler", [({
ignoreCase?: boolean;
warnOnSpread?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
imports: TSESLint.RuleModule<"prefer-source", [], unknown, TSESLint.RuleListener>;
"jsx-no-duplicate-props": TSESLint.RuleModule<"noDuplicateProps" | "noDuplicateClass" | "noDuplicateChildren", [({
ignoreCase?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-undef": TSESLint.RuleModule<"undefined" | "customDirectiveUndefined" | "autoImport", [({
allowGlobals?: boolean;
autoImport?: boolean;
typescriptEnabled?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-script-url": TSESLint.RuleModule<"noJSURL", [], unknown, TSESLint.RuleListener>;
"jsx-uses-vars": TSESLint.RuleModule<never, [], unknown, TSESLint.RuleListener>;
"no-destructure": TSESLint.RuleModule<"noDestructure", [], unknown, TSESLint.RuleListener>;
"no-innerhtml": TSESLint.RuleModule<"dangerous" | "conflict" | "notHtml" | "useInnerText" | "dangerouslySetInnerHTML", [({
allowStatic?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-proxy-apis": TSESLint.RuleModule<"noStore" | "spreadCall" | "spreadMember" | "proxyLiteral" | "mergeProps", [], unknown, TSESLint.RuleListener>;
"no-react-deps": TSESLint.RuleModule<"noUselessDep", [], unknown, TSESLint.RuleListener>;
"no-react-specific-props": TSESLint.RuleModule<"prefer" | "noUselessKey", [], unknown, TSESLint.RuleListener>;
"no-unknown-namespaces": TSESLint.RuleModule<"unknown" | "style" | "component" | "component-suggest", [({
allowedNamespaces: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-classlist": TSESLint.RuleModule<"preferClasslist", [({
classnames?: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-for": TSESLint.RuleModule<"preferFor" | "preferForOrIndex", [], unknown, TSESLint.RuleListener>;
"prefer-show": TSESLint.RuleModule<"preferShowAnd" | "preferShowTernary", [], unknown, TSESLint.RuleListener>;
reactivity: TSESLint.RuleModule<"noWrite" | "untrackedReactive" | "expectedFunctionGotExpression" | "badSignal" | "badUnnamedDerivedSignal" | "shouldDestructure" | "shouldAssign" | "noAsyncTrackedScope", [{
customReactiveFunctions: string[];
}], unknown, TSESLint.RuleListener>;
"self-closing-comp": TSESLint.RuleModule<"selfClose" | "dontSelfClose", [({
component?: "all" | "none";
html?: "all" | "void" | "none";
} | undefined)?], unknown, TSESLint.RuleListener>;
"style-prop": TSESLint.RuleModule<"kebabStyleProp" | "invalidStyleProp" | "numericStyleValue" | "stringStyle", [({
styleProps?: Array<string>;
allowString?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-array-handlers": TSESLint.RuleModule<"noArrayHandlers", [], unknown, TSESLint.RuleListener>;
};
};
};
languageOptions: {
sourceType: "module";
parserOptions: {
ecmaFeatures: {
jsx: true;
};
};
};
rules: {
"solid/jsx-no-duplicate-props": 2;
"solid/jsx-no-undef": 2;
"solid/jsx-uses-vars": 2;
"solid/no-unknown-namespaces": 2;
"solid/no-innerhtml": 2;
"solid/jsx-no-script-url": 2;
"solid/components-return-once": 1;
"solid/no-destructure": 2;
"solid/prefer-for": 2;
"solid/reactivity": 1;
"solid/event-handlers": 1;
"solid/imports": 1;
"solid/style-prop": 1;
"solid/no-react-deps": 1;
"solid/no-react-specific-props": 1;
"solid/self-closing-comp": 1;
"solid/no-array-handlers": 0;
"solid/prefer-show": 0;
"solid/no-proxy-apis": 0;
"solid/prefer-classlist": 0;
};
};
"flat/typescript": {
plugins: {
solid: {
meta: {
name: any;
version: any;
};
rules: {
"components-return-once": TSESLint.RuleModule<"noEarlyReturn" | "noConditionalReturn", [], unknown, TSESLint.RuleListener>;
"event-handlers": TSESLint.RuleModule<"naming" | "capitalization" | "nonstandard" | "make-handler" | "make-attr" | "detected-attr" | "spread-handler", [({
ignoreCase?: boolean;
warnOnSpread?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
imports: TSESLint.RuleModule<"prefer-source", [], unknown, TSESLint.RuleListener>;
"jsx-no-duplicate-props": TSESLint.RuleModule<"noDuplicateProps" | "noDuplicateClass" | "noDuplicateChildren", [({
ignoreCase?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-undef": TSESLint.RuleModule<"undefined" | "customDirectiveUndefined" | "autoImport", [({
allowGlobals?: boolean;
autoImport?: boolean;
typescriptEnabled?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-script-url": TSESLint.RuleModule<"noJSURL", [], unknown, TSESLint.RuleListener>;
"jsx-uses-vars": TSESLint.RuleModule<never, [], unknown, TSESLint.RuleListener>;
"no-destructure": TSESLint.RuleModule<"noDestructure", [], unknown, TSESLint.RuleListener>;
"no-innerhtml": TSESLint.RuleModule<"dangerous" | "conflict" | "notHtml" | "useInnerText" | "dangerouslySetInnerHTML", [({
allowStatic?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-proxy-apis": TSESLint.RuleModule<"noStore" | "spreadCall" | "spreadMember" | "proxyLiteral" | "mergeProps", [], unknown, TSESLint.RuleListener>;
"no-react-deps": TSESLint.RuleModule<"noUselessDep", [], unknown, TSESLint.RuleListener>;
"no-react-specific-props": TSESLint.RuleModule<"prefer" | "noUselessKey", [], unknown, TSESLint.RuleListener>;
"no-unknown-namespaces": TSESLint.RuleModule<"unknown" | "style" | "component" | "component-suggest", [({
allowedNamespaces: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-classlist": TSESLint.RuleModule<"preferClasslist", [({
classnames?: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-for": TSESLint.RuleModule<"preferFor" | "preferForOrIndex", [], unknown, TSESLint.RuleListener>;
"prefer-show": TSESLint.RuleModule<"preferShowAnd" | "preferShowTernary", [], unknown, TSESLint.RuleListener>;
reactivity: TSESLint.RuleModule<"noWrite" | "untrackedReactive" | "expectedFunctionGotExpression" | "badSignal" | "badUnnamedDerivedSignal" | "shouldDestructure" | "shouldAssign" | "noAsyncTrackedScope", [{
customReactiveFunctions: string[];
}], unknown, TSESLint.RuleListener>;
"self-closing-comp": TSESLint.RuleModule<"selfClose" | "dontSelfClose", [({
component?: "all" | "none";
html?: "all" | "void" | "none";
} | undefined)?], unknown, TSESLint.RuleListener>;
"style-prop": TSESLint.RuleModule<"kebabStyleProp" | "invalidStyleProp" | "numericStyleValue" | "stringStyle", [({
styleProps?: Array<string>;
allowString?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-array-handlers": TSESLint.RuleModule<"noArrayHandlers", [], unknown, TSESLint.RuleListener>;
};
};
};
rules: {
"solid/jsx-no-undef": [2, {
typescriptEnabled: boolean;
}];
"solid/no-unknown-namespaces": 0;
"solid/jsx-no-duplicate-props": 2;
"solid/jsx-uses-vars": 2;
"solid/no-innerhtml": 2;
"solid/jsx-no-script-url": 2;
"solid/components-return-once": 1;
"solid/no-destructure": 2;
"solid/prefer-for": 2;
"solid/reactivity": 1;
"solid/event-handlers": 1;
"solid/imports": 1;
"solid/style-prop": 1;
"solid/no-react-deps": 1;
"solid/no-react-specific-props": 1;
"solid/self-closing-comp": 1;
"solid/no-array-handlers": 0;
"solid/prefer-show": 0;
"solid/no-proxy-apis": 0;
"solid/prefer-classlist": 0;
};
};
};
};
export { pluginLegacy as default };

View file

@ -0,0 +1,291 @@
import { TSESLint } from '@typescript-eslint/utils';
/**
* FIXME: remove this comments and import when below issue is fixed.
* This import is necessary for type generation due to a bug in the TypeScript compiler.
* See: https://github.com/microsoft/TypeScript/issues/42873
*/
declare const pluginLegacy: {
rules: {
"components-return-once": TSESLint.RuleModule<"noEarlyReturn" | "noConditionalReturn", [], unknown, TSESLint.RuleListener>;
"event-handlers": TSESLint.RuleModule<"naming" | "capitalization" | "nonstandard" | "make-handler" | "make-attr" | "detected-attr" | "spread-handler", [({
ignoreCase?: boolean;
warnOnSpread?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
imports: TSESLint.RuleModule<"prefer-source", [], unknown, TSESLint.RuleListener>;
"jsx-no-duplicate-props": TSESLint.RuleModule<"noDuplicateProps" | "noDuplicateClass" | "noDuplicateChildren", [({
ignoreCase?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-undef": TSESLint.RuleModule<"undefined" | "customDirectiveUndefined" | "autoImport", [({
allowGlobals?: boolean;
autoImport?: boolean;
typescriptEnabled?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-script-url": TSESLint.RuleModule<"noJSURL", [], unknown, TSESLint.RuleListener>;
"jsx-uses-vars": TSESLint.RuleModule<never, [], unknown, TSESLint.RuleListener>;
"no-destructure": TSESLint.RuleModule<"noDestructure", [], unknown, TSESLint.RuleListener>;
"no-innerhtml": TSESLint.RuleModule<"dangerous" | "conflict" | "notHtml" | "useInnerText" | "dangerouslySetInnerHTML", [({
allowStatic?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-proxy-apis": TSESLint.RuleModule<"noStore" | "spreadCall" | "spreadMember" | "proxyLiteral" | "mergeProps", [], unknown, TSESLint.RuleListener>;
"no-react-deps": TSESLint.RuleModule<"noUselessDep", [], unknown, TSESLint.RuleListener>;
"no-react-specific-props": TSESLint.RuleModule<"prefer" | "noUselessKey", [], unknown, TSESLint.RuleListener>;
"no-unknown-namespaces": TSESLint.RuleModule<"unknown" | "style" | "component" | "component-suggest", [({
allowedNamespaces: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-classlist": TSESLint.RuleModule<"preferClasslist", [({
classnames?: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-for": TSESLint.RuleModule<"preferFor" | "preferForOrIndex", [], unknown, TSESLint.RuleListener>;
"prefer-show": TSESLint.RuleModule<"preferShowAnd" | "preferShowTernary", [], unknown, TSESLint.RuleListener>;
reactivity: TSESLint.RuleModule<"noWrite" | "untrackedReactive" | "expectedFunctionGotExpression" | "badSignal" | "badUnnamedDerivedSignal" | "shouldDestructure" | "shouldAssign" | "noAsyncTrackedScope", [{
customReactiveFunctions: string[];
}], unknown, TSESLint.RuleListener>;
"self-closing-comp": TSESLint.RuleModule<"selfClose" | "dontSelfClose", [({
component?: "all" | "none";
html?: "all" | "void" | "none";
} | undefined)?], unknown, TSESLint.RuleListener>;
"style-prop": TSESLint.RuleModule<"kebabStyleProp" | "invalidStyleProp" | "numericStyleValue" | "stringStyle", [({
styleProps?: Array<string>;
allowString?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-array-handlers": TSESLint.RuleModule<"noArrayHandlers", [], unknown, TSESLint.RuleListener>;
};
configs: {
recommended: {
plugins: string[];
env: {
browser: boolean;
es6: boolean;
};
parserOptions: {
ecmaFeatures: {
jsx: true;
};
};
rules: {
"solid/jsx-no-duplicate-props": 2;
"solid/jsx-no-undef": 2;
"solid/jsx-uses-vars": 2;
"solid/no-unknown-namespaces": 2;
"solid/no-innerhtml": 2;
"solid/jsx-no-script-url": 2;
"solid/components-return-once": 1;
"solid/no-destructure": 2;
"solid/prefer-for": 2;
"solid/reactivity": 1;
"solid/event-handlers": 1;
"solid/imports": 1;
"solid/style-prop": 1;
"solid/no-react-deps": 1;
"solid/no-react-specific-props": 1;
"solid/self-closing-comp": 1;
"solid/no-array-handlers": 0;
"solid/prefer-show": 0;
"solid/no-proxy-apis": 0;
"solid/prefer-classlist": 0;
};
};
typescript: {
plugins: string[];
env: {
browser: boolean;
es6: boolean;
};
parserOptions: {
sourceType: string;
};
rules: {
"solid/jsx-no-undef": [2, {
typescriptEnabled: boolean;
}];
"solid/no-unknown-namespaces": 0;
"solid/jsx-no-duplicate-props": 2;
"solid/jsx-uses-vars": 2;
"solid/no-innerhtml": 2;
"solid/jsx-no-script-url": 2;
"solid/components-return-once": 1;
"solid/no-destructure": 2;
"solid/prefer-for": 2;
"solid/reactivity": 1;
"solid/event-handlers": 1;
"solid/imports": 1;
"solid/style-prop": 1;
"solid/no-react-deps": 1;
"solid/no-react-specific-props": 1;
"solid/self-closing-comp": 1;
"solid/no-array-handlers": 0;
"solid/prefer-show": 0;
"solid/no-proxy-apis": 0;
"solid/prefer-classlist": 0;
};
};
"flat/recommended": {
plugins: {
solid: {
meta: {
name: any;
version: any;
};
rules: {
"components-return-once": TSESLint.RuleModule<"noEarlyReturn" | "noConditionalReturn", [], unknown, TSESLint.RuleListener>;
"event-handlers": TSESLint.RuleModule<"naming" | "capitalization" | "nonstandard" | "make-handler" | "make-attr" | "detected-attr" | "spread-handler", [({
ignoreCase?: boolean;
warnOnSpread?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
imports: TSESLint.RuleModule<"prefer-source", [], unknown, TSESLint.RuleListener>;
"jsx-no-duplicate-props": TSESLint.RuleModule<"noDuplicateProps" | "noDuplicateClass" | "noDuplicateChildren", [({
ignoreCase?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-undef": TSESLint.RuleModule<"undefined" | "customDirectiveUndefined" | "autoImport", [({
allowGlobals?: boolean;
autoImport?: boolean;
typescriptEnabled?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-script-url": TSESLint.RuleModule<"noJSURL", [], unknown, TSESLint.RuleListener>;
"jsx-uses-vars": TSESLint.RuleModule<never, [], unknown, TSESLint.RuleListener>;
"no-destructure": TSESLint.RuleModule<"noDestructure", [], unknown, TSESLint.RuleListener>;
"no-innerhtml": TSESLint.RuleModule<"dangerous" | "conflict" | "notHtml" | "useInnerText" | "dangerouslySetInnerHTML", [({
allowStatic?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-proxy-apis": TSESLint.RuleModule<"noStore" | "spreadCall" | "spreadMember" | "proxyLiteral" | "mergeProps", [], unknown, TSESLint.RuleListener>;
"no-react-deps": TSESLint.RuleModule<"noUselessDep", [], unknown, TSESLint.RuleListener>;
"no-react-specific-props": TSESLint.RuleModule<"prefer" | "noUselessKey", [], unknown, TSESLint.RuleListener>;
"no-unknown-namespaces": TSESLint.RuleModule<"unknown" | "style" | "component" | "component-suggest", [({
allowedNamespaces: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-classlist": TSESLint.RuleModule<"preferClasslist", [({
classnames?: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-for": TSESLint.RuleModule<"preferFor" | "preferForOrIndex", [], unknown, TSESLint.RuleListener>;
"prefer-show": TSESLint.RuleModule<"preferShowAnd" | "preferShowTernary", [], unknown, TSESLint.RuleListener>;
reactivity: TSESLint.RuleModule<"noWrite" | "untrackedReactive" | "expectedFunctionGotExpression" | "badSignal" | "badUnnamedDerivedSignal" | "shouldDestructure" | "shouldAssign" | "noAsyncTrackedScope", [{
customReactiveFunctions: string[];
}], unknown, TSESLint.RuleListener>;
"self-closing-comp": TSESLint.RuleModule<"selfClose" | "dontSelfClose", [({
component?: "all" | "none";
html?: "all" | "void" | "none";
} | undefined)?], unknown, TSESLint.RuleListener>;
"style-prop": TSESLint.RuleModule<"kebabStyleProp" | "invalidStyleProp" | "numericStyleValue" | "stringStyle", [({
styleProps?: Array<string>;
allowString?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-array-handlers": TSESLint.RuleModule<"noArrayHandlers", [], unknown, TSESLint.RuleListener>;
};
};
};
languageOptions: {
sourceType: "module";
parserOptions: {
ecmaFeatures: {
jsx: true;
};
};
};
rules: {
"solid/jsx-no-duplicate-props": 2;
"solid/jsx-no-undef": 2;
"solid/jsx-uses-vars": 2;
"solid/no-unknown-namespaces": 2;
"solid/no-innerhtml": 2;
"solid/jsx-no-script-url": 2;
"solid/components-return-once": 1;
"solid/no-destructure": 2;
"solid/prefer-for": 2;
"solid/reactivity": 1;
"solid/event-handlers": 1;
"solid/imports": 1;
"solid/style-prop": 1;
"solid/no-react-deps": 1;
"solid/no-react-specific-props": 1;
"solid/self-closing-comp": 1;
"solid/no-array-handlers": 0;
"solid/prefer-show": 0;
"solid/no-proxy-apis": 0;
"solid/prefer-classlist": 0;
};
};
"flat/typescript": {
plugins: {
solid: {
meta: {
name: any;
version: any;
};
rules: {
"components-return-once": TSESLint.RuleModule<"noEarlyReturn" | "noConditionalReturn", [], unknown, TSESLint.RuleListener>;
"event-handlers": TSESLint.RuleModule<"naming" | "capitalization" | "nonstandard" | "make-handler" | "make-attr" | "detected-attr" | "spread-handler", [({
ignoreCase?: boolean;
warnOnSpread?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
imports: TSESLint.RuleModule<"prefer-source", [], unknown, TSESLint.RuleListener>;
"jsx-no-duplicate-props": TSESLint.RuleModule<"noDuplicateProps" | "noDuplicateClass" | "noDuplicateChildren", [({
ignoreCase?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-undef": TSESLint.RuleModule<"undefined" | "customDirectiveUndefined" | "autoImport", [({
allowGlobals?: boolean;
autoImport?: boolean;
typescriptEnabled?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"jsx-no-script-url": TSESLint.RuleModule<"noJSURL", [], unknown, TSESLint.RuleListener>;
"jsx-uses-vars": TSESLint.RuleModule<never, [], unknown, TSESLint.RuleListener>;
"no-destructure": TSESLint.RuleModule<"noDestructure", [], unknown, TSESLint.RuleListener>;
"no-innerhtml": TSESLint.RuleModule<"dangerous" | "conflict" | "notHtml" | "useInnerText" | "dangerouslySetInnerHTML", [({
allowStatic?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-proxy-apis": TSESLint.RuleModule<"noStore" | "spreadCall" | "spreadMember" | "proxyLiteral" | "mergeProps", [], unknown, TSESLint.RuleListener>;
"no-react-deps": TSESLint.RuleModule<"noUselessDep", [], unknown, TSESLint.RuleListener>;
"no-react-specific-props": TSESLint.RuleModule<"prefer" | "noUselessKey", [], unknown, TSESLint.RuleListener>;
"no-unknown-namespaces": TSESLint.RuleModule<"unknown" | "style" | "component" | "component-suggest", [({
allowedNamespaces: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-classlist": TSESLint.RuleModule<"preferClasslist", [({
classnames?: Array<string>;
} | undefined)?], unknown, TSESLint.RuleListener>;
"prefer-for": TSESLint.RuleModule<"preferFor" | "preferForOrIndex", [], unknown, TSESLint.RuleListener>;
"prefer-show": TSESLint.RuleModule<"preferShowAnd" | "preferShowTernary", [], unknown, TSESLint.RuleListener>;
reactivity: TSESLint.RuleModule<"noWrite" | "untrackedReactive" | "expectedFunctionGotExpression" | "badSignal" | "badUnnamedDerivedSignal" | "shouldDestructure" | "shouldAssign" | "noAsyncTrackedScope", [{
customReactiveFunctions: string[];
}], unknown, TSESLint.RuleListener>;
"self-closing-comp": TSESLint.RuleModule<"selfClose" | "dontSelfClose", [({
component?: "all" | "none";
html?: "all" | "void" | "none";
} | undefined)?], unknown, TSESLint.RuleListener>;
"style-prop": TSESLint.RuleModule<"kebabStyleProp" | "invalidStyleProp" | "numericStyleValue" | "stringStyle", [({
styleProps?: Array<string>;
allowString?: boolean;
} | undefined)?], unknown, TSESLint.RuleListener>;
"no-array-handlers": TSESLint.RuleModule<"noArrayHandlers", [], unknown, TSESLint.RuleListener>;
};
};
};
rules: {
"solid/jsx-no-undef": [2, {
typescriptEnabled: boolean;
}];
"solid/no-unknown-namespaces": 0;
"solid/jsx-no-duplicate-props": 2;
"solid/jsx-uses-vars": 2;
"solid/no-innerhtml": 2;
"solid/jsx-no-script-url": 2;
"solid/components-return-once": 1;
"solid/no-destructure": 2;
"solid/prefer-for": 2;
"solid/reactivity": 1;
"solid/event-handlers": 1;
"solid/imports": 1;
"solid/style-prop": 1;
"solid/no-react-deps": 1;
"solid/no-react-specific-props": 1;
"solid/self-closing-comp": 1;
"solid/no-array-handlers": 0;
"solid/prefer-show": 0;
"solid/no-proxy-apis": 0;
"solid/prefer-classlist": 0;
};
};
};
};
export { pluginLegacy as default };

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,49 @@
import {
require_typescript
} from "./chunk-2RM2RZIF.mjs";
import {
__commonJS,
__toESM,
init_plugin,
plugin,
require_recommended
} from "./chunk-5IRTCPIR.mjs";
// src/index.ts
var require_src = __commonJS({
"src/index.ts"(exports, module) {
init_plugin();
var import_recommended = __toESM(require_recommended());
var import_typescript = __toESM(require_typescript());
var pluginLegacy = {
rules: plugin.rules,
configs: {
recommended: {
plugins: ["solid"],
env: {
browser: true,
es6: true
},
parserOptions: import_recommended.default.languageOptions.parserOptions,
rules: import_recommended.default.rules
},
typescript: {
plugins: ["solid"],
env: {
browser: true,
es6: true
},
parserOptions: {
sourceType: "module"
},
rules: import_typescript.default.rules
},
"flat/recommended": import_recommended.default,
"flat/typescript": import_typescript.default
}
};
module.exports = pluginLegacy;
}
});
export default require_src();
//# sourceMappingURL=index.mjs.map

View file

@ -0,0 +1 @@
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { plugin } from \"./plugin\";\nimport recommendedConfig from \"./configs/recommended\";\nimport typescriptConfig from \"./configs/typescript\";\n\nconst pluginLegacy = {\n rules: plugin.rules,\n configs: {\n recommended: {\n plugins: [\"solid\"],\n env: {\n browser: true,\n es6: true,\n },\n parserOptions: recommendedConfig.languageOptions.parserOptions,\n rules: recommendedConfig.rules,\n },\n typescript: {\n plugins: [\"solid\"],\n env: {\n browser: true,\n es6: true,\n },\n parserOptions: {\n sourceType: \"module\",\n },\n rules: typescriptConfig.rules,\n },\n \"flat/recommended\": recommendedConfig,\n \"flat/typescript\": typescriptConfig,\n },\n};\n\n// Must be `export = ` for eslint to load everything\nexport = pluginLegacy;\n"],"mappings":";;;;;;;;;;;;AAAA;AAAA;AAQA;AACA,6BAA8B;AAC9B,4BAA6B;AAE7B,QAAM,eAAe;AAAA,MACnB,OAAO,OAAO;AAAA,MACd,SAAS;AAAA,QACP,aAAa;AAAA,UACX,SAAS,CAAC,OAAO;AAAA,UACjB,KAAK;AAAA,YACH,SAAS;AAAA,YACT,KAAK;AAAA,UACP;AAAA,UACA,eAAe,mBAAAA,QAAkB,gBAAgB;AAAA,UACjD,OAAO,mBAAAA,QAAkB;AAAA,QAC3B;AAAA,QACA,YAAY;AAAA,UACV,SAAS,CAAC,OAAO;AAAA,UACjB,KAAK;AAAA,YACH,SAAS;AAAA,YACT,KAAK;AAAA,UACP;AAAA,UACA,eAAe;AAAA,YACb,YAAY;AAAA,UACd;AAAA,UACA,OAAO,kBAAAC,QAAiB;AAAA,QAC1B;AAAA,QACA,oBAAoB,mBAAAD;AAAA,QACpB,mBAAmB,kBAAAC;AAAA,MACrB;AAAA,IACF;AAGA,qBAAS;AAAA;AAAA;","names":["recommendedConfig","typescriptConfig"]}

View file

@ -0,0 +1,64 @@
{
"name": "eslint-plugin-solid",
"version": "0.14.5-pulse.1",
"description": "Solid-specific linting rules for ESLint.",
"keywords": [
"eslint",
"eslintplugin",
"solid",
"solidjs",
"reactivity"
],
"repository": "https://github.com/solidjs-community/eslint-plugin-solid",
"license": "MIT",
"author": "Josh Wilson <joshwilsonvu@gmail.com>",
"exports": {
".": {
"types": {
"import": "./dist/index.d.mts",
"require": "./dist/index.d.ts"
},
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./configs/recommended": {
"types": {
"import": "./dist/configs/recommended.d.mts",
"require": "./dist/configs/recommended.d.ts"
},
"import": "./dist/configs/recommended.mjs",
"require": "./dist/configs/recommended.js"
},
"./configs/typescript": {
"types": {
"import": "./dist/configs/typescript.d.mts",
"require": "./dist/configs/typescript.d.ts"
},
"import": "./dist/configs/typescript.mjs",
"require": "./dist/configs/typescript.js"
},
"./package.json": "./package.json"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist",
"README.md",
"LICENSE"
],
"dependencies": {
"@typescript-eslint/utils": "^7.13.1 || ^8.0.0",
"estraverse": "^5.3.0",
"is-html": "^2.0.0",
"kebab-case": "^1.0.2",
"known-css-properties": "^0.30.0",
"style-to-object": "^1.0.6"
},
"peerDependencies": {
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0",
"typescript": ">=4.8.4"
},
"engines": {
"node": ">=18.0.0"
}
}