eslint-plugin-qwik 1.17.2 → 1.19.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/dist/index.js +11 -11
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ export const Person = component$(() => {
|
|
|
23
23
|
<ul>
|
|
24
24
|
{Object.keys(person).map((color) => (
|
|
25
25
|
<li key={\`person-\${key}\`}>{person[key]}</li>
|
|
26
|
-
)}
|
|
26
|
+
))}
|
|
27
27
|
</ul>
|
|
28
28
|
);
|
|
29
29
|
});`.trim(),vE=`
|
|
@@ -40,7 +40,7 @@ export const Person = component$(() => {
|
|
|
40
40
|
<ul>
|
|
41
41
|
{Object.keys(person).map((color) => (
|
|
42
42
|
<li>{person[key]}</li>
|
|
43
|
-
)}
|
|
43
|
+
))}
|
|
44
44
|
</ul>
|
|
45
45
|
);
|
|
46
46
|
});`.trim(),hE=`
|
|
@@ -61,7 +61,7 @@ export const Person = component$(() => {
|
|
|
61
61
|
<Card value={person[key]} />
|
|
62
62
|
<Summary value={person[key]} />
|
|
63
63
|
</Fragment>
|
|
64
|
-
)}
|
|
64
|
+
))}
|
|
65
65
|
);
|
|
66
66
|
});`.trim(),bE=`
|
|
67
67
|
import { component$ } from '@builder.io/qwik';
|
|
@@ -81,7 +81,7 @@ export const Person = component$(() => {
|
|
|
81
81
|
<Card value={person[key]} />
|
|
82
82
|
<Summary value={person[key]} />
|
|
83
83
|
</>
|
|
84
|
-
)}
|
|
84
|
+
))}
|
|
85
85
|
);
|
|
86
86
|
});`.trim(),xE=`
|
|
87
87
|
import { component$ } from '@builder.io/qwik';
|
|
@@ -93,7 +93,7 @@ export const ColorList = component$(() => {
|
|
|
93
93
|
<ul>
|
|
94
94
|
{colors.map((color) => (
|
|
95
95
|
<li key={\`color-\${color}\`}>{color}</li>
|
|
96
|
-
)}
|
|
96
|
+
))}
|
|
97
97
|
</ul>
|
|
98
98
|
);
|
|
99
99
|
});`.trim(),SE=`
|
|
@@ -106,7 +106,7 @@ export const ColorList = component$(() => {
|
|
|
106
106
|
<ul>
|
|
107
107
|
{colors.map((color) => (
|
|
108
108
|
<li>{color}</li>
|
|
109
|
-
)}
|
|
109
|
+
))}
|
|
110
110
|
</ul>
|
|
111
111
|
);
|
|
112
112
|
});`.trim(),EE=`
|
|
@@ -121,7 +121,7 @@ export const ColorList = component$(() => {
|
|
|
121
121
|
<h2>{color}</h2>
|
|
122
122
|
<p>The color "\${color}" is a great color.</p>
|
|
123
123
|
</Fragment>
|
|
124
|
-
)}
|
|
124
|
+
))}
|
|
125
125
|
);
|
|
126
126
|
});`.trim(),wE=`
|
|
127
127
|
import { component$ } from '@builder.io/qwik';
|
|
@@ -135,7 +135,7 @@ export const ColorList = component$(() => {
|
|
|
135
135
|
<h2>{color}</h2>
|
|
136
136
|
<p>The color "\${color}" is a great color.</p>
|
|
137
137
|
</>
|
|
138
|
-
)}
|
|
138
|
+
))}
|
|
139
139
|
);
|
|
140
140
|
});`.trim();var qE=`
|
|
141
141
|
import { component$ } from '@builder.io/qwik';
|
|
@@ -147,11 +147,11 @@ export const ColorList = component$(() => {
|
|
|
147
147
|
<ul>
|
|
148
148
|
{colors.map((color) => (
|
|
149
149
|
<li key="not-a-good-idea">{color}</li>
|
|
150
|
-
)}
|
|
150
|
+
))}
|
|
151
151
|
</ul>
|
|
152
152
|
);
|
|
153
153
|
});`.trim();var dp=require("@typescript-eslint/utils");var{getStaticValue:Bh}=dp.ASTUtils,Jh=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,mp={meta:{type:"problem",docs:{recommended:"error",description:"Disallow javascript: URLs.",url:"https://qwik.dev/docs/advanced/eslint/#jsx-no-script-url"},schema:[],messages:{noJSURL:"For security, don't use javascript: URLs. Use event handlers instead if you can."}},create(r){let e=r.sourceCode??r.getSourceCode();return{JSXAttribute(t){if(t.name.type==="JSXIdentifier"&&t.value){let n=Bh(t.value.type==="JSXExpressionContainer"?t.value.expression:t.value,e.getScope?e.getScope(t):r.getScope());n&&typeof n.value=="string"&&Jh.test(n.value)&&r.report({node:t.value,messageId:"noJSURL"})}}}}},OE=`
|
|
154
|
-
<button onClick$={() => alert('open the door please')>ring</button>`.trim(),$E=`
|
|
154
|
+
<button onClick$={() => alert('open the door please')}>ring</button>`.trim(),$E=`
|
|
155
155
|
<button onClick$="javascript:alert('open the door please')">ring</button>`.trim();var yp={loader$:!0,routeLoader$:!0,routeAction$:!0,routeHandler$:!0},Wh={...yp,action$:!0,globalAction$:!0},gp={meta:{type:"problem",docs:{description:"Detect declaration location of loader$.",recommended:!0,url:"https://qwik.dev/docs/advanced/eslint/#loader-location"},schema:[{type:"object",properties:{routesDir:{type:"string",default:"src/routes"}},additionalProperties:!1}],messages:{invalidLoaderLocation:`'{{fnName}}() are typically declared in route boundary files such as layout.tsx, index.tsx and plugin.tsx inside the {{routesDir}} directory
|
|
156
156
|
(docs: https://qwik.dev/docs/route-loader/).
|
|
157
157
|
|
|
@@ -374,4 +374,4 @@ import Image from '~/media/image.png';
|
|
|
374
374
|
<Image />`.trim(),Dw=`
|
|
375
375
|
<img src="/image.png">`.trim(),Uw=`
|
|
376
376
|
<img width="200" height="600" src="/static/images/portrait-01.webp">`.trim(),Bw=`
|
|
377
|
-
<img src="/static/images/portrait-01.webp">`.trim();function sb(r){let e=r.lastIndexOf("."),t=r.lastIndexOf("/");return r=r.substring(t+1,e),`Img${ub(r)}`}function ub(r){return`${r}`.toLowerCase().replace(new RegExp(/[-_]+/,"g")," ").replace(new RegExp(/[^\w\s]/,"g"),"").replace(new RegExp(/\s+(.)(\w*)/,"g"),(e,t,n)=>`${t.toUpperCase()+n}`).replace(new RegExp(/\w/),e=>e.toUpperCase())}var Ap={meta:{type:"suggestion",docs:{description:"Detect useVisibleTask$() functions.",recommended:!0,url:"https://qwik.dev/docs/guides/best-practices/#use-usevisibletask-as-a-last-resort"},messages:{noUseVisibleTask:"useVisibleTask$() runs eagerly and blocks the main thread, preventing user interaction until the task is finished. Consider using useTask$(), useOn(), useOnDocument(), or useOnWindow() instead. If you have to use a useVisibleTask$(), you can disable the warning with a '// eslint-disable-next-line qwik/no-use-visible-task' comment."}},create(r){return{CallExpression(e){if(e.callee.type!=="Identifier")return;e.callee.name==="useVisibleTask$"&&r.report({node:e.callee,messageId:"noUseVisibleTask"})}}}};var Cn={name:"eslint-plugin-qwik",description:"An Open-Source sub-framework designed with a focus on server-side-rendering, lazy-loading, and styling/animation.",version:"1.
|
|
377
|
+
<img src="/static/images/portrait-01.webp">`.trim();function sb(r){let e=r.lastIndexOf("."),t=r.lastIndexOf("/");return r=r.substring(t+1,e),`Img${ub(r)}`}function ub(r){return`${r}`.toLowerCase().replace(new RegExp(/[-_]+/,"g")," ").replace(new RegExp(/[^\w\s]/,"g"),"").replace(new RegExp(/\s+(.)(\w*)/,"g"),(e,t,n)=>`${t.toUpperCase()+n}`).replace(new RegExp(/\w/),e=>e.toUpperCase())}var Ap={meta:{type:"suggestion",docs:{description:"Detect useVisibleTask$() functions.",recommended:!0,url:"https://qwik.dev/docs/guides/best-practices/#use-usevisibletask-as-a-last-resort"},messages:{noUseVisibleTask:"useVisibleTask$() runs eagerly and blocks the main thread, preventing user interaction until the task is finished. Consider using useTask$(), useOn(), useOnDocument(), or useOnWindow() instead. If you have to use a useVisibleTask$(), you can disable the warning with a '// eslint-disable-next-line qwik/no-use-visible-task' comment."}},create(r){return{CallExpression(e){if(e.callee.type!=="Identifier")return;e.callee.name==="useVisibleTask$"&&r.report({node:e.callee,messageId:"noUseVisibleTask"})}}}};var Cn={name:"eslint-plugin-qwik",description:"An Open-Source sub-framework designed with a focus on server-side-rendering, lazy-loading, and styling/animation.",version:"1.19.0",author:"Builder Team",bugs:"https://github.com/QwikDev/qwik/issues",dependencies:{"@typescript-eslint/utils":"^8.38.0","jsx-ast-utils":"^3.3.5"},devDependencies:{"@builder.io/qwik":"workspace:^","@builder.io/qwik-city":"workspace:^","@types/estree":"1.0.8","@typescript-eslint/rule-tester":"8.38.0",redent:"4.0.0"},engines:{node:">=16.8.0 <18.0.0 || >=18.11"},files:["README.md","dist"],homepage:"https://github.com/QwikDev/qwik#readme",keywords:["builder.io","eslint","qwik"],license:"MIT",main:"dist/index.js",peerDependencies:{eslint:"^8.57.0 || ^9.0.0"},repository:{type:"git",url:"https://github.com/QwikDev/qwik.git",directory:"packages/eslint-rules"},scripts:{test:"cd ../..; ./node_modules/.bin/vitest packages/eslint-plugin-qwik/qwik.unit.ts"}};var Tp={"valid-lexical-scope":Sp,"use-method-usage":xp,"no-react-props":vp,"loader-location":gp,"prefer-classlist":hp,"jsx-no-script-url":mp,"jsx-key":fp,"unused-server":bp,"jsx-img":Pp,"jsx-a":Ln,"no-use-visible-task":Ap},Op={"qwik/valid-lexical-scope":"error","qwik/use-method-usage":"error","qwik/no-react-props":"error","qwik/loader-location":"warn","qwik/prefer-classlist":"warn","qwik/jsx-no-script-url":"warn","qwik/jsx-key":"warn","qwik/unused-server":"error","qwik/jsx-img":"warn","qwik/jsx-a":"warn","qwik/no-use-visible-task":"warn"},$p={"qwik/valid-lexical-scope":"error","qwik/use-method-usage":"error","qwik/no-react-props":"error","qwik/loader-location":"error","qwik/prefer-classlist":"error","qwik/jsx-no-script-url":"error","qwik/jsx-key":"error","qwik/unused-server":"error","qwik/jsx-img":"error","qwik/jsx-a":"error","qwik/no-use-visible-task":"warn"},pb={recommended:{plugins:["qwik"],rules:Op},strict:{plugins:["qwik"],rules:$p}},kn={configs:{get recommended(){return cb},get strict(){return fb}},meta:{name:Cn.name,version:Cn.version},rules:Tp},cb=[{plugins:{qwik:kn},rules:Op}],fb=[{plugins:{qwik:kn},rules:$p}];0&&(module.exports={configs,qwikEslint9Plugin,rules});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-qwik",
|
|
3
3
|
"description": "An Open-Source sub-framework designed with a focus on server-side-rendering, lazy-loading, and styling/animation.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.19.0",
|
|
5
5
|
"author": "Builder Team",
|
|
6
6
|
"bugs": "https://github.com/QwikDev/qwik/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"@types/estree": "1.0.8",
|
|
13
13
|
"@typescript-eslint/rule-tester": "8.38.0",
|
|
14
14
|
"redent": "4.0.0",
|
|
15
|
-
"@builder.io/qwik": "^1.
|
|
16
|
-
"@builder.io/qwik-city": "^1.
|
|
15
|
+
"@builder.io/qwik": "^1.19.0",
|
|
16
|
+
"@builder.io/qwik-city": "^1.19.0"
|
|
17
17
|
},
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">=16.8.0 <18.0.0 || >=18.11"
|