@useinsider/eslint-config 1.3.0-beta.18 → 1.3.0-beta.20

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/README.md CHANGED
@@ -14,6 +14,7 @@
14
14
  ## Prerequisites
15
15
 
16
16
  - NodeJS 20+
17
+ - ESLint 8.57.1
17
18
 
18
19
  ## Available Presets
19
20
 
@@ -22,18 +23,23 @@ frameworks. Here's a list of available presets:
22
23
 
23
24
  ### Vanilla 🍦
24
25
 
25
- | Environment | Browser (DOM) | Node |
26
- | :---------------- | :-------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------ |
27
- | **EcmaScript/JS** | [`@useinsider/eslint-config/dom`](./src/configs/config#readme) | [`@useinsider/eslint-config`](./src/configs/node#readme)<br>[`@useinsider/eslint-config/node`](./src/configs/node#readme) |
28
- | **TypeScript** | [`@useinsider/eslint-config/typescript-dom`](./src/configs/typescript-dom#readme) | [`@useinsider/eslint-config/typescript`](./src/configs/typescript#readme) |
29
- | **Config files** | | [`@useinsider/eslint-config/config`](./src/configs/config#readme) |
26
+ There are additional presets for DOM (browser) and Node.js environments, beside
27
+ the vanilla configuration. The vanilla is suitable for general JavaScript and
28
+ TypeScript projects that does not have any specific environment and can be
29
+ configured for different environments, such as ServiceWorkers, WebWorkers, etc.
30
+
31
+ | Environment | Vanilla | Browser (DOM) | Node |
32
+ | :---------------- | :---------------------------------------------- | :------------------------------------------------------ | :-------------------------------------------------------- |
33
+ | **EcmaScript/JS** | [`javascript`](./src/configs/javascript#readme) | [`javascript-dom`](./src/configs/javascript-dom#readme) | [`javascript-node`](./src/configs/javascript-node#readme) |
34
+ | **TypeScript** | [`typescript`](./src/configs/typescript#readme) | [`typescript-dom`](./src/configs/typescript-dom#readme) | [`typescript-node`](./src/configs/typescript-node#readme) |
35
+ | **Config files** | [`config`](./src/configs/config#readme) | - | - |
30
36
 
31
37
  ### Framework-specific
32
38
 
33
- | Environment | JavaScript | TypeScript |
34
- | :------------------------------------ | :------------------------------------------------------------ | :---------------------------------------------------------------------------------- |
35
- | **Vue 3 & 2 (Setup/Composition API)** | [`@useinsider/eslint-config/vue3`](./src/configs/vue3#readme) | [`@useinsider/eslint-config/vue3-typescript`](./src/configs/vue3-typescript#readme) |
36
- | **Vue 2 (Options API)** | [`@useinsider/eslint-config/vue2`](./src/configs/vue2#readme) | - |
39
+ | Environment | JavaScript | TypeScript |
40
+ | :------------------------------------ | :---------------------------------- | :-------------------------------------------------------- |
41
+ | **Vue 3 & 2 (Setup/Composition API)** | [`vue3`](./src/configs/vue3#readme) | [`vue3-typescript`](./src/configs/vue3-typescript#readme) |
42
+ | **Vue 2 (Options API)** | [`vue2`](./src/configs/vue2#readme) | - |
37
43
 
38
44
  ### ⏳ Upcoming Configurations
39
45
 
@@ -1 +1 @@
1
- "use strict";const o=require("node:path"),c=require("node:url"),i=require("@eslint/eslintrc"),n=require("./main.cjs");var r=typeof document<"u"?document.currentScript:null;const t=new i.FlatCompat({baseDirectory:o.dirname(c.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:r&&r.src||new URL("compat-Cy03xRn0.cjs",document.baseURI).href))}),l={extends:(...e)=>n.mergeAll(t.extends(...e)),config:e=>n.mergeAll(t.config(e)),plugins:(...e)=>n.mergeAll(t.plugins(...e)),env:e=>n.mergeAll(t.env(e))};exports.compat=l;
1
+ "use strict";const c=require("node:path"),o=require("node:url"),i=require("@eslint/eslintrc"),n=require("./main.cjs");var r=typeof document<"u"?document.currentScript:null;const t=new i.FlatCompat({baseDirectory:c.dirname(o.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:r&&r.src||new URL("compat-CZyl_Sy0.cjs",document.baseURI).href))}),l={extends:(...e)=>n.mergeAll(t.extends(...e)),config:e=>n.mergeAll(t.config(e)),plugins:(...e)=>n.mergeAll(t.plugins(...e)),env:e=>n.mergeAll(t.env(e))};exports.compat=l;
@@ -0,0 +1,3 @@
1
+ import type { Linter } from 'eslint';
2
+ declare const _default: Linter.FlatConfig;
3
+ export default _default;
@@ -1,3 +1,3 @@
1
1
  import type { Linter } from 'eslint';
2
- declare const _default: Linter.FlatConfig<Linter.RulesRecord>;
2
+ declare const _default: Linter.FlatConfig;
3
3
  export default _default;
@@ -0,0 +1,3 @@
1
+ import type { Linter } from 'eslint';
2
+ declare const _default: Linter.FlatConfig;
3
+ export default _default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("node:path"),s=require("node:url"),c=require("@eslint/eslintrc"),i=require("eslint-plugin-jsdoc"),r=require("./base-BQL2gY6S.cjs"),u=require("./rules/core.cjs"),l=require("./rules/cspell.cjs"),d=require("./rules/importRules.cjs"),a=require("./rules/jsdoc.cjs"),m=require("./rules/stylistic.cjs"),e=require("./main.cjs");var n=typeof document<"u"?document.currentScript:null;const t=new c.FlatCompat({baseDirectory:o.dirname(s.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:n&&n.src||new URL("index-B5FZUBe8.cjs",document.baseURI).href))}),p=e.merge(e.mergeAll(t.extends("eslint-config-airbnb-base")),i.configs["flat/recommended"],e.mergeAll(t.extends("plugin:@cspell/recommended")),r.preConfig(),u,d,l,m,a,r.postConfig());exports.default=p;
@@ -0,0 +1,33 @@
1
+ import i from "@eslint/js";
2
+ import c from "eslint-plugin-jsdoc";
3
+ import e from "typescript-eslint";
4
+ import { p as n, a } from "./base-Dd7loOAV.js";
5
+ import f from "./rules/core.js";
6
+ import d from "./rules/cspell.js";
7
+ import l from "./rules/importRules.js";
8
+ import g from "./rules/jsdoc.js";
9
+ import b from "./rules/stylistic.js";
10
+ import u from "./rules/typescript.js";
11
+ import { c as m } from "./compat-DfBTP0AK.js";
12
+ import { mergeAll as y, merge as s } from "./main.js";
13
+ const p = s(m.extends("airbnb-base", "airbnb-typescript/base"));
14
+ var r, o, t;
15
+ (t = (o = (r = p.languageOptions) == null ? void 0 : r.parserOptions) == null ? void 0 : o.ecmaFeatures) == null || delete t.globalReturn;
16
+ const N = y(e.config(i.configs.recommended, p, ...e.configs.recommended, ...e.configs.recommendedTypeChecked, c.configs["flat/recommended-typescript-error"], s(m.extends("plugin:@cspell/recommended"), a(), f, l, d, b, g, u, n(), {
17
+ settings: {
18
+ jsdoc: {
19
+ mode: "typescript",
20
+ tagNamePreference: {
21
+ callback: "watch",
22
+ desc: "use"
23
+ }
24
+ },
25
+ "import/resolver": {
26
+ typescript: !0,
27
+ node: !0
28
+ }
29
+ }
30
+ })));
31
+ export {
32
+ N as default
33
+ };
@@ -0,0 +1,13 @@
1
+ import o from "globals";
2
+ import { merge as r } from "./main.js";
3
+ import a from "./index-BnmYAvIK.js";
4
+ const s = r(a, {
5
+ languageOptions: {
6
+ globals: {
7
+ ...o.browser
8
+ }
9
+ }
10
+ });
11
+ export {
12
+ s as default
13
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("globals"),t=require("./main.cjs"),n=require("./index-B5FZUBe8.cjs"),o=t.merge(n.default,{languageOptions:{globals:{...e.node}}});exports.default=o;
@@ -0,0 +1,13 @@
1
+ import o from "globals";
2
+ import { merge as r } from "./main.js";
3
+ import a from "./index-BnmYAvIK.js";
4
+ const i = r(a, {
5
+ languageOptions: {
6
+ globals: {
7
+ ...o.node
8
+ }
9
+ }
10
+ });
11
+ export {
12
+ i as default
13
+ };
@@ -0,0 +1,17 @@
1
+ import { dirname as m } from "node:path";
2
+ import { fileURLToPath as t } from "node:url";
3
+ import { FlatCompat as e } from "@eslint/eslintrc";
4
+ import i from "eslint-plugin-jsdoc";
5
+ import { p, a as s } from "./base-Dd7loOAV.js";
6
+ import f from "./rules/core.js";
7
+ import a from "./rules/cspell.js";
8
+ import l from "./rules/importRules.js";
9
+ import n from "./rules/jsdoc.js";
10
+ import c from "./rules/stylistic.js";
11
+ import { merge as d, mergeAll as o } from "./main.js";
12
+ const r = new e({
13
+ baseDirectory: m(t(import.meta.url))
14
+ }), w = d(o(r.extends("eslint-config-airbnb-base")), i.configs["flat/recommended"], o(r.extends("plugin:@cspell/recommended")), s(), f, l, a, c, n, p());
15
+ export {
16
+ w as default
17
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@eslint/js"),a=require("eslint-plugin-jsdoc"),p=require("eslint-plugin-vue"),d=require("eslint-plugin-vue-scoped-css"),m=require("globals"),s=require("typescript-eslint"),t=require("./base-BQL2gY6S.cjs"),g=require("./rules/core.cjs"),b=require("./rules/cspell.cjs"),q=require("./rules/importRules.cjs"),f=require("./rules/jsdoc.cjs"),y=require("./rules/stylistic.cjs"),_=require("./rules/typescript.cjs"),j=require("./rules/vue.cjs"),i=require("./compat-Cy03xRn0.cjs"),e=require("./main.cjs"),u=e.merge(i.compat.extends("airbnb-base","airbnb-typescript/base"));var n,o,c;(c=(o=(n=u.languageOptions)==null?void 0:n.parserOptions)==null?void 0:o.ecmaFeatures)==null||delete c.globalReturn;const x=e.mergeAll(s.config(l.configs.recommended,u,...s.configs.recommended,...p.configs["flat/recommended"].map(r=>(delete r.files,r)),...d.configs["flat/recommended"],a.configs["flat/recommended-typescript-error"],e.merge(i.compat.extends("plugin:@cspell/recommended"),t.preConfig(),g,q,b,y,f,j,_,t.postConfig(),{languageOptions:{globals:{...m.browser},parserOptions:{parser:"@typescript-eslint/parser",sourceType:"module",ecmaFeatures:{jsx:!0},extraFileExtensions:[".vue"]}},settings:{jsdoc:{mode:"typescript",tagNamePreference:{callback:"watch",desc:"use"}}}})));exports.default=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@eslint/js"),a=require("eslint-plugin-jsdoc"),p=require("eslint-plugin-vue"),d=require("eslint-plugin-vue-scoped-css"),m=require("globals"),s=require("typescript-eslint"),t=require("./base-BQL2gY6S.cjs"),g=require("./rules/core.cjs"),b=require("./rules/cspell.cjs"),q=require("./rules/importRules.cjs"),f=require("./rules/jsdoc.cjs"),y=require("./rules/stylistic.cjs"),_=require("./rules/typescript.cjs"),j=require("./rules/vue.cjs"),i=require("./compat-CZyl_Sy0.cjs"),e=require("./main.cjs"),u=e.merge(i.compat.extends("airbnb-base","airbnb-typescript/base"));var n,o,c;(c=(o=(n=u.languageOptions)==null?void 0:n.parserOptions)==null?void 0:o.ecmaFeatures)==null||delete c.globalReturn;const x=e.mergeAll(s.config(l.configs.recommended,u,...s.configs.recommended,...p.configs["flat/recommended"].map(r=>(delete r.files,r)),...d.configs["flat/recommended"],a.configs["flat/recommended-typescript-error"],e.merge(i.compat.extends("plugin:@cspell/recommended"),t.preConfig(),g,q,b,y,f,j,_,t.postConfig(),{languageOptions:{globals:{...m.browser},parserOptions:{parser:"@typescript-eslint/parser",sourceType:"module",ecmaFeatures:{jsx:!0},extraFileExtensions:[".vue"]}},settings:{jsdoc:{mode:"typescript",tagNamePreference:{callback:"watch",desc:"use"}}}})));exports.default=x;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@eslint/js"),l=require("eslint-plugin-jsdoc"),e=require("typescript-eslint"),s=require("./base-BQL2gY6S.cjs"),p=require("./rules/core.cjs"),a=require("./rules/cspell.cjs"),d=require("./rules/importRules.cjs"),m=require("./rules/jsdoc.cjs"),g=require("./rules/stylistic.cjs"),b=require("./rules/typescript.cjs"),n=require("./compat-CZyl_Sy0.cjs"),r=require("./main.cjs"),i=r.merge(n.compat.extends("airbnb-base","airbnb-typescript/base"));var t,c,o;(o=(c=(t=i.languageOptions)==null?void 0:t.parserOptions)==null?void 0:c.ecmaFeatures)==null||delete o.globalReturn;const q=r.mergeAll(e.config(u.configs.recommended,i,...e.configs.recommended,...e.configs.recommendedTypeChecked,l.configs["flat/recommended-typescript-error"],r.merge(n.compat.extends("plugin:@cspell/recommended"),s.preConfig(),p,d,a,g,m,b,s.postConfig(),{settings:{jsdoc:{mode:"typescript",tagNamePreference:{callback:"watch",desc:"use"}},"import/resolver":{typescript:!0,node:!0}}})));exports.default=q;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("globals"),t=require("./main.cjs"),n=require("./index-CCngt07f.cjs"),o=t.merge(n.default,{languageOptions:{globals:{...e.node}}});exports.default=o;
@@ -0,0 +1,13 @@
1
+ import o from "globals";
2
+ import { merge as r } from "./main.js";
3
+ import t from "./index-BADS9AaT.js";
4
+ const a = r(t, {
5
+ languageOptions: {
6
+ globals: {
7
+ ...o.node
8
+ }
9
+ }
10
+ });
11
+ export {
12
+ a as default
13
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("globals"),r=require("./main.cjs"),t=require("./index-B5FZUBe8.cjs"),o=r.merge(t.default,{languageOptions:{globals:{...e.browser}}});exports.default=o;
@@ -0,0 +1,13 @@
1
+ import o from "globals";
2
+ import { merge as r } from "./main.js";
3
+ import t from "./index-BADS9AaT.js";
4
+ const s = r(t, {
5
+ languageOptions: {
6
+ globals: {
7
+ ...o.browser
8
+ }
9
+ }
10
+ });
11
+ export {
12
+ s as default
13
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("globals"),r=require("./main.cjs"),t=require("./index-CCngt07f.cjs"),o=r.merge(t.default,{languageOptions:{globals:{...e.browser}}});exports.default=o;
package/dist/main.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=o=>{if(typeof o=="object"&&o!==null){if(typeof Object.getPrototypeOf=="function"){const r=Object.getPrototypeOf(o);return r===Object.prototype||r===null}return Object.prototype.toString.call(o)==="[object Object]"}return!1},n=(...o)=>o.reduce((r,t)=>{if(Array.isArray(t))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(t).forEach(e=>{["__proto__","constructor","prototype"].includes(e)||(Array.isArray(r[e])&&Array.isArray(t[e])?r[e]=n.options.mergeArrays?n.options.uniqueArrayItems?Array.from(new Set(r[e].concat(t[e]))):[...r[e],...t[e]]:t[e]:c(r[e])&&c(t[e])?r[e]=n(r[e],t[e]):r[e]=t[e]===void 0?n.options.allowUndefinedOverrides?t[e]:r[e]:t[e])}),r},{}),a={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};n.options=a;n.withOptions=(o,...r)=>{n.options=Object.assign(Object.assign({},a),o);const t=n(...r);return n.options=a,t};function i(...o){return n.withOptions({mergeArrays:!1},...o)}function p(...o){return o.flat().reduce((r,t)=>i(r,t),{})}const u={async node(){return Promise.resolve().then(()=>require("./index-AFtKHtBi.cjs"))},async config(){return Promise.resolve().then(()=>require("./index-CAuGyIr4.cjs"))},async dom(){return Promise.resolve().then(()=>require("./index-VkwuK_gg.cjs"))},async typescript(){return Promise.resolve().then(()=>require("./index-DZtAP4df.cjs"))},async"typescript-dom"(){return Promise.resolve().then(()=>require("./index-DWtvOCvF.cjs"))},async vue3(){return Promise.resolve().then(()=>require("./index-BPS1S4-r.cjs"))},async"vue3-typescript"(){return Promise.resolve().then(()=>require("./index-KmM7HSI-.cjs"))},async vue2(){return Promise.resolve().then(()=>require("./index-DLjVlGbl.cjs"))}};async function l(o){const r=o.preset.map(async s=>typeof u[s]=="function"&&(await u[s]()).default).filter(Boolean),t=await Promise.all(r),e=i(t.reduce((s,f)=>i(s,f),{}),o.config);return e||Promise.reject(new Error("No config found"))}exports.merge=i;exports.mergeAll=p;exports.useInsider=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=o=>{if(typeof o=="object"&&o!==null){if(typeof Object.getPrototypeOf=="function"){const r=Object.getPrototypeOf(o);return r===Object.prototype||r===null}return Object.prototype.toString.call(o)==="[object Object]"}return!1},n=(...o)=>o.reduce((r,t)=>{if(Array.isArray(t))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(t).forEach(e=>{["__proto__","constructor","prototype"].includes(e)||(Array.isArray(r[e])&&Array.isArray(t[e])?r[e]=n.options.mergeArrays?n.options.uniqueArrayItems?Array.from(new Set(r[e].concat(t[e]))):[...r[e],...t[e]]:t[e]:c(r[e])&&c(t[e])?r[e]=n(r[e],t[e]):r[e]=t[e]===void 0?n.options.allowUndefinedOverrides?t[e]:r[e]:t[e])}),r},{}),a={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};n.options=a;n.withOptions=(o,...r)=>{n.options=Object.assign(Object.assign({},a),o);const t=n(...r);return n.options=a,t};function i(...o){return n.withOptions({mergeArrays:!1},...o)}function f(...o){return o.flat().reduce((r,t)=>i(r,t),{})}const u={async config(){return Promise.resolve().then(()=>require("./index-CAuGyIr4.cjs"))},async javascript(){return Promise.resolve().then(()=>require("./index-B5FZUBe8.cjs"))},async"javascript-node"(){return Promise.resolve().then(()=>require("./index-BRXTBIK6.cjs"))},async"javascript-dom"(){return Promise.resolve().then(()=>require("./index-CjloOm7h.cjs"))},async typescript(){return Promise.resolve().then(()=>require("./index-CCngt07f.cjs"))},async"typescript-node"(){return Promise.resolve().then(()=>require("./index-CZG4LLz1.cjs"))},async"typescript-dom"(){return Promise.resolve().then(()=>require("./index-ZUN0xFSs.cjs"))},async vue3(){return Promise.resolve().then(()=>require("./index-BPS1S4-r.cjs"))},async"vue3-typescript"(){return Promise.resolve().then(()=>require("./index-Brj-OnR2.cjs"))},async vue2(){return Promise.resolve().then(()=>require("./index-DLjVlGbl.cjs"))}};async function l(o){const r=o.preset.map(async s=>typeof u[s]=="function"&&(await u[s]()).default).filter(Boolean),t=await Promise.all(r),e=i(t.reduce((s,p)=>i(s,p),{}),o.config);return e||Promise.reject(new Error("No config found"))}exports.merge=i;exports.mergeAll=f;exports.useInsider=l;
package/dist/main.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  import type { Linter } from 'eslint';
2
2
  declare const configMap: {
3
- node(): Promise<typeof import("./configs/node")>;
4
3
  config(): Promise<typeof import("./configs/config")>;
5
- dom(): Promise<typeof import("./configs/dom")>;
4
+ javascript(): Promise<typeof import("./configs/javascript")>;
5
+ 'javascript-node'(): Promise<typeof import("./configs/javascript-node")>;
6
+ 'javascript-dom'(): Promise<typeof import("./configs/javascript-dom")>;
6
7
  typescript(): Promise<typeof import("./configs/typescript")>;
8
+ 'typescript-node'(): Promise<typeof import("./configs/typescript-node")>;
7
9
  'typescript-dom'(): Promise<typeof import("./configs/typescript-dom")>;
8
10
  vue3(): Promise<typeof import("./configs/vue3")>;
9
11
  'vue3-typescript'(): Promise<typeof import("./configs/vue3-typescript")>;
package/dist/main.js CHANGED
@@ -1,17 +1,17 @@
1
- const c = (e) => {
2
- if (typeof e == "object" && e !== null) {
1
+ const p = (o) => {
2
+ if (typeof o == "object" && o !== null) {
3
3
  if (typeof Object.getPrototypeOf == "function") {
4
- const r = Object.getPrototypeOf(e);
4
+ const r = Object.getPrototypeOf(o);
5
5
  return r === Object.prototype || r === null;
6
6
  }
7
- return Object.prototype.toString.call(e) === "[object Object]";
7
+ return Object.prototype.toString.call(o) === "[object Object]";
8
8
  }
9
9
  return !1;
10
- }, n = (...e) => e.reduce((r, o) => {
11
- if (Array.isArray(o))
10
+ }, n = (...o) => o.reduce((r, e) => {
11
+ if (Array.isArray(e))
12
12
  throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");
13
- return Object.keys(o).forEach((t) => {
14
- ["__proto__", "constructor", "prototype"].includes(t) || (Array.isArray(r[t]) && Array.isArray(o[t]) ? r[t] = n.options.mergeArrays ? n.options.uniqueArrayItems ? Array.from(new Set(r[t].concat(o[t]))) : [...r[t], ...o[t]] : o[t] : c(r[t]) && c(o[t]) ? r[t] = n(r[t], o[t]) : r[t] = o[t] === void 0 ? n.options.allowUndefinedOverrides ? o[t] : r[t] : o[t]);
13
+ return Object.keys(e).forEach((t) => {
14
+ ["__proto__", "constructor", "prototype"].includes(t) || (Array.isArray(r[t]) && Array.isArray(e[t]) ? r[t] = n.options.mergeArrays ? n.options.uniqueArrayItems ? Array.from(new Set(r[t].concat(e[t]))) : [...r[t], ...e[t]] : e[t] : p(r[t]) && p(e[t]) ? r[t] = n(r[t], e[t]) : r[t] = e[t] === void 0 ? n.options.allowUndefinedOverrides ? e[t] : r[t] : e[t]);
15
15
  }), r;
16
16
  }, {}), s = {
17
17
  allowUndefinedOverrides: !0,
@@ -19,32 +19,38 @@ const c = (e) => {
19
19
  uniqueArrayItems: !0
20
20
  };
21
21
  n.options = s;
22
- n.withOptions = (e, ...r) => {
23
- n.options = Object.assign(Object.assign({}, s), e);
24
- const o = n(...r);
25
- return n.options = s, o;
22
+ n.withOptions = (o, ...r) => {
23
+ n.options = Object.assign(Object.assign({}, s), o);
24
+ const e = n(...r);
25
+ return n.options = s, e;
26
26
  };
27
- function a(...e) {
28
- return n.withOptions({ mergeArrays: !1 }, ...e);
27
+ function a(...o) {
28
+ return n.withOptions({ mergeArrays: !1 }, ...o);
29
29
  }
30
- function u(...e) {
31
- return e.flat().reduce((r, o) => a(r, o), {});
30
+ function u(...o) {
31
+ return o.flat().reduce((r, e) => a(r, e), {});
32
32
  }
33
- const p = {
34
- async node() {
35
- return import("./index-HOFGS2wX.js");
36
- },
33
+ const c = {
37
34
  async config() {
38
35
  return import("./index-CixUmpPQ.js");
39
36
  },
40
- async dom() {
41
- return import("./index-IIVQtmV1.js");
37
+ async javascript() {
38
+ return import("./index-BnmYAvIK.js");
39
+ },
40
+ async "javascript-node"() {
41
+ return import("./index-BhzsYT7t.js");
42
+ },
43
+ async "javascript-dom"() {
44
+ return import("./index-BNmy0szt.js");
42
45
  },
43
46
  async typescript() {
44
- return import("./index-jZZHYSKb.js");
47
+ return import("./index-BADS9AaT.js");
48
+ },
49
+ async "typescript-node"() {
50
+ return import("./index-C_hDS_Wu.js");
45
51
  },
46
52
  async "typescript-dom"() {
47
- return import("./index-DxssMFTY.js");
53
+ return import("./index-UFJ1LWlt.js");
48
54
  },
49
55
  async vue3() {
50
56
  return import("./index-Bi0aTktN.js");
@@ -56,8 +62,8 @@ const p = {
56
62
  return import("./index-BVRhCxZ-.js");
57
63
  }
58
64
  };
59
- async function m(e) {
60
- const r = e.preset.map(async (i) => typeof p[i] == "function" && (await p[i]()).default).filter(Boolean), o = await Promise.all(r), t = a(o.reduce((i, f) => a(i, f), {}), e.config);
65
+ async function m(o) {
66
+ const r = o.preset.map(async (i) => typeof c[i] == "function" && (await c[i]()).default).filter(Boolean), e = await Promise.all(r), t = a(e.reduce((i, f) => a(i, f), {}), o.config);
61
67
  return t || Promise.reject(new Error("No config found"));
62
68
  }
63
69
  export {
@@ -1 +1 @@
1
- "use strict";const e={rules:{"jsdoc/check-param-names":["error"],"jsdoc/check-tag-names":["error"],"jsdoc/no-undefined-types":"off","jsdoc/require-param":["error",{enableRestElementFixer:!1,enableRootFixer:!1}],"jsdoc/require-jsdoc":["off"],"jsdoc/require-param-description":"off","jsdoc/require-param-type":["error"],"jsdoc/require-property-description":"off","jsdoc/require-returns":["error",{contexts:["TSInterfaceDeclaration","TSMethodSignature"],forceRequireReturn:!0,exemptedBy:["inheritdoc","watch"]}],"jsdoc/require-returns-check":["error"],"jsdoc/require-returns-description":"off","jsdoc/tag-lines":["error"],"jsdoc/valid-types":"off","jsdoc/check-types":["error"],"jsdoc/no-multi-asterisks":["error"],"jsdoc/check-alignment":["error"]}};module.exports=e;
1
+ "use strict";const e={rules:{"jsdoc/check-param-names":["error"],"jsdoc/check-tag-names":["error"],"jsdoc/no-undefined-types":"off","jsdoc/require-param":["error",{enableRestElementFixer:!1,enableRootFixer:!1}],"jsdoc/require-jsdoc":["off"],"jsdoc/require-param-description":"off","jsdoc/require-param-type":["error"],"jsdoc/require-property-description":"off","jsdoc/require-returns":["error",{contexts:["TSInterfaceDeclaration","TSMethodSignature"],forceRequireReturn:!0,exemptedBy:["inheritdoc","watch"]}],"jsdoc/require-returns-check":["error"],"jsdoc/require-returns-description":"off","jsdoc/tag-lines":["error"],"jsdoc/valid-types":"off","jsdoc/check-types":["error"],"jsdoc/no-multi-asterisks":["error"],"jsdoc/check-alignment":["error"],"jsdoc/sort-tags":["error",{linesBetween:1,tagSequence:[{tags:["todo","description","deprecated","namespace","private","protected","public","static","readonly","since","access","template","typedef","class","augments","mixes","extends","interface","this","constructor","alias","memberof","example","use","see","link","global","fires","listens","type","param","property","yields","returns","lends","override","todo"]}]}]}};module.exports=e;
@@ -22,45 +22,51 @@ const e = {
22
22
  "jsdoc/valid-types": "off",
23
23
  "jsdoc/check-types": ["error"],
24
24
  "jsdoc/no-multi-asterisks": ["error"],
25
- "jsdoc/check-alignment": ["error"]
26
- // 'jsdoc/sort-tags': ['error', {
27
- // linesBetween: 1,
28
- // tagSequence: [{
29
- // tags: [
30
- // 'description',
31
- // 'deprecated',
32
- // 'TODO',
33
- // 'private',
34
- // 'protected',
35
- // 'public',
36
- // 'static',
37
- // 'since',
38
- // 'access',
39
- // 'template',
40
- // 'class',
41
- // 'augments',
42
- // 'mixes',
43
- // 'extends',
44
- // 'interface',
45
- // 'this',
46
- // 'constructor',
47
- // 'alias',
48
- // 'memberof',
49
- // 'see',
50
- // 'link',
51
- // 'global',
52
- // 'fires',
53
- // 'listens',
54
- // 'type',
55
- // 'param',
56
- // 'yields',
57
- // 'returns',
58
- // 'lends',
59
- // 'override',
60
- // 'TODO',
61
- // ],
62
- // }],
63
- // }],
25
+ "jsdoc/check-alignment": ["error"],
26
+ "jsdoc/sort-tags": ["error", {
27
+ linesBetween: 1,
28
+ tagSequence: [{
29
+ tags: [
30
+ "todo",
31
+ "description",
32
+ "deprecated",
33
+ "namespace",
34
+ "private",
35
+ "protected",
36
+ "public",
37
+ "static",
38
+ "readonly",
39
+ "since",
40
+ "access",
41
+ "template",
42
+ "typedef",
43
+ "class",
44
+ "augments",
45
+ "mixes",
46
+ "extends",
47
+ "interface",
48
+ "this",
49
+ "constructor",
50
+ "alias",
51
+ "memberof",
52
+ "example",
53
+ "use",
54
+ "see",
55
+ "link",
56
+ "global",
57
+ "fires",
58
+ "listens",
59
+ "type",
60
+ "param",
61
+ "property",
62
+ "yields",
63
+ "returns",
64
+ "lends",
65
+ "override",
66
+ "todo"
67
+ ]
68
+ }]
69
+ }]
64
70
  }
65
71
  };
66
72
  export {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@useinsider/eslint-config",
3
3
  "type": "module",
4
- "version": "1.3.0-beta.18",
4
+ "version": "1.3.0-beta.20",
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 o=require("node:path"),s=require("node:url"),i=require("@eslint/eslintrc"),c=require("eslint-plugin-jsdoc"),u=require("globals"),r=require("./base-BQL2gY6S.cjs"),l=require("./rules/core.cjs"),d=require("./rules/cspell.cjs"),a=require("./rules/importRules.cjs"),m=require("./rules/jsdoc.cjs"),p=require("./rules/stylistic.cjs"),e=require("./main.cjs");var n=typeof document<"u"?document.currentScript:null;const t=new i.FlatCompat({baseDirectory:o.dirname(s.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:n&&n.src||new URL("index-AFtKHtBi.cjs",document.baseURI).href))}),f=e.merge(e.mergeAll(t.extends("eslint-config-airbnb-base")),c.configs["flat/recommended"],e.mergeAll(t.extends("plugin:@cspell/recommended")),r.preConfig(),l,a,d,p,m,r.postConfig(),{languageOptions:{globals:{...u.node}}});exports.default=f;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@eslint/js"),u=require("eslint-plugin-jsdoc"),a=require("globals"),e=require("typescript-eslint"),s=require("./base-BQL2gY6S.cjs"),d=require("./rules/core.cjs"),g=require("./rules/cspell.cjs"),p=require("./rules/importRules.cjs"),m=require("./rules/jsdoc.cjs"),b=require("./rules/stylistic.cjs"),q=require("./rules/typescript.cjs"),n=require("./compat-Cy03xRn0.cjs"),r=require("./main.cjs"),i=r.merge(n.compat.extends("airbnb-base","airbnb-typescript/base"));var t,o,c;(c=(o=(t=i.languageOptions)==null?void 0:t.parserOptions)==null?void 0:o.ecmaFeatures)==null||delete c.globalReturn;const f=r.mergeAll(e.config(l.configs.recommended,i,...e.configs.recommended,...e.configs.recommendedTypeChecked,u.configs["flat/recommended-typescript-error"],r.merge(n.compat.extends("plugin:@cspell/recommended"),s.preConfig(),d,p,g,b,m,q,s.postConfig(),{languageOptions:{globals:{...a.browser}},settings:{jsdoc:{mode:"typescript",tagNamePreference:{callback:"watch",desc:"use"}}}})));exports.default=f;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@eslint/js"),u=require("eslint-plugin-jsdoc"),a=require("globals"),e=require("typescript-eslint"),s=require("./base-BQL2gY6S.cjs"),p=require("./rules/core.cjs"),d=require("./rules/cspell.cjs"),g=require("./rules/importRules.cjs"),m=require("./rules/jsdoc.cjs"),b=require("./rules/stylistic.cjs"),q=require("./rules/typescript.cjs"),n=require("./compat-Cy03xRn0.cjs"),r=require("./main.cjs"),i=r.merge(n.compat.extends("airbnb-base","airbnb-typescript/base"));var t,o,c;(c=(o=(t=i.languageOptions)==null?void 0:t.parserOptions)==null?void 0:o.ecmaFeatures)==null||delete c.globalReturn;const f=r.mergeAll(e.config(l.configs.recommended,i,...e.configs.recommended,...e.configs.recommendedTypeChecked,u.configs["flat/recommended-typescript-error"],r.merge(n.compat.extends("plugin:@cspell/recommended"),s.preConfig(),p,g,d,b,m,q,s.postConfig(),{languageOptions:{globals:{...a.node}},settings:{jsdoc:{mode:"typescript",tagNamePreference:{callback:"watch",desc:"use"}},"import/resolver":{typescript:!0,node:!0}}})));exports.default=f;
@@ -1,35 +0,0 @@
1
- import p from "@eslint/js";
2
- import c from "eslint-plugin-jsdoc";
3
- import n from "globals";
4
- import e from "typescript-eslint";
5
- import { p as a, a as f } from "./base-Dd7loOAV.js";
6
- import l from "./rules/core.js";
7
- import d from "./rules/cspell.js";
8
- import g from "./rules/importRules.js";
9
- import b from "./rules/jsdoc.js";
10
- import u from "./rules/stylistic.js";
11
- import y from "./rules/typescript.js";
12
- import { c as m } from "./compat-DfBTP0AK.js";
13
- import { mergeAll as j, merge as s } from "./main.js";
14
- const i = s(m.extends("airbnb-base", "airbnb-typescript/base"));
15
- var o, r, t;
16
- (t = (r = (o = i.languageOptions) == null ? void 0 : o.parserOptions) == null ? void 0 : r.ecmaFeatures) == null || delete t.globalReturn;
17
- const v = j(e.config(p.configs.recommended, i, ...e.configs.recommended, ...e.configs.recommendedTypeChecked, c.configs["flat/recommended-typescript-error"], s(m.extends("plugin:@cspell/recommended"), f(), l, g, d, u, b, y, a(), {
18
- languageOptions: {
19
- globals: {
20
- ...n.browser
21
- }
22
- },
23
- settings: {
24
- jsdoc: {
25
- mode: "typescript",
26
- tagNamePreference: {
27
- callback: "watch",
28
- desc: "use"
29
- }
30
- }
31
- }
32
- })));
33
- export {
34
- v as default
35
- };
@@ -1,24 +0,0 @@
1
- import { dirname as m } from "node:path";
2
- import { fileURLToPath as e } from "node:url";
3
- import { FlatCompat as t } from "@eslint/eslintrc";
4
- import i from "eslint-plugin-jsdoc";
5
- import p from "globals";
6
- import { p as s, a as l } from "./base-Dd7loOAV.js";
7
- import n from "./rules/core.js";
8
- import a from "./rules/cspell.js";
9
- import f from "./rules/importRules.js";
10
- import c from "./rules/jsdoc.js";
11
- import d from "./rules/stylistic.js";
12
- import { merge as g, mergeAll as o } from "./main.js";
13
- const r = new t({
14
- baseDirectory: m(e(import.meta.url))
15
- }), F = g(o(r.extends("eslint-config-airbnb-base")), i.configs["flat/recommended"], o(r.extends("plugin:@cspell/recommended")), l(), n, f, a, d, c, s(), {
16
- languageOptions: {
17
- globals: {
18
- ...p.node
19
- }
20
- }
21
- });
22
- export {
23
- F as default
24
- };
@@ -1,24 +0,0 @@
1
- import { dirname as m } from "node:path";
2
- import { fileURLToPath as e } from "node:url";
3
- import { FlatCompat as t } from "@eslint/eslintrc";
4
- import i from "eslint-plugin-jsdoc";
5
- import p from "globals";
6
- import { p as s, a as l } from "./base-Dd7loOAV.js";
7
- import a from "./rules/core.js";
8
- import f from "./rules/cspell.js";
9
- import n from "./rules/importRules.js";
10
- import c from "./rules/jsdoc.js";
11
- import g from "./rules/stylistic.js";
12
- import { merge as d, mergeAll as o } from "./main.js";
13
- const r = new t({
14
- baseDirectory: m(e(import.meta.url))
15
- }), F = d(o(r.extends("eslint-config-airbnb-base")), i.configs["flat/recommended"], o(r.extends("plugin:@cspell/recommended")), l(), a, n, f, g, c, s(), {
16
- languageOptions: {
17
- globals: {
18
- ...p.browser
19
- }
20
- }
21
- });
22
- export {
23
- F as default
24
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("node:path"),s=require("node:url"),i=require("@eslint/eslintrc"),c=require("eslint-plugin-jsdoc"),u=require("globals"),r=require("./base-BQL2gY6S.cjs"),l=require("./rules/core.cjs"),d=require("./rules/cspell.cjs"),a=require("./rules/importRules.cjs"),m=require("./rules/jsdoc.cjs"),p=require("./rules/stylistic.cjs"),e=require("./main.cjs");var n=typeof document<"u"?document.currentScript:null;const t=new i.FlatCompat({baseDirectory:o.dirname(s.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:n&&n.src||new URL("index-VkwuK_gg.cjs",document.baseURI).href))}),f=e.merge(e.mergeAll(t.extends("eslint-config-airbnb-base")),c.configs["flat/recommended"],e.mergeAll(t.extends("plugin:@cspell/recommended")),r.preConfig(),l,a,d,p,m,r.postConfig(),{languageOptions:{globals:{...u.browser}}});exports.default=f;
@@ -1,39 +0,0 @@
1
- import p from "@eslint/js";
2
- import c from "eslint-plugin-jsdoc";
3
- import n from "globals";
4
- import e from "typescript-eslint";
5
- import { p as a, a as l } from "./base-Dd7loOAV.js";
6
- import d from "./rules/core.js";
7
- import f from "./rules/cspell.js";
8
- import g from "./rules/importRules.js";
9
- import b from "./rules/jsdoc.js";
10
- import u from "./rules/stylistic.js";
11
- import y from "./rules/typescript.js";
12
- import { c as m } from "./compat-DfBTP0AK.js";
13
- import { mergeAll as j, merge as s } from "./main.js";
14
- const i = s(m.extends("airbnb-base", "airbnb-typescript/base"));
15
- var o, r, t;
16
- (t = (r = (o = i.languageOptions) == null ? void 0 : o.parserOptions) == null ? void 0 : r.ecmaFeatures) == null || delete t.globalReturn;
17
- const q = j(e.config(p.configs.recommended, i, ...e.configs.recommended, ...e.configs.recommendedTypeChecked, c.configs["flat/recommended-typescript-error"], s(m.extends("plugin:@cspell/recommended"), l(), d, g, f, u, b, y, a(), {
18
- languageOptions: {
19
- globals: {
20
- ...n.node
21
- }
22
- },
23
- settings: {
24
- jsdoc: {
25
- mode: "typescript",
26
- tagNamePreference: {
27
- callback: "watch",
28
- desc: "use"
29
- }
30
- },
31
- "import/resolver": {
32
- typescript: !0,
33
- node: !0
34
- }
35
- }
36
- })));
37
- export {
38
- q as default
39
- };
File without changes