eslint-plugin-qwik 1.15.0 → 1.16.1

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -280,7 +280,7 @@ export const useCounter = () => {
280
280
  export const Counter = (() => {
281
281
  const count = useSignal(0);
282
282
  });
283
- `.trim();var xr=Y(require("@typescript-eslint/utils/eslint-utils")),X=Y(require("typescript"));var Tp=Y(Ap(),1);function $n(r){let e=(0,Tp.default)(r);if(e===0)return r;let t=new RegExp(`^[ \\t]{${e}}`,"gm");return r.replace(t,"")}function _n(r,e=1,t={}){let{indent:n=" ",includeEmptyLines:o=!1}=t;if(typeof r!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof r}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(e<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${e}\``);if(typeof n!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n}\``);if(e===0)return r;let i=o?/^/gm:/^(?!\s*$)/gm;return r.replace(i,n.repeat(e))}function Cn(r,e=0,t={}){return _n($n(r),e,t)}var ab=xr.RuleCreator(r=>`https://qwik.dev/docs/advanced/eslint/#${r}`),Op=ab({name:"valid-lexical-scope",defaultOptions:[{allowAny:!0}],meta:{type:"problem",docs:{description:"Used the tsc typechecker to detect the capture of unserializable data in dollar ($) scopes.",recommended:"recommended"},schema:[{type:"object",properties:{allowAny:{type:"boolean"}},default:{allowAny:!0}}],messages:{referencesOutside:`When referencing "{{varName}}" inside a different scope ({{dollarName}}), Qwik needs to serialize the value, however {{reason}}.
283
+ `.trim();var xr=Y(require("@typescript-eslint/utils/eslint-utils")),X=Y(require("typescript"));var Tp=Y(Ap(),1);function $n(r){let e=(0,Tp.default)(r);if(e===0)return r;let t=new RegExp(`^[ \\t]{${e}}`,"gm");return r.replace(t,"")}function _n(r,e=1,t={}){let{indent:n=" ",includeEmptyLines:o=!1}=t;if(typeof r!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof r}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(e<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${e}\``);if(typeof n!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n}\``);if(e===0)return r;let i=o?/^/gm:/^(?!\s*$)/gm;return r.replace(i,n.repeat(e))}function Cn(r,e=0,t={}){return _n($n(r),e,t)}var ab=xr.RuleCreator(r=>`https://qwik.dev/docs/advanced/eslint/#${r}`),Op=ab({name:"valid-lexical-scope",defaultOptions:[{allowAny:!0}],meta:{type:"problem",docs:{description:"Used the tsc typechecker to detect the capture of unserializable data in dollar ($) scopes.",recommended:"recommended"},schema:[{type:"object",properties:{allowAny:{type:"boolean"}},additionalProperties:!1,default:{allowAny:!0}}],messages:{referencesOutside:`When referencing "{{varName}}" inside a different scope ({{dollarName}}), Qwik needs to serialize the value, however {{reason}}.
284
284
  Check out https://qwik.dev/docs/advanced/dollar/ for more details.`,invalidJsxDollar:`Using "{{varName}}" as an event handler, however functions are not serializable.
285
285
  Did you mean to wrap it in \`$()\`?
286
286
 
@@ -374,4 +374,4 @@ import Image from '~/media/image.png';
374
374
  <Image />`.trim(),eq=`
375
375
  <img src="/image.png">`.trim(),rq=`
376
376
  <img width="200" height="600" src="/static/images/portrait-01.webp">`.trim(),tq=`
377
- <img src="/static/images/portrait-01.webp">`.trim();function vb(r){let e=r.lastIndexOf("."),t=r.lastIndexOf("/");return r=r.substring(t+1,e),`Img${hb(r)}`}function hb(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 kp={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 In={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.15.0",author:"Builder Team",bugs:"https://github.com/QwikDev/qwik/issues",dependencies:{"@typescript-eslint/utils":"^8.31.0","jsx-ast-utils":"^3.3.5"},devDependencies:{"@builder.io/qwik":"workspace:^","@builder.io/qwik-city":"workspace:^","@types/estree":"1.0.5","@typescript-eslint/rule-tester":"8.14.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 Fp={"valid-lexical-scope":Op,"use-method-usage":qp,"no-react-props":Sp,"loader-location":xp,"prefer-classlist":Ep,"jsx-no-script-url":hp,"jsx-key":gp,"unused-server":wp,"jsx-img":Ip,"jsx-a":Ln,"no-use-visible-task":kp},Np={"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"},Rp={"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"},xb={recommended:{plugins:["qwik"],rules:Np},strict:{plugins:["qwik"],rules:Rp}},kn={configs:{get recommended(){return Sb},get strict(){return Eb}},meta:{name:In.name,version:In.version},rules:Fp},Sb=[{plugins:{qwik:kn},rules:Np}],Eb=[{plugins:{qwik:kn},rules:Rp}];0&&(module.exports={configs,qwikEslint9Plugin,rules});
377
+ <img src="/static/images/portrait-01.webp">`.trim();function vb(r){let e=r.lastIndexOf("."),t=r.lastIndexOf("/");return r=r.substring(t+1,e),`Img${hb(r)}`}function hb(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 kp={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 In={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.16.1",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 Fp={"valid-lexical-scope":Op,"use-method-usage":qp,"no-react-props":Sp,"loader-location":xp,"prefer-classlist":Ep,"jsx-no-script-url":hp,"jsx-key":gp,"unused-server":wp,"jsx-img":Ip,"jsx-a":Ln,"no-use-visible-task":kp},Np={"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"},Rp={"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"},xb={recommended:{plugins:["qwik"],rules:Np},strict:{plugins:["qwik"],rules:Rp}},kn={configs:{get recommended(){return Sb},get strict(){return Eb}},meta:{name:In.name,version:In.version},rules:Fp},Sb=[{plugins:{qwik:kn},rules:Np}],Eb=[{plugins:{qwik:kn},rules:Rp}];0&&(module.exports={configs,qwikEslint9Plugin,rules});
package/package.json CHANGED
@@ -1,19 +1,19 @@
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.15.0",
4
+ "version": "1.16.1",
5
5
  "author": "Builder Team",
6
6
  "bugs": "https://github.com/QwikDev/qwik/issues",
7
7
  "dependencies": {
8
- "@typescript-eslint/utils": "^8.31.0",
8
+ "@typescript-eslint/utils": "^8.38.0",
9
9
  "jsx-ast-utils": "^3.3.5"
10
10
  },
11
11
  "devDependencies": {
12
- "@types/estree": "1.0.5",
13
- "@typescript-eslint/rule-tester": "8.14.0",
12
+ "@types/estree": "1.0.8",
13
+ "@typescript-eslint/rule-tester": "8.38.0",
14
14
  "redent": "4.0.0",
15
- "@builder.io/qwik": "^1.15.0",
16
- "@builder.io/qwik-city": "^1.15.0"
15
+ "@builder.io/qwik": "^1.16.1",
16
+ "@builder.io/qwik-city": "^1.16.1"
17
17
  },
18
18
  "engines": {
19
19
  "node": ">=16.8.0 <18.0.0 || >=18.11"