eslint-cli-bundle 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-qnHZjHhP.js +1 -0
- package/dist/config.d.ts +12 -0
- package/dist/config.js +1 -0
- package/dist/eslint.js +69 -77
- package/dist/jiti-xhrF4nV-.js +9 -0
- package/dist/src-D7slgxDU.js +1 -0
- package/package.json +7 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as e}from"node:module";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(e&&(t=e(e=0)),t),c=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),l=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},u=(e,r,i)=>(i=e==null?{}:t(a(e)),l(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e)),d=e(import.meta.url);export{u as i,s as n,d as r,c as t};
|
package/dist/config.d.ts
ADDED
package/dist/config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./chunk-qnHZjHhP.js";var t=e((e=>{let t=[`env`,`extends`,`globals`,`ignorePatterns`,`noInlineConfig`,`overrides`,`parser`,`parserOptions`,`reportUnusedDisableDirectives`,`root`],n=new Set([`basePath`,`ignores`,`name`]);function r(e,t){return e.name?e.name:`UserConfig${t}`}function i(e,t){return typeof e==`string`?e:e.name?e.name:`ExtendedConfig${t}`}function a(e){if(Array.isArray(e.plugins))return!0;for(let n of t)if(n in e)return!0;return!1}function o(e){return Object.keys(e).every(e=>n.has(e))}function s(e){let t=e.indexOf(`/`);if(t===-1)return{namespace:``,name:e};let n=e.slice(0,t);if(n[0]===`@`&&n!==`@`){let r=e.indexOf(`/`,t+1);if(r!==-1)return n=e.slice(0,r),{namespace:n,name:e.slice(r+1)}}let r=e.slice(t+1);return{namespace:n,name:r}}function c(e,t,n){let r=t.meta?.namespace;if(!r||r===e||!n.rules&&!n.processor&&!n.language)return n;let i={...n};if(i.rules){let t=Object.keys(i.rules),n={};for(let a=0;a<t.length;a++){let o=t[a],{namespace:c,name:l}=s(o);c===r?n[`${e}/${l}`]=i.rules[o]:n[o]=i.rules[o]}i.rules=n}if(typeof i.processor==`string`){let{namespace:t,name:n}=s(i.processor);t&&t===r&&(i.processor=`${e}/${n}`)}if(typeof i.language==`string`){let{namespace:t,name:n}=s(i.language);t===r&&(i.language=`${e}/${n}`)}return i}function l(e,t,n,r){if(Array.isArray(n))return n.map(n=>l(e,t,n,r));if(a(n))throw TypeError(`Plugin config "${r}" is an eslintrc config and cannot be used in this context.`);return c(e,t,n)}function u(e,t){let{namespace:n,name:r}=s(t),i=e.plugins?.[n];if(!i)throw TypeError(`Plugin "${n}" not found.`);let o=i.configs?.[r];if(o&&(Array.isArray(o)||!a(o)))return l(n,i,o,t);let c=i.configs?.[`flat/${r}`];if(c&&(Array.isArray(c)||!a(c)))return l(n,i,c,t);let u=o||c?`Plugin config "${r}" in plugin "${n}" is an eslintrc config and cannot be used in this context.`:`Plugin config "${r}" not found in plugin "${n}".`;throw TypeError(u)}function*d(e,t=``){for(let n=0;n<e.length;n++){let r=t?`${t}[${n}]`:`[${n}]`;if(Array.isArray(e[n])){yield*d(e[n],r);continue}yield{indexPath:r,value:e[n]}}}function f(e=[],t=[]){if(!t.length)return e.concat();if(!e.length)return t.concat();let n=[];for(let r of e)for(let e of t){let t=[];Array.isArray(r)?t.push(...r):t.push(r),Array.isArray(e)?t.push(...e):t.push(e),n.push(t)}return n}function p(e,t,n,r){let i={...n};return o(n)||(e.files&&(i.files=f(e.files,n.files)),e.ignores&&(i.ignores=e.ignores.concat(n.ignores??[]))),i.name=`${t} > ${r}`,e.basePath&&(i.basePath=e.basePath),i}function m(e,t){if(!e.extends)return[e];if(!Array.isArray(e.extends))throw TypeError("The `extends` property must be an array.");let{extends:n,...r}=e,a=new WeakMap,s=n.map(t=>{if(typeof t==`string`){let n=u(e,t);return Array.isArray(n)?n.forEach((e,n)=>{a.set(e,`${t}[${n}]`)}):a.set(n,t),n}return t}),c=[];for(let{indexPath:n,value:o}of d(s)){let s=o;if(`basePath`in s)throw TypeError("'basePath' in `extends` is not allowed.");if(`extends`in s)throw TypeError(`Nested 'extends' is not allowed.`);let l=t.get(e),u=a.get(o)??i(o,n);c.push(p(r,l,s,u))}return o(r)||c.push(r),c.flat()}function h(e,t){return e.flatMap(e=>m(e,t))}function g(...e){let t=new WeakMap,n=[];if(e.length===0)throw TypeError(`Expected one or more arguments.`);for(let{indexPath:i,value:a}of d(e)){if(typeof a!=`object`||!a)throw TypeError(`Expected an object but received ${String(a)}.`);let e=a;t.set(e,r(e,i)),n.push(e)}return h(n,t)}let _=0;function v(e,t){if(!Array.isArray(e))throw TypeError(`ignorePatterns must be an array`);if(e.length===0)throw TypeError(`ignorePatterns must contain at least one pattern`);let n=_++;return{name:t||`globalIgnores ${n}`,ignores:e}}e.defineConfig=g,e.globalIgnores=v})),n=e(((e,n)=>{let{defineConfig:r,globalIgnores:i}=t();n.exports={defineConfig:r,globalIgnores:i}}))(),r=n.defineConfig,i=n.globalIgnores;export{r as defineConfig,i as globalIgnores};
|