@useinsider/eslint-config 1.10.0-beta.3 → 1.10.0-beta.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.
@@ -1,3 +1,3 @@
1
1
  import type { Linter } from 'eslint';
2
- declare const _default: Linter.Config;
2
+ declare const _default: Linter.Config<Linter.RulesRecord>;
3
3
  export default _default;
@@ -0,0 +1,49 @@
1
+ import o from "@eslint/js";
2
+ import s from "@stylistic/eslint-plugin";
3
+ import t from "eslint-config-airbnb-extended";
4
+ import { importX as i } from "eslint-plugin-import-x";
5
+ import m from "eslint-plugin-jsdoc";
6
+ import p from "eslint-plugin-vue";
7
+ import a from "eslint-plugin-vue-scoped-css";
8
+ import c from "globals";
9
+ import e from "typescript-eslint";
10
+ import { b as l, s as n, a as f, i as d, c as g, p as u } from "./stylistic-DcItXUA4.js";
11
+ import { t as b } from "./typescript-Dg4zKuYI.js";
12
+ import { v as y } from "./vue-5XWMLJUh.js";
13
+ import { mergeAll as x, merge as j } from "./main.js";
14
+ const N = x(e.config(
15
+ o.configs.recommended,
16
+ i.flatConfigs.recommended,
17
+ t.configs.base.all,
18
+ ...e.configs.recommended,
19
+ ...p.configs["flat/recommended"].map((r) => (delete r.files, r)),
20
+ ...a.configs["flat/recommended"],
21
+ m.configs["flat/recommended-typescript-error"],
22
+ j(u(), g, d, f, { plugins: { "@stylistic": s } }, n, y, b, l(), {
23
+ languageOptions: {
24
+ globals: {
25
+ ...c.browser
26
+ },
27
+ parserOptions: {
28
+ parser: e.parser,
29
+ sourceType: "module",
30
+ ecmaFeatures: {
31
+ jsx: !0
32
+ },
33
+ extraFileExtensions: [".vue"]
34
+ }
35
+ },
36
+ settings: {
37
+ jsdoc: {
38
+ mode: "typescript",
39
+ tagNamePreference: {
40
+ callback: "watch",
41
+ desc: "use"
42
+ }
43
+ }
44
+ }
45
+ })
46
+ ));
47
+ export {
48
+ N as default
49
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@eslint/js"),o=require("@stylistic/eslint-plugin"),n=require("eslint-config-airbnb-extended"),c=require("eslint-plugin-import-x"),l=require("eslint-plugin-jsdoc"),u=require("eslint-plugin-vue"),a=require("eslint-plugin-vue-scoped-css"),p=require("globals"),r=require("typescript-eslint"),e=require("./stylistic-BGCob372.cjs"),g=require("./typescript-BvnP4VCM.cjs"),m=require("./vue-D2lo_IGG.cjs"),t=require("./main.cjs"),d=t.mergeAll(r.config(i.configs.recommended,c.importX.flatConfigs.recommended,n.configs.base.all,...r.configs.recommended,...u.configs["flat/recommended"].map(s=>(delete s.files,s)),...a.configs["flat/recommended"],l.configs["flat/recommended-typescript-error"],t.merge(e.preConfig(),e.core,e.importRules,e.cspell,{plugins:{"@stylistic":o}},e.stylisticRules,m.vue,g.typescript,e.postConfig(),{languageOptions:{globals:{...p.browser},parserOptions:{parser:r.parser,sourceType:"module",ecmaFeatures:{jsx:!0},extraFileExtensions:[".vue"]}},settings:{jsdoc:{mode:"typescript",tagNamePreference:{callback:"watch",desc:"use"}}}})));exports.default=d;
@@ -1,13 +1,16 @@
1
1
  import o from "globals";
2
2
  import { merge as r } from "./main.js";
3
- import t from "./index-_FfUOn5J.js";
4
- const s = r(t, {
3
+ import e from "./index-_FfUOn5J.js";
4
+ const p = r(e, {
5
5
  languageOptions: {
6
+ parserOptions: {
7
+ extraFileExtensions: [".vue"]
8
+ },
6
9
  globals: {
7
10
  ...o.browser
8
11
  }
9
12
  }
10
13
  });
11
14
  export {
12
- s as default
15
+ p as default
13
16
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("globals"),r=require("./main.cjs"),t=require("./index-BI2IfhR3.cjs"),n=r.merge(t.default,{languageOptions:{parserOptions:{extraFileExtensions:[".vue"]},globals:{...e.browser}}});exports.default=n;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@eslint/js"),o=require("@stylistic/eslint-plugin"),n=require("eslint-config-airbnb-extended"),c=require("eslint-plugin-import-x"),l=require("eslint-plugin-jsdoc"),u=require("eslint-plugin-vue"),a=require("eslint-plugin-vue-scoped-css"),p=require("globals"),r=require("typescript-eslint"),e=require("./stylistic-BGCob372.cjs"),m=require("./typescript-BvnP4VCM.cjs"),g=require("./vue2-CpDCkxcX.cjs"),t=require("./main.cjs"),d=t.mergeAll(r.config(i.configs.recommended,c.importX.flatConfigs.recommended,n.configs.base.all,...r.configs.recommended,...u.configs["flat/vue2-recommended"].map(s=>(delete s.files,s)),...a.configs["flat/vue2-recommended"],l.configs["flat/recommended-typescript-error"],t.merge(e.preConfig(),e.core,e.importRules,e.cspell,{plugins:{"@stylistic":o}},e.stylisticRules,g.vue2Composition,m.typescript,e.postConfig(),{languageOptions:{globals:{...p.browser},parserOptions:{parser:r.parser,sourceType:"module",ecmaFeatures:{jsx:!0},extraFileExtensions:[".vue"]}},settings:{jsdoc:{mode:"typescript",tagNamePreference:{callback:"watch",desc:"use"}}}})));exports.default=d;
@@ -0,0 +1,49 @@
1
+ import r from "@eslint/js";
2
+ import s from "@stylistic/eslint-plugin";
3
+ import t from "eslint-config-airbnb-extended";
4
+ import { importX as i } from "eslint-plugin-import-x";
5
+ import m from "eslint-plugin-jsdoc";
6
+ import p from "eslint-plugin-vue";
7
+ import a from "eslint-plugin-vue-scoped-css";
8
+ import c from "globals";
9
+ import e from "typescript-eslint";
10
+ import { b as l, s as n, a as f, i as d, c as g, p as u } from "./stylistic-DcItXUA4.js";
11
+ import { t as b } from "./typescript-Dg4zKuYI.js";
12
+ import { a as y } from "./vue2-7aDd9M-9.js";
13
+ import { mergeAll as x, merge as C } from "./main.js";
14
+ const N = x(e.config(
15
+ r.configs.recommended,
16
+ i.flatConfigs.recommended,
17
+ t.configs.base.all,
18
+ ...e.configs.recommended,
19
+ ...p.configs["flat/vue2-recommended"].map((o) => (delete o.files, o)),
20
+ ...a.configs["flat/vue2-recommended"],
21
+ m.configs["flat/recommended-typescript-error"],
22
+ C(u(), g, d, f, { plugins: { "@stylistic": s } }, n, y, b, l(), {
23
+ languageOptions: {
24
+ globals: {
25
+ ...c.browser
26
+ },
27
+ parserOptions: {
28
+ parser: e.parser,
29
+ sourceType: "module",
30
+ ecmaFeatures: {
31
+ jsx: !0
32
+ },
33
+ extraFileExtensions: [".vue"]
34
+ }
35
+ },
36
+ settings: {
37
+ jsdoc: {
38
+ mode: "typescript",
39
+ tagNamePreference: {
40
+ callback: "watch",
41
+ desc: "use"
42
+ }
43
+ }
44
+ }
45
+ })
46
+ ));
47
+ export {
48
+ N as default
49
+ };
package/dist/main.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("node:fs"),y=require("node:path"),w=require("node:url"),h=require("@antfu/install-pkg"),b=require("ts-deepmerge"),v=require("node:console");var l=typeof document<"u"?document.currentScript:null;let u=!1;const d=new Set,R=["@cspell/eslint-plugin","@eslint/eslintrc","@eslint/js","@stylistic/eslint-plugin","@types/eslint","@typescript-eslint/eslint-plugin","@typescript-eslint/parser","eslint","eslint-config-airbnb-base","eslint-config-airbnb-typescript","eslint-import-resolver-typescript","eslint-plugin-import","eslint-plugin-jsdoc","globals","typescript","typescript-eslint"];function p(e){const r=y.resolve(e,"package.json"),s=m.readFileSync(r,"utf8");if(!s)throw new Error(`Unable to locate package.json: ${r}`);return JSON.parse(s)}function S(){const e=p(process.cwd());return{...e.dependencies,...e.devDependencies}}function q(){return p(w.fileURLToPath(new URL("../",typeof document>"u"?require("url").pathToFileURL(__filename).href:l&&l.tagName.toUpperCase()==="SCRIPT"&&l.src||new URL("main.cjs",document.baseURI).href))).dependencies}async function P(){if(u)return;const e=S(),s=Object.entries(q()).filter(([n,t])=>R.includes(n)&&!d.has(n)&&(!e[n]||e[n]!==t));if(!s.length)return;const i=s.map(([n,t])=>`${n}@${t.replace(/^\W+/,"")}`);console.info("Missing dependencies detected:"),console.info(i.map(n=>` - ${n}`).join(`
2
2
  `)),console.info(`
3
- Installing dependencies:`),await h.installPackage(i,{dev:!0,additionalArgs:["-E"]}),process.exit(1)}function k(e){if(typeof e=="boolean"){u=e;return}e.forEach(r=>d.add(String(r)))}function o(...e){return b.merge.withOptions({mergeArrays:!1},...e)}const f=new Set;function x(e){e.forEach(r=>{f.add(r)})}function j(e){if(!Array.isArray(e))return"warn";const[,...r]=e;return["warn",...r]}function c(e,r){let s=r||f;return Array.isArray(s)&&(s=new Set(s)),!e||!s.size?e:(r&&s.forEach(i=>{e[i]||v.warn(`Unknown rule "${i}". Please remove it from the silenced rules list.`)}),Object.entries(e).reduce((i,[n,t])=>(t&&(i[n]=s.has(n)?j(t):t),i),{}))}function C(...e){return e.flat().reduce((r,s)=>o(r,s),{})}const a={async config(){return Promise.resolve().then(()=>require("./index-BmBugWe4.cjs"))},async javascript(){return Promise.resolve().then(()=>require("./index-Bfy7vNWN.cjs"))},async"javascript-node"(){return Promise.resolve().then(()=>require("./index-CRh3p5Gs.cjs"))},async"javascript-dom"(){return Promise.resolve().then(()=>require("./index-B41cHtId.cjs"))},async typescript(){return Promise.resolve().then(()=>require("./index-BI2IfhR3.cjs"))},async"typescript-node"(){return Promise.resolve().then(()=>require("./index-DEJ1oa9h.cjs"))},async"typescript-dom"(){return Promise.resolve().then(()=>require("./index-2_9rBSpP.cjs"))},async vue3(){return Promise.resolve().then(()=>require("./index-CjRTXK0e.cjs"))},async"vue3-typescript"(){return Promise.resolve().then(()=>require("./index-BQVf1P-Y.cjs"))},async vue2(){return Promise.resolve().then(()=>require("./index-B8X0IqOU.cjs"))},async"vue2-typescript"(){return Promise.resolve().then(()=>require("./index-BdD-lO5i.cjs"))},async jest(){return Promise.resolve().then(()=>require("./index-jfME37P0.cjs"))},async"jsdoc-based-ts"(){return Promise.resolve().then(()=>require("./index-B7Hdni5X.cjs"))}};async function D(e){await P();const r=e.preset.map(async t=>typeof a[t]=="function"&&(await a[t]()).default).filter(Boolean),i=(await Promise.all(r)).reduce((t,g)=>o(t,g),{});delete i.files;const n=o(i,e.config);return n?(e.silenceRules?n.rules=c(n.rules,e.silenceRules):n.rules=c(n.rules),n):Promise.reject(new Error("No config found"))}exports.merge=o;exports.mergeAll=C;exports.silenceDependencyWarning=k;exports.silenceRules=x;exports.useInsider=D;
3
+ Installing dependencies:`),await h.installPackage(i,{dev:!0,additionalArgs:["-E"]}),process.exit(1)}function k(e){if(typeof e=="boolean"){u=e;return}e.forEach(r=>d.add(String(r)))}function o(...e){return b.merge.withOptions({mergeArrays:!1},...e)}const f=new Set;function x(e){e.forEach(r=>{f.add(r)})}function j(e){if(!Array.isArray(e))return"warn";const[,...r]=e;return["warn",...r]}function c(e,r){let s=r||f;return Array.isArray(s)&&(s=new Set(s)),!e||!s.size?e:(r&&s.forEach(i=>{e[i]||v.warn(`Unknown rule "${i}". Please remove it from the silenced rules list.`)}),Object.entries(e).reduce((i,[n,t])=>(t&&(i[n]=s.has(n)?j(t):t),i),{}))}function C(...e){return e.flat().reduce((r,s)=>o(r,s),{})}const a={async config(){return Promise.resolve().then(()=>require("./index-BmBugWe4.cjs"))},async javascript(){return Promise.resolve().then(()=>require("./index-Bfy7vNWN.cjs"))},async"javascript-node"(){return Promise.resolve().then(()=>require("./index-CRh3p5Gs.cjs"))},async"javascript-dom"(){return Promise.resolve().then(()=>require("./index-B41cHtId.cjs"))},async typescript(){return Promise.resolve().then(()=>require("./index-BI2IfhR3.cjs"))},async"typescript-node"(){return Promise.resolve().then(()=>require("./index-DEJ1oa9h.cjs"))},async"typescript-dom"(){return Promise.resolve().then(()=>require("./index-D1GJEQsB.cjs"))},async vue3(){return Promise.resolve().then(()=>require("./index-CjRTXK0e.cjs"))},async"vue3-typescript"(){return Promise.resolve().then(()=>require("./index-BpettFqt.cjs"))},async vue2(){return Promise.resolve().then(()=>require("./index-B8X0IqOU.cjs"))},async"vue2-typescript"(){return Promise.resolve().then(()=>require("./index-KJJ_HuVd.cjs"))},async jest(){return Promise.resolve().then(()=>require("./index-jfME37P0.cjs"))},async"jsdoc-based-ts"(){return Promise.resolve().then(()=>require("./index-B7Hdni5X.cjs"))}};async function D(e){await P();const r=e.preset.map(async t=>typeof a[t]=="function"&&(await a[t]()).default).filter(Boolean),i=(await Promise.all(r)).reduce((t,g)=>o(t,g),{});delete i.files;const n=o(i,e.config);return n?(e.silenceRules?n.rules=c(n.rules,e.silenceRules):n.rules=c(n.rules),n):Promise.reject(new Error("No config found"))}exports.merge=o;exports.mergeAll=C;exports.silenceDependencyWarning=k;exports.silenceRules=x;exports.useInsider=D;
package/dist/main.js CHANGED
@@ -178,19 +178,19 @@ const p = {
178
178
  return import("./index-DaCYoMI6.js");
179
179
  },
180
180
  async "typescript-dom"() {
181
- return import("./index-DqwajayA.js");
181
+ return import("./index-CpjtSFz3.js");
182
182
  },
183
183
  async vue3() {
184
184
  return import("./index-B7ziFULj.js");
185
185
  },
186
186
  async "vue3-typescript"() {
187
- return import("./index-Dm722vxt.js");
187
+ return import("./index-BeDf640G.js");
188
188
  },
189
189
  async vue2() {
190
190
  return import("./index-VIzBYZzv.js");
191
191
  },
192
192
  async "vue2-typescript"() {
193
- return import("./index-Ch7IiQIe.js");
193
+ return import("./index-qShNK3JA.js");
194
194
  },
195
195
  async jest() {
196
196
  return import("./index-CG7O0RJO.js");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@useinsider/eslint-config",
3
3
  "type": "module",
4
- "version": "1.10.0-beta.3",
4
+ "version": "1.10.0-beta.4",
5
5
  "description": "A collection of ESLint configurations provided by @useinsider, offering support for various environments including Vanilla JS, TypeScript, and framework-specific setups such as Vue 3.",
6
6
  "keywords": [
7
7
  "useinsider",
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("globals"),r=require("./main.cjs"),t=require("./index-BI2IfhR3.cjs"),o=r.merge(t.default,{languageOptions:{globals:{...e.browser}}});exports.default=o;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@eslint/js"),o=require("@stylistic/eslint-plugin"),n=require("eslint-config-airbnb-extended"),c=require("eslint-plugin-import-x"),l=require("eslint-plugin-jsdoc"),u=require("eslint-plugin-vue"),a=require("eslint-plugin-vue-scoped-css"),p=require("globals"),s=require("typescript-eslint"),e=require("./stylistic-BGCob372.cjs"),d=require("./typescript-BvnP4VCM.cjs"),g=require("./vue-D2lo_IGG.cjs"),t=require("./main.cjs"),m=t.mergeAll(s.config(i.configs.recommended,c.importX.flatConfigs.recommended,n.configs.base.all,...s.configs.recommended,...s.configs.recommendedTypeChecked.filter(r=>!r.plugins),...u.configs["flat/recommended"].map(r=>(delete r.files,r)),...a.configs["flat/recommended"],l.configs["flat/recommended-typescript-error"],t.merge(e.preConfig(),e.core,e.importRules,e.cspell,{plugins:{"@stylistic":o}},e.stylisticRules,g.vue,d.typescript,e.postConfig(),{languageOptions:{globals:{...p.browser},parserOptions:{parser:s.parser,sourceType:"module",ecmaFeatures:{jsx:!0},extraFileExtensions:[".vue"]}},settings:{jsdoc:{mode:"typescript",tagNamePreference:{callback:"watch",desc:"use"}}}})));exports.default=m;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@eslint/js"),o=require("@stylistic/eslint-plugin"),n=require("eslint-config-airbnb-extended"),c=require("eslint-plugin-import-x"),l=require("eslint-plugin-jsdoc"),u=require("eslint-plugin-vue"),p=require("eslint-plugin-vue-scoped-css"),a=require("globals"),s=require("typescript-eslint"),e=require("./stylistic-BGCob372.cjs"),m=require("./typescript-BvnP4VCM.cjs"),d=require("./vue2-CpDCkxcX.cjs"),t=require("./main.cjs"),g=t.mergeAll(s.config(i.configs.recommended,c.importX.flatConfigs.recommended,n.configs.base.all,...s.configs.recommended,...s.configs.recommendedTypeChecked.filter(r=>!r.plugins),...u.configs["flat/vue2-recommended"].map(r=>(delete r.files,r)),...p.configs["flat/vue2-recommended"],l.configs["flat/recommended-typescript-error"],t.merge(e.preConfig(),e.core,e.importRules,e.cspell,{plugins:{"@stylistic":o}},e.stylisticRules,d.vue2Composition,m.typescript,e.postConfig(),{languageOptions:{globals:{...a.browser},parserOptions:{parser:s.parser,sourceType:"module",ecmaFeatures:{jsx:!0},extraFileExtensions:[".vue"]}},settings:{jsdoc:{mode:"typescript",tagNamePreference:{callback:"watch",desc:"use"}}}})));exports.default=g;
@@ -1,40 +0,0 @@
1
- import r from "@eslint/js";
2
- import s from "@stylistic/eslint-plugin";
3
- import i from "eslint-config-airbnb-extended";
4
- import { importX as t } from "eslint-plugin-import-x";
5
- import m from "eslint-plugin-jsdoc";
6
- import p from "eslint-plugin-vue";
7
- import a from "eslint-plugin-vue-scoped-css";
8
- import c from "globals";
9
- import o from "typescript-eslint";
10
- import { b as n, s as l, a as f, i as d, c as g, p as u } from "./stylistic-DcItXUA4.js";
11
- import { t as b } from "./typescript-Dg4zKuYI.js";
12
- import { a as y } from "./vue2-7aDd9M-9.js";
13
- import { mergeAll as C, merge as x } from "./main.js";
14
- const E = C(o.config(r.configs.recommended, t.flatConfigs.recommended, i.configs.base.all, ...o.configs.recommended, ...o.configs.recommendedTypeChecked.filter((e) => !e.plugins), ...p.configs["flat/vue2-recommended"].map((e) => (delete e.files, e)), ...a.configs["flat/vue2-recommended"], m.configs["flat/recommended-typescript-error"], x(u(), g, d, f, { plugins: { "@stylistic": s } }, l, y, b, n(), {
15
- languageOptions: {
16
- globals: {
17
- ...c.browser
18
- },
19
- parserOptions: {
20
- parser: o.parser,
21
- sourceType: "module",
22
- ecmaFeatures: {
23
- jsx: !0
24
- },
25
- extraFileExtensions: [".vue"]
26
- }
27
- },
28
- settings: {
29
- jsdoc: {
30
- mode: "typescript",
31
- tagNamePreference: {
32
- callback: "watch",
33
- desc: "use"
34
- }
35
- }
36
- }
37
- })));
38
- export {
39
- E as default
40
- };
@@ -1,40 +0,0 @@
1
- import o from "@eslint/js";
2
- import s from "@stylistic/eslint-plugin";
3
- import t from "eslint-config-airbnb-extended";
4
- import { importX as i } from "eslint-plugin-import-x";
5
- import m from "eslint-plugin-jsdoc";
6
- import p from "eslint-plugin-vue";
7
- import c from "eslint-plugin-vue-scoped-css";
8
- import a from "globals";
9
- import r from "typescript-eslint";
10
- import { b as l, s as n, a as f, i as d, c as g, p as u } from "./stylistic-DcItXUA4.js";
11
- import { t as b } from "./typescript-Dg4zKuYI.js";
12
- import { v as y } from "./vue-5XWMLJUh.js";
13
- import { mergeAll as x, merge as C } from "./main.js";
14
- const E = x(r.config(o.configs.recommended, i.flatConfigs.recommended, t.configs.base.all, ...r.configs.recommended, ...r.configs.recommendedTypeChecked.filter((e) => !e.plugins), ...p.configs["flat/recommended"].map((e) => (delete e.files, e)), ...c.configs["flat/recommended"], m.configs["flat/recommended-typescript-error"], C(u(), g, d, f, { plugins: { "@stylistic": s } }, n, y, b, l(), {
15
- languageOptions: {
16
- globals: {
17
- ...a.browser
18
- },
19
- parserOptions: {
20
- parser: r.parser,
21
- sourceType: "module",
22
- ecmaFeatures: {
23
- jsx: !0
24
- },
25
- extraFileExtensions: [".vue"]
26
- }
27
- },
28
- settings: {
29
- jsdoc: {
30
- mode: "typescript",
31
- tagNamePreference: {
32
- callback: "watch",
33
- desc: "use"
34
- }
35
- }
36
- }
37
- })));
38
- export {
39
- E as default
40
- };