@useinsider/eslint-config 1.9.2 → 1.10.0-beta.2
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 +5 -4
- package/dist/base.d.ts +2 -2
- package/dist/configs/config/index.d.ts +1 -1
- package/dist/configs/javascript/index.d.ts +2 -1
- package/dist/configs/javascript-dom/index.d.ts +1 -1
- package/dist/configs/javascript-node/index.d.ts +1 -1
- package/dist/configs/jest/index.d.ts +1 -1
- package/dist/configs/jsdoc-based-ts/index.d.ts +1 -1
- package/dist/configs/typescript/index.d.ts +1 -1
- package/dist/configs/typescript-dom/index.d.ts +1 -1
- package/dist/configs/typescript-node/index.d.ts +2 -2
- package/dist/configs/vue2/index.d.ts +1 -1
- package/dist/configs/vue2-typescript/index.d.ts +3 -0
- package/dist/configs/vue3/index.d.ts +1 -1
- package/dist/configs/vue3-typescript/index.d.ts +1 -1
- package/dist/index-5XpuN8zJ.js +36 -0
- package/dist/index-AoIfKLih.cjs +1 -0
- package/dist/index-BbY-DzQZ.js +23 -0
- package/dist/index-BcXPdx1B.cjs +1 -0
- package/dist/index-BfVokhiU.js +50 -0
- package/dist/index-BmBugWe4.cjs +1 -0
- package/dist/{index-UyB1dQmr.cjs → index-BmEpUwjI.cjs} +1 -1
- package/dist/index-C2ejyG13.js +43 -0
- package/dist/index-C2p6z9H4.js +9 -0
- package/dist/{index-CCc7nS-L.cjs → index-C8Fyv8dX.cjs} +1 -1
- package/dist/{index-Dz51pbFA.js → index-C9C56Sak.js} +1 -1
- package/dist/{index-BsEDEtyS.js → index-C__itRdP.js} +1 -1
- package/dist/{index-Cjyj5Al1.cjs → index-Ce8VTxdD.cjs} +1 -1
- package/dist/index-Chj1r0fO.cjs +1 -0
- package/dist/index-CluTLBWw.cjs +1 -0
- package/dist/{index-DWdvFLYP.js → index-Cy4JQvOe.js} +3 -3
- package/dist/index-D33jOlli.cjs +1 -0
- package/dist/index-DEn6q6Nn.cjs +1 -0
- package/dist/index-DhhGuad5.cjs +1 -0
- package/dist/index-PPmRJNMx.js +50 -0
- package/dist/{index-E3Dvq2rq.js → index-kDh8-AEb.js} +1 -1
- package/dist/index-uJNHwtXG.js +43 -0
- package/dist/main.cjs +2 -2
- package/dist/main.d.ts +3 -2
- package/dist/main.js +57 -55
- package/dist/rules/core.d.ts +1 -1
- package/dist/rules/cspell.d.ts +1 -1
- package/dist/rules/importRules.d.ts +1 -1
- package/dist/rules/jsdoc.d.ts +1 -1
- package/dist/rules/stylistic.d.ts +1 -1
- package/dist/rules/typescript.d.ts +1 -1
- package/dist/rules/vue.d.ts +1 -1
- package/dist/rules/vue2.d.ts +2 -2
- package/dist/stylistic-D3KEBmIv.cjs +1 -0
- package/dist/stylistic-DSE4g5OV.js +419 -0
- package/dist/{rules/typescript.cjs → typescript-BvnP4VCM.cjs} +1 -1
- package/dist/{rules/typescript.js → typescript-Dg4zKuYI.js} +1 -1
- package/dist/utils/compat.d.ts +4 -4
- package/dist/utils/mergeAllConfig.d.ts +1 -1
- package/dist/{rules/vue.js → vue-5XWMLJUh.js} +3 -3
- package/dist/vue-D2lo_IGG.cjs +1 -0
- package/dist/{rules/vue2.js → vue2-7aDd9M-9.js} +8 -3
- package/dist/vue2-CpDCkxcX.cjs +1 -0
- package/package.json +32 -39
- package/dist/base-C2fq_o3u.cjs +0 -1
- package/dist/base-DhxoXy40.js +0 -29
- package/dist/compat-DfBTP0AK.js +0 -15
- package/dist/compat-S2mgbwTA.cjs +0 -1
- package/dist/index-BSFKHRiy.js +0 -33
- package/dist/index-BUOro8yS.js +0 -54
- package/dist/index-BX0PuY7X.cjs +0 -1
- package/dist/index-BYXlsowx.cjs +0 -1
- package/dist/index-BcjSGMc4.cjs +0 -1
- package/dist/index-C743UfJX.cjs +0 -1
- package/dist/index-CAuGyIr4.cjs +0 -1
- package/dist/index-CcvN-eiV.cjs +0 -1
- package/dist/index-CixUmpPQ.js +0 -9
- package/dist/index-CydLRA6p.js +0 -34
- package/dist/index-DIhDmtxO.js +0 -17
- package/dist/index-D_iZLt4b.js +0 -34
- package/dist/index-Dgx6nuN5.cjs +0 -1
- package/dist/rules/core.cjs +0 -1
- package/dist/rules/core.js +0 -101
- package/dist/rules/cspell.cjs +0 -1
- package/dist/rules/cspell.js +0 -10
- package/dist/rules/importRules.cjs +0 -1
- package/dist/rules/importRules.js +0 -33
- package/dist/rules/jsdoc.cjs +0 -1
- package/dist/rules/jsdoc.js +0 -74
- package/dist/rules/stylistic.cjs +0 -1
- package/dist/rules/stylistic.js +0 -182
- package/dist/rules/vue.cjs +0 -1
- package/dist/rules/vue2.cjs +0 -1
package/README.md
CHANGED
|
@@ -45,10 +45,11 @@ configured for different environments, such as ServiceWorkers, WebWorkers, etc.
|
|
|
45
45
|
|
|
46
46
|
### Framework-specific
|
|
47
47
|
|
|
48
|
-
| Environment
|
|
49
|
-
|
|
|
50
|
-
| **Vue 3
|
|
51
|
-
| **Vue 2 (
|
|
48
|
+
| Environment | JavaScript | TypeScript |
|
|
49
|
+
| :-------------------------------- | :-------------------------------------------------------- | :-------------------------------------------------------- |
|
|
50
|
+
| **Vue 3 (Setup/Composition API)** | [`vue3`](./src/configs/vue3#readme) | [`vue3-typescript`](./src/configs/vue3-typescript#readme) |
|
|
51
|
+
| **Vue 2 (Setup/Composition API)** | [`vue2-typescript`](./src/configs/vue2-typescript#readme) | [`vue2-typescript`](./src/configs/vue2-typescript#readme) |
|
|
52
|
+
| **Vue 2 (Options API)** | [`vue2`](./src/configs/vue2#readme) | - |
|
|
52
53
|
|
|
53
54
|
### ⏳ Upcoming Configurations
|
|
54
55
|
|
package/dist/base.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Linter } from 'eslint';
|
|
2
|
-
export declare function preConfig(plugins?: string[]): Linter.
|
|
3
|
-
export declare function postConfig(): Linter.
|
|
2
|
+
export declare function preConfig(plugins?: string[]): Linter.Config<Linter.RulesRecord>;
|
|
3
|
+
export declare function postConfig(): Linter.Config;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Linter } from 'eslint';
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const scope: Linter.Config;
|
|
3
|
+
export default scope;
|
|
@@ -0,0 +1,36 @@
|
|
|
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 e from "typescript-eslint";
|
|
7
|
+
import { p as c, c as p, i as f, a as n, s as a, j as l, b as d } from "./stylistic-DSE4g5OV.js";
|
|
8
|
+
import { t as g } from "./typescript-Dg4zKuYI.js";
|
|
9
|
+
import { mergeAll as u, merge as y } from "./main.js";
|
|
10
|
+
const x = u(e.config(
|
|
11
|
+
o.configs.recommended,
|
|
12
|
+
i.flatConfigs.recommended,
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
14
|
+
t.configs.base.all,
|
|
15
|
+
...e.configs.recommended,
|
|
16
|
+
...e.configs.recommendedTypeChecked.filter((r) => !r.plugins),
|
|
17
|
+
m.configs["flat/recommended-typescript-error"],
|
|
18
|
+
y(c(), p, f, n, { plugins: { "@stylistic": s } }, a, l, g, d(), {
|
|
19
|
+
settings: {
|
|
20
|
+
jsdoc: {
|
|
21
|
+
mode: "typescript",
|
|
22
|
+
tagNamePreference: {
|
|
23
|
+
callback: "watch",
|
|
24
|
+
desc: "use"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"import/resolver": {
|
|
28
|
+
typescript: !0,
|
|
29
|
+
node: !0
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
));
|
|
34
|
+
export {
|
|
35
|
+
x as default
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@stylistic/eslint-plugin"),i=require("eslint-config-airbnb-extended"),o=require("eslint-plugin-import-x"),t=require("eslint-plugin-jsdoc"),n=require("eslint-plugin-vue"),l=require("eslint-plugin-vue-scoped-css"),c=require("globals"),e=require("./stylistic-D3KEBmIv.cjs"),u=require("./vue-D2lo_IGG.cjs"),s=require("./main.cjs"),g=s.merge(s.mergeAll(n.configs["flat/recommended"],l.configs["flat/recommended"]),o.importX.flatConfigs.recommended,s.mergeAll(i.configs.base.recommended),t.configs["flat/recommended"],e.preConfig(),e.core,e.importRules,e.cspell,{plugins:{"@stylistic":r}},e.stylisticRules,e.jsdoc,u.vue,e.postConfig(),{languageOptions:{parserOptions:{sourceType:"module",ecmaFeatures:{jsx:!0},extraFileExtensions:[".vue"]},globals:{...c.browser}}});exports.default=g;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import o from "@stylistic/eslint-plugin";
|
|
2
|
+
import s from "eslint-config-airbnb-extended";
|
|
3
|
+
import { importX as i } from "eslint-plugin-import-x";
|
|
4
|
+
import r from "eslint-plugin-jsdoc";
|
|
5
|
+
import { p as m, c as e, i as t, a, s as c, j as p, b as f } from "./stylistic-DSE4g5OV.js";
|
|
6
|
+
import { merge as l, mergeAll as n } from "./main.js";
|
|
7
|
+
const C = l(
|
|
8
|
+
i.flatConfigs.recommended,
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
10
|
+
n(s.configs.base.recommended),
|
|
11
|
+
r.configs["flat/recommended"],
|
|
12
|
+
m(),
|
|
13
|
+
e,
|
|
14
|
+
t,
|
|
15
|
+
a,
|
|
16
|
+
{ plugins: { "@stylistic": o } },
|
|
17
|
+
c,
|
|
18
|
+
p,
|
|
19
|
+
f()
|
|
20
|
+
);
|
|
21
|
+
export {
|
|
22
|
+
C as default
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@eslint/js"),c=require("@stylistic/eslint-plugin"),o=require("eslint-config-airbnb-extended"),n=require("eslint-plugin-import-x"),l=require("eslint-plugin-jsdoc"),t=require("typescript-eslint"),e=require("./stylistic-D3KEBmIv.cjs"),p=require("./typescript-BvnP4VCM.cjs"),r=require("./main.cjs"),u=r.mergeAll(t.config(i.configs.recommended,n.importX.flatConfigs.recommended,o.configs.base.all,...t.configs.recommended,...t.configs.recommendedTypeChecked.filter(s=>!s.plugins),l.configs["flat/recommended-typescript-error"],r.merge(e.preConfig(),e.core,e.importRules,e.cspell,{plugins:{"@stylistic":c}},e.stylisticRules,e.jsdoc,p.typescript,e.postConfig(),{settings:{jsdoc:{mode:"typescript",tagNamePreference:{callback:"watch",desc:"use"}},"import/resolver":{typescript:!0,node:!0}}})));exports.default=u;
|
|
@@ -0,0 +1,50 @@
|
|
|
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, j as n, s as f, a as d, i as g, c as u, p as b } from "./stylistic-DSE4g5OV.js";
|
|
11
|
+
import { t as y } from "./typescript-Dg4zKuYI.js";
|
|
12
|
+
import { a as j } from "./vue2-7aDd9M-9.js";
|
|
13
|
+
import { mergeAll as x, merge as C } from "./main.js";
|
|
14
|
+
const T = x(e.config(
|
|
15
|
+
r.configs.recommended,
|
|
16
|
+
i.flatConfigs.recommended,
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
18
|
+
t.configs.base.all,
|
|
19
|
+
...e.configs.recommended,
|
|
20
|
+
...p.configs["flat/vue2-recommended"].map((o) => (delete o.files, o)),
|
|
21
|
+
...a.configs["flat/vue2-recommended"],
|
|
22
|
+
m.configs["flat/recommended-typescript-error"],
|
|
23
|
+
C(b(), u, g, d, { plugins: { "@stylistic": s } }, f, n, j, y, l(), {
|
|
24
|
+
languageOptions: {
|
|
25
|
+
globals: {
|
|
26
|
+
...c.browser
|
|
27
|
+
},
|
|
28
|
+
parserOptions: {
|
|
29
|
+
parser: e.parser,
|
|
30
|
+
sourceType: "module",
|
|
31
|
+
ecmaFeatures: {
|
|
32
|
+
jsx: !0
|
|
33
|
+
},
|
|
34
|
+
extraFileExtensions: [".vue"]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
settings: {
|
|
38
|
+
jsdoc: {
|
|
39
|
+
mode: "typescript",
|
|
40
|
+
tagNamePreference: {
|
|
41
|
+
callback: "watch",
|
|
42
|
+
desc: "use"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
));
|
|
48
|
+
export {
|
|
49
|
+
T as default
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={rules:{"import-x/no-extraneous-dependencies":"off","import-x/prefer-default-export":"off"}};exports.default=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("globals"),r=require("./main.cjs"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("globals"),r=require("./main.cjs"),t=require("./index-CluTLBWw.cjs"),o=r.merge(t.default,{languageOptions:{globals:{...e.browser}}});exports.default=o;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import e from "@stylistic/eslint-plugin";
|
|
2
|
+
import s from "eslint-config-airbnb-extended";
|
|
3
|
+
import { importX as r } from "eslint-plugin-import-x";
|
|
4
|
+
import i from "eslint-plugin-jsdoc";
|
|
5
|
+
import m from "eslint-plugin-vue";
|
|
6
|
+
import t from "eslint-plugin-vue-scoped-css";
|
|
7
|
+
import l from "globals";
|
|
8
|
+
import { b as a, j as n, s as p, a as f, i as c, c as g, p as d } from "./stylistic-DSE4g5OV.js";
|
|
9
|
+
import { v as u } from "./vue-5XWMLJUh.js";
|
|
10
|
+
import { merge as b, mergeAll as o } from "./main.js";
|
|
11
|
+
const V = b(
|
|
12
|
+
o(m.configs["flat/recommended"], t.configs["flat/recommended"]),
|
|
13
|
+
r.flatConfigs.recommended,
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
15
|
+
o(s.configs.base.recommended),
|
|
16
|
+
i.configs["flat/recommended"],
|
|
17
|
+
d(),
|
|
18
|
+
g,
|
|
19
|
+
c,
|
|
20
|
+
f,
|
|
21
|
+
{ plugins: { "@stylistic": e } },
|
|
22
|
+
p,
|
|
23
|
+
n,
|
|
24
|
+
u,
|
|
25
|
+
a(),
|
|
26
|
+
{
|
|
27
|
+
languageOptions: {
|
|
28
|
+
parserOptions: {
|
|
29
|
+
sourceType: "module",
|
|
30
|
+
ecmaFeatures: {
|
|
31
|
+
jsx: !0
|
|
32
|
+
},
|
|
33
|
+
extraFileExtensions: [".vue"]
|
|
34
|
+
},
|
|
35
|
+
globals: {
|
|
36
|
+
...l.browser
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
export {
|
|
42
|
+
V as default
|
|
43
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("globals"),t=require("./main.cjs"),n=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("globals"),t=require("./main.cjs"),n=require("./index-CluTLBWw.cjs"),o=t.merge(n.default,{languageOptions:{globals:{...e.node}}});exports.default=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("globals"),r=require("./main.cjs"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("globals"),r=require("./main.cjs"),t=require("./index-BcXPdx1B.cjs"),o=r.merge(t.default,{languageOptions:{globals:{...e.browser}}});exports.default=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@eslint/js"),o=require("@stylistic/eslint-plugin"),c=require("eslint-config-airbnb-extended"),n=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-D3KEBmIv.cjs"),d=require("./typescript-BvnP4VCM.cjs"),g=require("./vue-D2lo_IGG.cjs"),t=require("./main.cjs"),m=t.mergeAll(r.config(i.configs.recommended,n.importX.flatConfigs.recommended,c.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,e.jsdoc,g.vue,d.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=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@stylistic/eslint-plugin"),t=require("eslint-config-airbnb-extended"),r=require("eslint-plugin-import-x"),o=require("eslint-plugin-jsdoc"),e=require("./stylistic-D3KEBmIv.cjs"),i=require("./main.cjs"),c=i.merge(r.importX.flatConfigs.recommended,i.mergeAll(t.configs.base.recommended),o.configs["flat/recommended"],e.preConfig(),e.core,e.importRules,e.cspell,{plugins:{"@stylistic":s}},e.stylisticRules,e.jsdoc,e.postConfig());exports.default=c;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "globals";
|
|
2
2
|
import { merge as r } from "./main.js";
|
|
3
|
-
import t from "./index-
|
|
4
|
-
const
|
|
3
|
+
import t from "./index-5XpuN8zJ.js";
|
|
4
|
+
const s = r(t, {
|
|
5
5
|
languageOptions: {
|
|
6
6
|
globals: {
|
|
7
7
|
...o.node
|
|
@@ -9,5 +9,5 @@ const a = r(t, {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
s as default
|
|
13
13
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@stylistic/eslint-plugin"),i=require("eslint-config-airbnb-extended"),o=require("eslint-plugin-import-x"),t=require("eslint-plugin-jsdoc"),n=require("eslint-plugin-vue"),l=require("eslint-plugin-vue-scoped-css"),c=require("globals"),e=require("./stylistic-D3KEBmIv.cjs"),u=require("./vue2-CpDCkxcX.cjs"),s=require("./main.cjs"),g=s.merge(s.mergeAll(n.configs["flat/vue2-recommended"],l.configs["flat/vue2-recommended"]),o.importX.flatConfigs.recommended,s.mergeAll(i.configs.base.recommended),t.configs["flat/recommended"],e.preConfig(),e.core,e.importRules,e.cspell,{plugins:{"@stylistic":r}},e.stylisticRules,e.jsdoc,u.vue2Options,e.postConfig(),{languageOptions:{parserOptions:{sourceType:"module",ecmaFeatures:{jsx:!0},extraFileExtensions:[".vue"]},globals:{...c.browser}}});exports.default=g;
|
|
@@ -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-D3KEBmIv.cjs"),m=require("./typescript-BvnP4VCM.cjs"),d=require("./vue2-CpDCkxcX.cjs"),t=require("./main.cjs"),g=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,e.jsdoc,d.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=g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("globals"),o=require("./main.cjs"),t=require("./index-BcXPdx1B.cjs"),n=o.merge(t.default,{languageOptions:{globals:{...e.node}}});exports.default=n;
|
|
@@ -0,0 +1,50 @@
|
|
|
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, j as n, s as f, a as d, i as g, c as u, p as b } from "./stylistic-DSE4g5OV.js";
|
|
11
|
+
import { t as y } from "./typescript-Dg4zKuYI.js";
|
|
12
|
+
import { v as j } from "./vue-5XWMLJUh.js";
|
|
13
|
+
import { mergeAll as x, merge as C } from "./main.js";
|
|
14
|
+
const T = x(e.config(
|
|
15
|
+
o.configs.recommended,
|
|
16
|
+
i.flatConfigs.recommended,
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
18
|
+
t.configs.base.all,
|
|
19
|
+
...e.configs.recommended,
|
|
20
|
+
...p.configs["flat/recommended"].map((r) => (delete r.files, r)),
|
|
21
|
+
...a.configs["flat/recommended"],
|
|
22
|
+
m.configs["flat/recommended-typescript-error"],
|
|
23
|
+
C(b(), u, g, d, { plugins: { "@stylistic": s } }, f, n, j, y, l(), {
|
|
24
|
+
languageOptions: {
|
|
25
|
+
globals: {
|
|
26
|
+
...c.browser
|
|
27
|
+
},
|
|
28
|
+
parserOptions: {
|
|
29
|
+
parser: e.parser,
|
|
30
|
+
sourceType: "module",
|
|
31
|
+
ecmaFeatures: {
|
|
32
|
+
jsx: !0
|
|
33
|
+
},
|
|
34
|
+
extraFileExtensions: [".vue"]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
settings: {
|
|
38
|
+
jsdoc: {
|
|
39
|
+
mode: "typescript",
|
|
40
|
+
tagNamePreference: {
|
|
41
|
+
callback: "watch",
|
|
42
|
+
desc: "use"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
));
|
|
48
|
+
export {
|
|
49
|
+
T as default
|
|
50
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import e from "@stylistic/eslint-plugin";
|
|
2
|
+
import s from "eslint-config-airbnb-extended";
|
|
3
|
+
import { importX as r } from "eslint-plugin-import-x";
|
|
4
|
+
import i from "eslint-plugin-jsdoc";
|
|
5
|
+
import m from "eslint-plugin-vue";
|
|
6
|
+
import t from "eslint-plugin-vue-scoped-css";
|
|
7
|
+
import l from "globals";
|
|
8
|
+
import { b as n, j as a, s as p, a as f, i as c, c as u, p as g } from "./stylistic-DSE4g5OV.js";
|
|
9
|
+
import { v as d } from "./vue2-7aDd9M-9.js";
|
|
10
|
+
import { merge as b, mergeAll as o } from "./main.js";
|
|
11
|
+
const V = b(
|
|
12
|
+
o(m.configs["flat/vue2-recommended"], t.configs["flat/vue2-recommended"]),
|
|
13
|
+
r.flatConfigs.recommended,
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
15
|
+
o(s.configs.base.recommended),
|
|
16
|
+
i.configs["flat/recommended"],
|
|
17
|
+
g(),
|
|
18
|
+
u,
|
|
19
|
+
c,
|
|
20
|
+
f,
|
|
21
|
+
{ plugins: { "@stylistic": e } },
|
|
22
|
+
p,
|
|
23
|
+
a,
|
|
24
|
+
d,
|
|
25
|
+
n(),
|
|
26
|
+
{
|
|
27
|
+
languageOptions: {
|
|
28
|
+
parserOptions: {
|
|
29
|
+
sourceType: "module",
|
|
30
|
+
ecmaFeatures: {
|
|
31
|
+
jsx: !0
|
|
32
|
+
},
|
|
33
|
+
extraFileExtensions: [".vue"]
|
|
34
|
+
},
|
|
35
|
+
globals: {
|
|
36
|
+
...l.browser
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
export {
|
|
42
|
+
V as default
|
|
43
|
+
};
|
package/dist/main.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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
|
|
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-CluTLBWw.cjs"))},async"javascript-node"(){return Promise.resolve().then(()=>require("./index-C8Fyv8dX.cjs"))},async"javascript-dom"(){return Promise.resolve().then(()=>require("./index-BmEpUwjI.cjs"))},async typescript(){return Promise.resolve().then(()=>require("./index-BcXPdx1B.cjs"))},async"typescript-node"(){return Promise.resolve().then(()=>require("./index-DhhGuad5.cjs"))},async"typescript-dom"(){return Promise.resolve().then(()=>require("./index-Ce8VTxdD.cjs"))},async vue3(){return Promise.resolve().then(()=>require("./index-AoIfKLih.cjs"))},async"vue3-typescript"(){return Promise.resolve().then(()=>require("./index-Chj1r0fO.cjs"))},async vue2(){return Promise.resolve().then(()=>require("./index-D33jOlli.cjs"))},async"vue2-typescript"(){return Promise.resolve().then(()=>require("./index-DEn6q6Nn.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.d.ts
CHANGED
|
@@ -10,16 +10,17 @@ declare const configMap: {
|
|
|
10
10
|
vue3(): Promise<typeof import("./configs/vue3")>;
|
|
11
11
|
'vue3-typescript'(): Promise<typeof import("./configs/vue3-typescript")>;
|
|
12
12
|
vue2(): Promise<typeof import("./configs/vue2")>;
|
|
13
|
+
'vue2-typescript'(): Promise<typeof import("./configs/vue2-typescript")>;
|
|
13
14
|
jest(): Promise<typeof import("./configs/jest")>;
|
|
14
15
|
'jsdoc-based-ts'(): Promise<typeof import("./configs/jsdoc-based-ts")>;
|
|
15
16
|
};
|
|
16
17
|
interface Config {
|
|
17
18
|
/** Precedence order will affect how rules applied */
|
|
18
19
|
preset: (keyof typeof configMap)[];
|
|
19
|
-
config: Linter.
|
|
20
|
+
config: Linter.Config;
|
|
20
21
|
silenceRules?: string[];
|
|
21
22
|
}
|
|
22
|
-
export declare function useInsider(config: Config): Promise<Linter.
|
|
23
|
+
export declare function useInsider(config: Config): Promise<Linter.Config>;
|
|
23
24
|
export { merge } from './utils/merge';
|
|
24
25
|
export { mergeAll } from './utils/mergeAllConfig';
|
|
25
26
|
export { silenceDependencyWarning } from './utils/ensureDependencies';
|