@eslint-sukka/shared 4.0.6 → 4.1.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.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var e=require("path"),s=require("fs");const a="?([cm])[jt]s?(x)",t=[`**/__tests__/**/*.${a}`,`**/*.spec.${a}`,`**/*.test.${a}`];var p=Object.freeze({__proto__:null,GLOB_EXCLUDE:["**/node_modules","**/dist","**/output","**/out","**/coverage","**/temp","**/tmp","**/.vitepress/cache","**/.next","**/.nuxt","**/.vercel","**/.changeset","**/.idea","**/.output","**/.vite-inspect","**/*.md","**/*.min.*","**/__snapshots__","**/fixtures","**/auto-import?(s).d.ts","**/components.d.ts"],GLOB_JS:"**/*.?([cm])js",GLOB_JSX:"**/*.?([cm])jsx",GLOB_SRC:"**/*.?([cm])[jt]s?(x)",GLOB_SRC_EXT:a,GLOB_TESTS:t,GLOB_TS:"**/*.?([cm])ts",GLOB_TSX:"**/*.?([cm])tsx"});const m=new class{get(e){let s=this.map.get(e),a=Date.now();if(s){if(s.expire>a)return s.expire=a+2e4,s.value;this.map.delete(e)}return null}set(e,s){let a=this.map.get(e),t=Date.now()+2e4;a?(a.value=s,a.expire=t):this.map.set(e,{value:s,expire:t})}constructor(){var e;e=new Map,"map"in this?Object.defineProperty(this,"map",{value:e,enumerable:!0,configurable:!0,writable:!0}):this.map=e}},o=Object.entries({"deep-equal":"https://www.npmjs.com/package/dequal","fast-deep-equal":"https://www.npmjs.com/package/dequal",chalk:"https://www.npmjs.com/package/picocolors",kleur:"https://www.npmjs.com/package/picocolors","mime-db":"https://www.npmjs.com/package/mrmime","mime-types":"https://www.npmjs.com/package/mrmime","tiny-lru":"https://www.npmjs.com/package/flru","lru-cache":"https://www.npmjs.com/package/flru","tmp-cache":"https://www.npmjs.com/package/flru",premove:"Node.js built-in fs.rmdir & fs.rm API",mkdirp:"Node.js built-in fs.mkdir API","make-dir":"Node.js built-in fs.mkdir API","mk-dirs":"Node.js built-in fs.mkdir API",axios:"https://www.npmjs.com/package/ky","node-fetch":"https://www.npmjs.com/package/undici",got:"https://www.npmjs.com/package/undici and https://www.npmjs.com/package/async-retry","react-query":"https://swr.vercel.app","@tanstack/react-query":"https://swr.vercel.app","@tanstack/react-query-devtools":"https://swr.vercel.app",ahooks:"https://foxact.skk.moe and https://swr.vercel.app","clone-deep":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","deep-copy":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","fast-copy":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","lodash.clonedeep":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser",clone:"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser",ms:"https://www.npmjs.com/package/@lukeed/ms",classnames:"https://www.npmjs.com/package/clsx","p-limit":"https://www.npmjs.com/package/async-sema","p-retry":"https://www.npmjs.com/package/async-retry"}).map(([e,s])=>({name:e,message:`Use ${s} instead.`})),c=[{name:"date-fns/esm",message:"Please use date-fns/{submodule} instead."},{name:"idb/with-async-ittr-cjs",message:"Please use idb/with-async-ittr instead."},{name:"lodash-unified",message:"Do not import lodash-unified directly"},{name:"react-fast-compare",message:"What's faster than a really fast deep comparison? No deep comparison at all."}],n=[{name:"lodash",message:"Avoid using type unsafe methods.",importNames:["get"]},{name:"lodash-es",message:"Avoid using type unsafe methods.",importNames:["get"]},{name:"lodash",message:"Use https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser instead",importNames:["cloneDeep"]},{name:"lodash-es",message:"Use https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser instead",importNames:["cloneDeep"]},{name:"uuid",importNames:["v4"],message:"Use https://www.npmjs.com/package/@lukeed/uuid instead"}],r=[{name:"date-fns",message:"Please use date-fns/{submodule} instead."},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead."},...c,...o,...n],l=[{name:"date-fns",message:"Please use date-fns/{submodule} instead.",allowTypeImports:!0},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead.",allowTypeImports:!0},...c,...o,...n],w=[{name:"date-fns",message:"Please use date-fns/{submodule} instead."},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead."},...c,...o];exports.BETTER_ALTERNATIVES=o,exports.RESTRICTED_IMPORT_JS=r,exports.RESTRICTED_IMPORT_NODE_REQUIRE=w,exports.RESTRICTED_IMPORT_TS=l,exports.constants=p,exports.getPackageJson=function(a="a.js"){let t=e.dirname(e.resolve(a)),p=t,o="",c=null;do{if(c=m.get(p))return p!==t&&m.set(t,c),c;if(c=function(a){let t=e.join(a,"package.json");try{let e=s.readFileSync(t,"utf8"),a=JSON.parse(e);if(a&&"object"==typeof a)return a.filePath=t,a}catch{}return null}(p))return m.set(p,c),m.set(t,c),c;o=p,p=e.resolve(p,"..")}while(p!==o);return m.set(t,null),null};
1
+ "use strict";var e=require("path"),s=require("fs");const a="?([cm])[jt]s?(x)",t="**/*.json",p="**/*.jsonc",m="**/*.json5",o=[`**/__tests__/**/*.${a}`,`**/*.spec.${a}`,`**/*.test.${a}`];var c=Object.freeze({__proto__:null,GLOB_ALL_JSON:[t,p,m],GLOB_EXCLUDE:["**/node_modules","**/dist","**/output","**/out","**/coverage","**/temp","**/tmp","**/.vitepress/cache","**/.next","**/.nuxt","**/.vercel","**/.changeset","**/.idea","**/.output","**/.vite-inspect","**/*.md","**/*.min.*","**/__snapshots__","**/fixtures","**/auto-import?(s).d.ts","**/components.d.ts"],GLOB_JS:"**/*.?([cm])js",GLOB_JSON:t,GLOB_JSON5:m,GLOB_JSONC:p,GLOB_JSX:"**/*.?([cm])jsx",GLOB_SRC:"**/*.?([cm])[jt]s?(x)",GLOB_SRC_EXT:a,GLOB_TESTS:o,GLOB_TS:"**/*.?([cm])ts",GLOB_TSX:"**/*.?([cm])tsx"});const n=new class{get(e){let s=this.map.get(e),a=Date.now();if(s){if(s.expire>a)return s.expire=a+2e4,s.value;this.map.delete(e)}return null}set(e,s){let a=this.map.get(e),t=Date.now()+2e4;a?(a.value=s,a.expire=t):this.map.set(e,{value:s,expire:t})}constructor(){var e;e=new Map,"map"in this?Object.defineProperty(this,"map",{value:e,enumerable:!0,configurable:!0,writable:!0}):this.map=e}},r=Object.entries({"deep-equal":"https://www.npmjs.com/package/dequal","fast-deep-equal":"https://www.npmjs.com/package/dequal",chalk:"https://www.npmjs.com/package/picocolors",kleur:"https://www.npmjs.com/package/picocolors","mime-db":"https://www.npmjs.com/package/mrmime","mime-types":"https://www.npmjs.com/package/mrmime","tiny-lru":"https://www.npmjs.com/package/flru","lru-cache":"https://www.npmjs.com/package/flru","tmp-cache":"https://www.npmjs.com/package/flru",premove:"Node.js built-in fs.rmdir & fs.rm API",mkdirp:"Node.js built-in fs.mkdir API","make-dir":"Node.js built-in fs.mkdir API","mk-dirs":"Node.js built-in fs.mkdir API",axios:"https://www.npmjs.com/package/ky","node-fetch":"https://www.npmjs.com/package/undici",got:"https://www.npmjs.com/package/undici and https://www.npmjs.com/package/async-retry","react-query":"https://swr.vercel.app","@tanstack/react-query":"https://swr.vercel.app","@tanstack/react-query-devtools":"https://swr.vercel.app",ahooks:"https://foxact.skk.moe and https://swr.vercel.app","clone-deep":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","deep-copy":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","fast-copy":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","lodash.clonedeep":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser",clone:"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser",ms:"https://www.npmjs.com/package/@lukeed/ms",classnames:"https://www.npmjs.com/package/clsx","p-limit":"https://www.npmjs.com/package/async-sema","p-retry":"https://www.npmjs.com/package/async-retry"}).map(([e,s])=>({name:e,message:`Use ${s} instead.`})),l=[{name:"date-fns/esm",message:"Please use date-fns/{submodule} instead."},{name:"idb/with-async-ittr-cjs",message:"Please use idb/with-async-ittr instead."},{name:"lodash-unified",message:"Do not import lodash-unified directly"},{name:"react-fast-compare",message:"What's faster than a really fast deep comparison? No deep comparison at all."}],w=[{name:"lodash",message:"Avoid using type unsafe methods.",importNames:["get"]},{name:"lodash-es",message:"Avoid using type unsafe methods.",importNames:["get"]},{name:"lodash",message:"Use https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser instead",importNames:["cloneDeep"]},{name:"lodash-es",message:"Use https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser instead",importNames:["cloneDeep"]},{name:"uuid",importNames:["v4"],message:"Use https://www.npmjs.com/package/@lukeed/uuid instead"}],i=[{name:"date-fns",message:"Please use date-fns/{submodule} instead."},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead."},...l,...r,...w],d=[{name:"date-fns",message:"Please use date-fns/{submodule} instead.",allowTypeImports:!0},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead.",allowTypeImports:!0},...l,...r,...w],u=[{name:"date-fns",message:"Please use date-fns/{submodule} instead."},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead."},...l,...r];exports.BETTER_ALTERNATIVES=r,exports.RESTRICTED_IMPORT_JS=i,exports.RESTRICTED_IMPORT_NODE_REQUIRE=u,exports.RESTRICTED_IMPORT_TS=d,exports.constants=c,exports.getPackageJson=function(a="a.js"){let t=e.dirname(e.resolve(a)),p=t,m="",o=null;do{if(o=n.get(p))return p!==t&&n.set(t,o),o;if(o=function(a){let t=e.join(a,"package.json");try{let e=s.readFileSync(t,"utf8"),a=JSON.parse(e);if(a&&"object"==typeof a)return a.filePath=t,a}catch{}return null}(p))return n.set(p,o),n.set(t,o),o;m=p,p=e.resolve(p,"..")}while(p!==m);return n.set(t,null),null};
package/dist/index.d.ts CHANGED
@@ -6,11 +6,19 @@ declare const GLOB_JS = "**/*.?([cm])js";
6
6
  declare const GLOB_JSX = "**/*.?([cm])jsx";
7
7
  declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
8
8
  declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
9
+ declare const GLOB_JSON = "**/*.json";
10
+ declare const GLOB_JSONC = "**/*.jsonc";
11
+ declare const GLOB_JSON5 = "**/*.json5";
12
+ declare const GLOB_ALL_JSON: string[];
9
13
  declare const GLOB_TESTS: string[];
10
14
  declare const GLOB_EXCLUDE: string[];
11
15
 
16
+ declare const constants_GLOB_ALL_JSON: typeof GLOB_ALL_JSON;
12
17
  declare const constants_GLOB_EXCLUDE: typeof GLOB_EXCLUDE;
13
18
  declare const constants_GLOB_JS: typeof GLOB_JS;
19
+ declare const constants_GLOB_JSON: typeof GLOB_JSON;
20
+ declare const constants_GLOB_JSON5: typeof GLOB_JSON5;
21
+ declare const constants_GLOB_JSONC: typeof GLOB_JSONC;
14
22
  declare const constants_GLOB_JSX: typeof GLOB_JSX;
15
23
  declare const constants_GLOB_SRC: typeof GLOB_SRC;
16
24
  declare const constants_GLOB_SRC_EXT: typeof GLOB_SRC_EXT;
@@ -18,7 +26,7 @@ declare const constants_GLOB_TESTS: typeof GLOB_TESTS;
18
26
  declare const constants_GLOB_TS: typeof GLOB_TS;
19
27
  declare const constants_GLOB_TSX: typeof GLOB_TSX;
20
28
  declare namespace constants {
21
- export { constants_GLOB_EXCLUDE as GLOB_EXCLUDE, constants_GLOB_JS as GLOB_JS, constants_GLOB_JSX as GLOB_JSX, constants_GLOB_SRC as GLOB_SRC, constants_GLOB_SRC_EXT as GLOB_SRC_EXT, constants_GLOB_TESTS as GLOB_TESTS, constants_GLOB_TS as GLOB_TS, constants_GLOB_TSX as GLOB_TSX };
29
+ export { constants_GLOB_ALL_JSON as GLOB_ALL_JSON, constants_GLOB_EXCLUDE as GLOB_EXCLUDE, constants_GLOB_JS as GLOB_JS, constants_GLOB_JSON as GLOB_JSON, constants_GLOB_JSON5 as GLOB_JSON5, constants_GLOB_JSONC as GLOB_JSONC, constants_GLOB_JSX as GLOB_JSX, constants_GLOB_SRC as GLOB_SRC, constants_GLOB_SRC_EXT as GLOB_SRC_EXT, constants_GLOB_TESTS as GLOB_TESTS, constants_GLOB_TS as GLOB_TS, constants_GLOB_TSX as GLOB_TSX };
22
30
  }
23
31
 
24
32
  /**
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e=require("path"),s=require("fs");const a="?([cm])[jt]s?(x)",t=[`**/__tests__/**/*.${a}`,`**/*.spec.${a}`,`**/*.test.${a}`];var p=Object.freeze({__proto__:null,GLOB_EXCLUDE:["**/node_modules","**/dist","**/output","**/out","**/coverage","**/temp","**/tmp","**/.vitepress/cache","**/.next","**/.nuxt","**/.vercel","**/.changeset","**/.idea","**/.output","**/.vite-inspect","**/*.md","**/*.min.*","**/__snapshots__","**/fixtures","**/auto-import?(s).d.ts","**/components.d.ts"],GLOB_JS:"**/*.?([cm])js",GLOB_JSX:"**/*.?([cm])jsx",GLOB_SRC:"**/*.?([cm])[jt]s?(x)",GLOB_SRC_EXT:a,GLOB_TESTS:t,GLOB_TS:"**/*.?([cm])ts",GLOB_TSX:"**/*.?([cm])tsx"});const m=new class{get(e){let s=this.map.get(e),a=Date.now();if(s){if(s.expire>a)return s.expire=a+2e4,s.value;this.map.delete(e)}return null}set(e,s){let a=this.map.get(e),t=Date.now()+2e4;a?(a.value=s,a.expire=t):this.map.set(e,{value:s,expire:t})}constructor(){var e;e=new Map,"map"in this?Object.defineProperty(this,"map",{value:e,enumerable:!0,configurable:!0,writable:!0}):this.map=e}},o=Object.entries({"deep-equal":"https://www.npmjs.com/package/dequal","fast-deep-equal":"https://www.npmjs.com/package/dequal",chalk:"https://www.npmjs.com/package/picocolors",kleur:"https://www.npmjs.com/package/picocolors","mime-db":"https://www.npmjs.com/package/mrmime","mime-types":"https://www.npmjs.com/package/mrmime","tiny-lru":"https://www.npmjs.com/package/flru","lru-cache":"https://www.npmjs.com/package/flru","tmp-cache":"https://www.npmjs.com/package/flru",premove:"Node.js built-in fs.rmdir & fs.rm API",mkdirp:"Node.js built-in fs.mkdir API","make-dir":"Node.js built-in fs.mkdir API","mk-dirs":"Node.js built-in fs.mkdir API",axios:"https://www.npmjs.com/package/ky","node-fetch":"https://www.npmjs.com/package/undici",got:"https://www.npmjs.com/package/undici and https://www.npmjs.com/package/async-retry","react-query":"https://swr.vercel.app","@tanstack/react-query":"https://swr.vercel.app","@tanstack/react-query-devtools":"https://swr.vercel.app",ahooks:"https://foxact.skk.moe and https://swr.vercel.app","clone-deep":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","deep-copy":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","fast-copy":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","lodash.clonedeep":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser",clone:"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser",ms:"https://www.npmjs.com/package/@lukeed/ms",classnames:"https://www.npmjs.com/package/clsx","p-limit":"https://www.npmjs.com/package/async-sema","p-retry":"https://www.npmjs.com/package/async-retry"}).map(([e,s])=>({name:e,message:`Use ${s} instead.`})),c=[{name:"date-fns/esm",message:"Please use date-fns/{submodule} instead."},{name:"idb/with-async-ittr-cjs",message:"Please use idb/with-async-ittr instead."},{name:"lodash-unified",message:"Do not import lodash-unified directly"},{name:"react-fast-compare",message:"What's faster than a really fast deep comparison? No deep comparison at all."}],n=[{name:"lodash",message:"Avoid using type unsafe methods.",importNames:["get"]},{name:"lodash-es",message:"Avoid using type unsafe methods.",importNames:["get"]},{name:"lodash",message:"Use https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser instead",importNames:["cloneDeep"]},{name:"lodash-es",message:"Use https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser instead",importNames:["cloneDeep"]},{name:"uuid",importNames:["v4"],message:"Use https://www.npmjs.com/package/@lukeed/uuid instead"}],r=[{name:"date-fns",message:"Please use date-fns/{submodule} instead."},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead."},...c,...o,...n],l=[{name:"date-fns",message:"Please use date-fns/{submodule} instead.",allowTypeImports:!0},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead.",allowTypeImports:!0},...c,...o,...n],w=[{name:"date-fns",message:"Please use date-fns/{submodule} instead."},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead."},...c,...o];exports.BETTER_ALTERNATIVES=o,exports.RESTRICTED_IMPORT_JS=r,exports.RESTRICTED_IMPORT_NODE_REQUIRE=w,exports.RESTRICTED_IMPORT_TS=l,exports.constants=p,exports.getPackageJson=function(a="a.js"){let t=e.dirname(e.resolve(a)),p=t,o="",c=null;do{if(c=m.get(p))return p!==t&&m.set(t,c),c;if(c=function(a){let t=e.join(a,"package.json");try{let e=s.readFileSync(t,"utf8"),a=JSON.parse(e);if(a&&"object"==typeof a)return a.filePath=t,a}catch{}return null}(p))return m.set(p,c),m.set(t,c),c;o=p,p=e.resolve(p,"..")}while(p!==o);return m.set(t,null),null};
1
+ "use strict";var e=require("path"),s=require("fs");const a="?([cm])[jt]s?(x)",t="**/*.json",p="**/*.jsonc",m="**/*.json5",o=[`**/__tests__/**/*.${a}`,`**/*.spec.${a}`,`**/*.test.${a}`];var c=Object.freeze({__proto__:null,GLOB_ALL_JSON:[t,p,m],GLOB_EXCLUDE:["**/node_modules","**/dist","**/output","**/out","**/coverage","**/temp","**/tmp","**/.vitepress/cache","**/.next","**/.nuxt","**/.vercel","**/.changeset","**/.idea","**/.output","**/.vite-inspect","**/*.md","**/*.min.*","**/__snapshots__","**/fixtures","**/auto-import?(s).d.ts","**/components.d.ts"],GLOB_JS:"**/*.?([cm])js",GLOB_JSON:t,GLOB_JSON5:m,GLOB_JSONC:p,GLOB_JSX:"**/*.?([cm])jsx",GLOB_SRC:"**/*.?([cm])[jt]s?(x)",GLOB_SRC_EXT:a,GLOB_TESTS:o,GLOB_TS:"**/*.?([cm])ts",GLOB_TSX:"**/*.?([cm])tsx"});const n=new class{get(e){let s=this.map.get(e),a=Date.now();if(s){if(s.expire>a)return s.expire=a+2e4,s.value;this.map.delete(e)}return null}set(e,s){let a=this.map.get(e),t=Date.now()+2e4;a?(a.value=s,a.expire=t):this.map.set(e,{value:s,expire:t})}constructor(){var e;e=new Map,"map"in this?Object.defineProperty(this,"map",{value:e,enumerable:!0,configurable:!0,writable:!0}):this.map=e}},r=Object.entries({"deep-equal":"https://www.npmjs.com/package/dequal","fast-deep-equal":"https://www.npmjs.com/package/dequal",chalk:"https://www.npmjs.com/package/picocolors",kleur:"https://www.npmjs.com/package/picocolors","mime-db":"https://www.npmjs.com/package/mrmime","mime-types":"https://www.npmjs.com/package/mrmime","tiny-lru":"https://www.npmjs.com/package/flru","lru-cache":"https://www.npmjs.com/package/flru","tmp-cache":"https://www.npmjs.com/package/flru",premove:"Node.js built-in fs.rmdir & fs.rm API",mkdirp:"Node.js built-in fs.mkdir API","make-dir":"Node.js built-in fs.mkdir API","mk-dirs":"Node.js built-in fs.mkdir API",axios:"https://www.npmjs.com/package/ky","node-fetch":"https://www.npmjs.com/package/undici",got:"https://www.npmjs.com/package/undici and https://www.npmjs.com/package/async-retry","react-query":"https://swr.vercel.app","@tanstack/react-query":"https://swr.vercel.app","@tanstack/react-query-devtools":"https://swr.vercel.app",ahooks:"https://foxact.skk.moe and https://swr.vercel.app","clone-deep":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","deep-copy":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","fast-copy":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","lodash.clonedeep":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser",clone:"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser",ms:"https://www.npmjs.com/package/@lukeed/ms",classnames:"https://www.npmjs.com/package/clsx","p-limit":"https://www.npmjs.com/package/async-sema","p-retry":"https://www.npmjs.com/package/async-retry"}).map(([e,s])=>({name:e,message:`Use ${s} instead.`})),l=[{name:"date-fns/esm",message:"Please use date-fns/{submodule} instead."},{name:"idb/with-async-ittr-cjs",message:"Please use idb/with-async-ittr instead."},{name:"lodash-unified",message:"Do not import lodash-unified directly"},{name:"react-fast-compare",message:"What's faster than a really fast deep comparison? No deep comparison at all."}],w=[{name:"lodash",message:"Avoid using type unsafe methods.",importNames:["get"]},{name:"lodash-es",message:"Avoid using type unsafe methods.",importNames:["get"]},{name:"lodash",message:"Use https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser instead",importNames:["cloneDeep"]},{name:"lodash-es",message:"Use https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser instead",importNames:["cloneDeep"]},{name:"uuid",importNames:["v4"],message:"Use https://www.npmjs.com/package/@lukeed/uuid instead"}],i=[{name:"date-fns",message:"Please use date-fns/{submodule} instead."},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead."},...l,...r,...w],d=[{name:"date-fns",message:"Please use date-fns/{submodule} instead.",allowTypeImports:!0},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead.",allowTypeImports:!0},...l,...r,...w],u=[{name:"date-fns",message:"Please use date-fns/{submodule} instead."},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead."},...l,...r];exports.BETTER_ALTERNATIVES=r,exports.RESTRICTED_IMPORT_JS=i,exports.RESTRICTED_IMPORT_NODE_REQUIRE=u,exports.RESTRICTED_IMPORT_TS=d,exports.constants=c,exports.getPackageJson=function(a="a.js"){let t=e.dirname(e.resolve(a)),p=t,m="",o=null;do{if(o=n.get(p))return p!==t&&n.set(t,o),o;if(o=function(a){let t=e.join(a,"package.json");try{let e=s.readFileSync(t,"utf8"),a=JSON.parse(e);if(a&&"object"==typeof a)return a.filePath=t,a}catch{}return null}(p))return n.set(p,o),n.set(t,o),o;m=p,p=e.resolve(p,"..")}while(p!==m);return n.set(t,null),null};
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import e from"path";import s from"fs";let a="?([cm])[jt]s?(x)",t=[`**/__tests__/**/*.${a}`,`**/*.spec.${a}`,`**/*.test.${a}`];var p=Object.freeze({__proto__:null,GLOB_EXCLUDE:["**/node_modules","**/dist","**/output","**/out","**/coverage","**/temp","**/tmp","**/.vitepress/cache","**/.next","**/.nuxt","**/.vercel","**/.changeset","**/.idea","**/.output","**/.vite-inspect","**/*.md","**/*.min.*","**/__snapshots__","**/fixtures","**/auto-import?(s).d.ts","**/components.d.ts"],GLOB_JS:"**/*.?([cm])js",GLOB_JSX:"**/*.?([cm])jsx",GLOB_SRC:"**/*.?([cm])[jt]s?(x)",GLOB_SRC_EXT:a,GLOB_TESTS:t,GLOB_TS:"**/*.?([cm])ts",GLOB_TSX:"**/*.?([cm])tsx"});let m=new class{get(e){let s=this.map.get(e),a=Date.now();if(s){if(s.expire>a)return s.expire=a+2e4,s.value;this.map.delete(e)}return null}set(e,s){let a=this.map.get(e),t=Date.now()+2e4;a?(a.value=s,a.expire=t):this.map.set(e,{value:s,expire:t})}constructor(){var e;e=new Map,"map"in this?Object.defineProperty(this,"map",{value:e,enumerable:!0,configurable:!0,writable:!0}):this.map=e}};function o(a="a.js"){let t=e.dirname(e.resolve(a)),p=t,o="",c=null;do{if(c=m.get(p))return p!==t&&m.set(t,c),c;if(c=function(a){let t=e.join(a,"package.json");try{let e=s.readFileSync(t,"utf8"),a=JSON.parse(e);if(a&&"object"==typeof a)return a.filePath=t,a}catch{}return null}(p))return m.set(p,c),m.set(t,c),c;o=p,p=e.resolve(p,"..")}while(p!==o);return m.set(t,null),null}let c=Object.entries({"deep-equal":"https://www.npmjs.com/package/dequal","fast-deep-equal":"https://www.npmjs.com/package/dequal",chalk:"https://www.npmjs.com/package/picocolors",kleur:"https://www.npmjs.com/package/picocolors","mime-db":"https://www.npmjs.com/package/mrmime","mime-types":"https://www.npmjs.com/package/mrmime","tiny-lru":"https://www.npmjs.com/package/flru","lru-cache":"https://www.npmjs.com/package/flru","tmp-cache":"https://www.npmjs.com/package/flru",premove:"Node.js built-in fs.rmdir & fs.rm API",mkdirp:"Node.js built-in fs.mkdir API","make-dir":"Node.js built-in fs.mkdir API","mk-dirs":"Node.js built-in fs.mkdir API",axios:"https://www.npmjs.com/package/ky","node-fetch":"https://www.npmjs.com/package/undici",got:"https://www.npmjs.com/package/undici and https://www.npmjs.com/package/async-retry","react-query":"https://swr.vercel.app","@tanstack/react-query":"https://swr.vercel.app","@tanstack/react-query-devtools":"https://swr.vercel.app",ahooks:"https://foxact.skk.moe and https://swr.vercel.app","clone-deep":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","deep-copy":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","fast-copy":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","lodash.clonedeep":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser",clone:"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser",ms:"https://www.npmjs.com/package/@lukeed/ms",classnames:"https://www.npmjs.com/package/clsx","p-limit":"https://www.npmjs.com/package/async-sema","p-retry":"https://www.npmjs.com/package/async-retry"}).map(([e,s])=>({name:e,message:`Use ${s} instead.`})),n=[{name:"date-fns/esm",message:"Please use date-fns/{submodule} instead."},{name:"idb/with-async-ittr-cjs",message:"Please use idb/with-async-ittr instead."},{name:"lodash-unified",message:"Do not import lodash-unified directly"},{name:"react-fast-compare",message:"What's faster than a really fast deep comparison? No deep comparison at all."}],r=[{name:"lodash",message:"Avoid using type unsafe methods.",importNames:["get"]},{name:"lodash-es",message:"Avoid using type unsafe methods.",importNames:["get"]},{name:"lodash",message:"Use https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser instead",importNames:["cloneDeep"]},{name:"lodash-es",message:"Use https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser instead",importNames:["cloneDeep"]},{name:"uuid",importNames:["v4"],message:"Use https://www.npmjs.com/package/@lukeed/uuid instead"}],l=[{name:"date-fns",message:"Please use date-fns/{submodule} instead."},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead."},...n,...c,...r],w=[{name:"date-fns",message:"Please use date-fns/{submodule} instead.",allowTypeImports:!0},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead.",allowTypeImports:!0},...n,...c,...r],i=[{name:"date-fns",message:"Please use date-fns/{submodule} instead."},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead."},...n,...c];export{c as BETTER_ALTERNATIVES,l as RESTRICTED_IMPORT_JS,i as RESTRICTED_IMPORT_NODE_REQUIRE,w as RESTRICTED_IMPORT_TS,p as constants,o as getPackageJson};
1
+ import e from"path";import s from"fs";let a="?([cm])[jt]s?(x)",t="**/*.json",p="**/*.jsonc",m="**/*.json5",o=[`**/__tests__/**/*.${a}`,`**/*.spec.${a}`,`**/*.test.${a}`];var c=Object.freeze({__proto__:null,GLOB_ALL_JSON:[t,p,m],GLOB_EXCLUDE:["**/node_modules","**/dist","**/output","**/out","**/coverage","**/temp","**/tmp","**/.vitepress/cache","**/.next","**/.nuxt","**/.vercel","**/.changeset","**/.idea","**/.output","**/.vite-inspect","**/*.md","**/*.min.*","**/__snapshots__","**/fixtures","**/auto-import?(s).d.ts","**/components.d.ts"],GLOB_JS:"**/*.?([cm])js",GLOB_JSON:t,GLOB_JSON5:m,GLOB_JSONC:p,GLOB_JSX:"**/*.?([cm])jsx",GLOB_SRC:"**/*.?([cm])[jt]s?(x)",GLOB_SRC_EXT:a,GLOB_TESTS:o,GLOB_TS:"**/*.?([cm])ts",GLOB_TSX:"**/*.?([cm])tsx"});let n=new class{get(e){let s=this.map.get(e),a=Date.now();if(s){if(s.expire>a)return s.expire=a+2e4,s.value;this.map.delete(e)}return null}set(e,s){let a=this.map.get(e),t=Date.now()+2e4;a?(a.value=s,a.expire=t):this.map.set(e,{value:s,expire:t})}constructor(){var e;e=new Map,"map"in this?Object.defineProperty(this,"map",{value:e,enumerable:!0,configurable:!0,writable:!0}):this.map=e}};function r(a="a.js"){let t=e.dirname(e.resolve(a)),p=t,m="",o=null;do{if(o=n.get(p))return p!==t&&n.set(t,o),o;if(o=function(a){let t=e.join(a,"package.json");try{let e=s.readFileSync(t,"utf8"),a=JSON.parse(e);if(a&&"object"==typeof a)return a.filePath=t,a}catch{}return null}(p))return n.set(p,o),n.set(t,o),o;m=p,p=e.resolve(p,"..")}while(p!==m);return n.set(t,null),null}let l=Object.entries({"deep-equal":"https://www.npmjs.com/package/dequal","fast-deep-equal":"https://www.npmjs.com/package/dequal",chalk:"https://www.npmjs.com/package/picocolors",kleur:"https://www.npmjs.com/package/picocolors","mime-db":"https://www.npmjs.com/package/mrmime","mime-types":"https://www.npmjs.com/package/mrmime","tiny-lru":"https://www.npmjs.com/package/flru","lru-cache":"https://www.npmjs.com/package/flru","tmp-cache":"https://www.npmjs.com/package/flru",premove:"Node.js built-in fs.rmdir & fs.rm API",mkdirp:"Node.js built-in fs.mkdir API","make-dir":"Node.js built-in fs.mkdir API","mk-dirs":"Node.js built-in fs.mkdir API",axios:"https://www.npmjs.com/package/ky","node-fetch":"https://www.npmjs.com/package/undici",got:"https://www.npmjs.com/package/undici and https://www.npmjs.com/package/async-retry","react-query":"https://swr.vercel.app","@tanstack/react-query":"https://swr.vercel.app","@tanstack/react-query-devtools":"https://swr.vercel.app",ahooks:"https://foxact.skk.moe and https://swr.vercel.app","clone-deep":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","deep-copy":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","fast-copy":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser","lodash.clonedeep":"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser",clone:"https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser",ms:"https://www.npmjs.com/package/@lukeed/ms",classnames:"https://www.npmjs.com/package/clsx","p-limit":"https://www.npmjs.com/package/async-sema","p-retry":"https://www.npmjs.com/package/async-retry"}).map(([e,s])=>({name:e,message:`Use ${s} instead.`})),w=[{name:"date-fns/esm",message:"Please use date-fns/{submodule} instead."},{name:"idb/with-async-ittr-cjs",message:"Please use idb/with-async-ittr instead."},{name:"lodash-unified",message:"Do not import lodash-unified directly"},{name:"react-fast-compare",message:"What's faster than a really fast deep comparison? No deep comparison at all."}],i=[{name:"lodash",message:"Avoid using type unsafe methods.",importNames:["get"]},{name:"lodash-es",message:"Avoid using type unsafe methods.",importNames:["get"]},{name:"lodash",message:"Use https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser instead",importNames:["cloneDeep"]},{name:"lodash-es",message:"Use https://www.npmjs.com/package/rfdc for Node.js / https://www.npmjs.com/package/klona for Browser instead",importNames:["cloneDeep"]},{name:"uuid",importNames:["v4"],message:"Use https://www.npmjs.com/package/@lukeed/uuid instead"}],d=[{name:"date-fns",message:"Please use date-fns/{submodule} instead."},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead."},...w,...l,...i],u=[{name:"date-fns",message:"Please use date-fns/{submodule} instead.",allowTypeImports:!0},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead.",allowTypeImports:!0},...w,...l,...i],h=[{name:"date-fns",message:"Please use date-fns/{submodule} instead."},{name:"async-call-rpc",message:"Please use async-call-rpc/full instead."},...w,...l];export{l as BETTER_ALTERNATIVES,d as RESTRICTED_IMPORT_JS,h as RESTRICTED_IMPORT_NODE_REQUIRE,u as RESTRICTED_IMPORT_TS,c as constants,r as getPackageJson};
package/package.json CHANGED
@@ -1,20 +1,18 @@
1
1
  {
2
2
  "name": "@eslint-sukka/shared",
3
- "version": "4.0.6",
3
+ "version": "4.1.0",
4
4
  "description": "Sukka's ESLint config",
5
- "author": "Sukka <https://skk.moe>",
6
- "license": "MIT",
7
5
  "homepage": "https://github.com/SukkaW/eslint-config-sukka",
8
6
  "repository": {
9
7
  "url": "https://github.com/SukkaW/eslint-config-sukka",
10
8
  "directory": "packages/shared"
11
9
  },
12
- "keywords": [
13
- "eslint-config"
14
- ],
15
10
  "main": "dist/index.js",
16
11
  "module": "dist/index.mjs",
17
12
  "types": "dist/index.d.ts",
13
+ "files": [
14
+ "dist"
15
+ ],
18
16
  "exports": {
19
17
  ".": {
20
18
  "types": "./dist/index.d.ts",
@@ -24,12 +22,17 @@
24
22
  },
25
23
  "./package.json": "./package.json"
26
24
  },
27
- "files": [
28
- "dist"
25
+ "keywords": [
26
+ "eslint-config"
29
27
  ],
28
+ "author": "Sukka <https://skk.moe>",
29
+ "license": "MIT",
30
30
  "dependencies": {
31
31
  "@types/eslint": "^8.44.4"
32
32
  },
33
+ "devDependencies": {
34
+ "@eslint-sukka/rollup-config": "4.1.0"
35
+ },
33
36
  "scripts": {
34
37
  "build": "rollup -c rollup.config.ts --configPlugin swc3"
35
38
  }