@useinsider/eslint-config 1.10.0-beta.1 → 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/configs/vue2-typescript/index.d.ts +3 -0
- 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-BjqFNarr.cjs → index-BmEpUwjI.cjs} +1 -1
- package/dist/index-C2ejyG13.js +43 -0
- package/dist/{index-DgHV2stm.cjs → index-C8Fyv8dX.cjs} +1 -1
- package/dist/{index-IJ5JatZj.js → index-C9C56Sak.js} +1 -1
- package/dist/{index-BnTzUbum.js → index-C__itRdP.js} +1 -1
- package/dist/{index-fI1e4MqV.cjs → index-Ce8VTxdD.cjs} +1 -1
- package/dist/index-Chj1r0fO.cjs +1 -0
- package/dist/index-CluTLBWw.cjs +1 -0
- package/dist/{index-DvOKf9k2.js → index-Cy4JQvOe.js} +1 -1
- package/dist/index-D33jOlli.cjs +1 -0
- package/dist/index-DEn6q6Nn.cjs +1 -0
- package/dist/{index-D9bTg7j3.cjs → index-DhhGuad5.cjs} +1 -1
- package/dist/index-PPmRJNMx.js +50 -0
- package/dist/{index-D1KdUFk4.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 +1 -0
- package/dist/main.js +55 -53
- 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/{rules/vue.js → vue-5XWMLJUh.js} +1 -1
- package/dist/{rules/vue.cjs → vue-D2lo_IGG.cjs} +1 -1
- package/dist/{rules/vue2.js → vue2-7aDd9M-9.js} +8 -3
- package/dist/vue2-CpDCkxcX.cjs +1 -0
- package/package.json +1 -9
- package/dist/base-B-PS5UHr.cjs +0 -1
- package/dist/base-BA0DI93B.js +0 -33
- package/dist/index-BBpi_Vtq.cjs +0 -1
- package/dist/index-BGJZVkll.cjs +0 -1
- package/dist/index-BQhhxQGU.cjs +0 -1
- package/dist/index-C05_dgDY.cjs +0 -1
- package/dist/index-CG4b8J5I.js +0 -48
- package/dist/index-CQ1RJV11.js +0 -28
- package/dist/index-D-NRhaYV.cjs +0 -1
- package/dist/index-DbBU_JDe.js +0 -41
- package/dist/index-nLGFKikH.js +0 -48
- package/dist/index-o9oM4y-o.js +0 -65
- 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/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
|
|
|
@@ -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
|
+
};
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("globals"),o=require("./main.cjs"),t=require("./index-
|
|
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,6 +10,7 @@ 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
|
};
|
package/dist/main.js
CHANGED
|
@@ -10,10 +10,7 @@ const f = /* @__PURE__ */ new Set(), S = [
|
|
|
10
10
|
"@eslint/eslintrc",
|
|
11
11
|
"@eslint/js",
|
|
12
12
|
"@stylistic/eslint-plugin",
|
|
13
|
-
"@stylistic/eslint-plugin-migrate",
|
|
14
13
|
"@types/eslint",
|
|
15
|
-
"@types/eslint__eslintrc",
|
|
16
|
-
"@types/eslint__js",
|
|
17
14
|
"@typescript-eslint/eslint-plugin",
|
|
18
15
|
"@typescript-eslint/parser",
|
|
19
16
|
"eslint",
|
|
@@ -27,10 +24,10 @@ const f = /* @__PURE__ */ new Set(), S = [
|
|
|
27
24
|
"typescript-eslint"
|
|
28
25
|
];
|
|
29
26
|
function m(e) {
|
|
30
|
-
const
|
|
31
|
-
if (!
|
|
32
|
-
throw new Error(`Unable to locate package.json: ${
|
|
33
|
-
return JSON.parse(
|
|
27
|
+
const s = y.resolve(e, "package.json"), n = w.readFileSync(s, "utf8");
|
|
28
|
+
if (!n)
|
|
29
|
+
throw new Error(`Unable to locate package.json: ${s}`);
|
|
30
|
+
return JSON.parse(n);
|
|
34
31
|
}
|
|
35
32
|
function k() {
|
|
36
33
|
const e = m(process.cwd());
|
|
@@ -49,62 +46,62 @@ function E() {
|
|
|
49
46
|
async function D() {
|
|
50
47
|
if (d)
|
|
51
48
|
return;
|
|
52
|
-
const e = k(),
|
|
53
|
-
if (!
|
|
49
|
+
const e = k(), n = Object.entries(E()).filter(([t, o]) => S.includes(t) && !f.has(t) && (!e[t] || e[t] !== o));
|
|
50
|
+
if (!n.length)
|
|
54
51
|
return;
|
|
55
|
-
const
|
|
56
|
-
console.info("Missing dependencies detected:"), console.info(
|
|
52
|
+
const r = n.map(([t, o]) => `${t}@${o.replace(/^\W+/, "")}`);
|
|
53
|
+
console.info("Missing dependencies detected:"), console.info(r.map((t) => ` - ${t}`).join(`
|
|
57
54
|
`)), console.info(`
|
|
58
|
-
Installing dependencies:`), await h(
|
|
55
|
+
Installing dependencies:`), await h(r, { dev: !0, additionalArgs: ["-E"] }), process.exit(1);
|
|
59
56
|
}
|
|
60
57
|
function $(e) {
|
|
61
58
|
if (typeof e == "boolean") {
|
|
62
59
|
d = e;
|
|
63
60
|
return;
|
|
64
61
|
}
|
|
65
|
-
e.forEach((
|
|
62
|
+
e.forEach((s) => f.add(String(s)));
|
|
66
63
|
}
|
|
67
64
|
function u(...e) {
|
|
68
65
|
return v.withOptions({ mergeArrays: !1 }, ...e);
|
|
69
66
|
}
|
|
70
67
|
const a = /* @__PURE__ */ new Set();
|
|
71
68
|
function c(e) {
|
|
72
|
-
e.forEach((
|
|
73
|
-
a.add(
|
|
69
|
+
e.forEach((s) => {
|
|
70
|
+
a.add(s);
|
|
74
71
|
});
|
|
75
72
|
}
|
|
76
|
-
function
|
|
73
|
+
function C(e) {
|
|
77
74
|
if (!Array.isArray(e))
|
|
78
75
|
return "warn";
|
|
79
|
-
const [, ...
|
|
80
|
-
return ["warn", ...
|
|
76
|
+
const [, ...s] = e;
|
|
77
|
+
return ["warn", ...s];
|
|
81
78
|
}
|
|
82
|
-
function l(e,
|
|
83
|
-
let
|
|
84
|
-
return Array.isArray(
|
|
85
|
-
e[
|
|
86
|
-
}), Object.entries(e).reduce((
|
|
79
|
+
function l(e, s) {
|
|
80
|
+
let n = s || a;
|
|
81
|
+
return Array.isArray(n) && (n = new Set(n)), !e || !n.size ? e : (s && n.forEach((r) => {
|
|
82
|
+
e[r] || j(`Unknown rule "${r}". Please remove it from the silenced rules list.`);
|
|
83
|
+
}), Object.entries(e).reduce((r, [t, o]) => (o && (r[t] = n.has(t) ? C(o) : o), r), {}));
|
|
87
84
|
}
|
|
88
85
|
if (import.meta.vitest) {
|
|
89
|
-
const { vi: e, describe:
|
|
86
|
+
const { vi: e, describe: s, test: n, expect: r, afterEach: t } = import.meta.vitest, o = e.hoisted(() => ({
|
|
90
87
|
warn: e.fn()
|
|
91
88
|
}));
|
|
92
|
-
e.mock("node:console", () => o),
|
|
89
|
+
e.mock("node:console", () => o), t(() => {
|
|
93
90
|
a.clear();
|
|
94
|
-
}),
|
|
95
|
-
|
|
91
|
+
}), s("silenceRules", () => {
|
|
92
|
+
n("should register given rule keys as silenced", () => {
|
|
96
93
|
const i = "@stylistic/type-generic-spacing";
|
|
97
|
-
|
|
94
|
+
r(a.has(i)).toBe(!1), c([i]), r(a.has(i)).toBe(!0);
|
|
98
95
|
});
|
|
99
|
-
}),
|
|
100
|
-
|
|
96
|
+
}), s("filterSilencedRules", () => {
|
|
97
|
+
n("should return the same rules object if no rules are silenced", () => {
|
|
101
98
|
const i = {
|
|
102
99
|
"no-console": "warn",
|
|
103
100
|
"no-debugger": "warn"
|
|
104
101
|
};
|
|
105
|
-
|
|
106
|
-
}),
|
|
107
|
-
c(["no-console"]),
|
|
102
|
+
r(l(i)).toBe(i);
|
|
103
|
+
}), n("should return a new rules object with silenced rules silenced and other rules unchanged", () => {
|
|
104
|
+
c(["no-console"]), r(l({
|
|
108
105
|
"no-console": "error",
|
|
109
106
|
"no-debugger": "warn",
|
|
110
107
|
"no-alert": "error"
|
|
@@ -113,8 +110,8 @@ if (import.meta.vitest) {
|
|
|
113
110
|
"no-debugger": "warn",
|
|
114
111
|
"no-alert": "error"
|
|
115
112
|
});
|
|
116
|
-
}),
|
|
117
|
-
c(["no-bitwise", "new-cap"]),
|
|
113
|
+
}), n("should return a new rules object with silenced rules silenced and other rules unchanged", () => {
|
|
114
|
+
c(["no-bitwise", "new-cap"]), r(l({
|
|
118
115
|
"max-len": "off",
|
|
119
116
|
"new-cap": ["error"],
|
|
120
117
|
"no-alert": ["error"],
|
|
@@ -129,24 +126,24 @@ if (import.meta.vitest) {
|
|
|
129
126
|
allow: ["~"]
|
|
130
127
|
}]
|
|
131
128
|
});
|
|
132
|
-
}),
|
|
129
|
+
}), n("should not warn about unknown rules", () => {
|
|
133
130
|
c(["no-console", "no-bitwise"]), l({
|
|
134
131
|
"no-console": "error",
|
|
135
132
|
"no-debugger": "warn",
|
|
136
133
|
"no-alert": "error"
|
|
137
|
-
}),
|
|
138
|
-
}),
|
|
134
|
+
}), r(o.warn).not.toHaveBeenCalled(), r(o.warn).not.toHaveBeenCalled();
|
|
135
|
+
}), n("should warn about unknown rules", () => {
|
|
139
136
|
l({
|
|
140
137
|
"no-console": "error",
|
|
141
138
|
"no-debugger": "warn",
|
|
142
139
|
"no-alert": "error"
|
|
143
|
-
}, ["no-console", "no-bitwise"]),
|
|
144
|
-
}),
|
|
140
|
+
}, ["no-console", "no-bitwise"]), r(o.warn).toHaveBeenCalledTimes(1), r(o.warn).toHaveBeenCalledWith('Unknown rule "no-bitwise". Please remove it from the silenced rules list.');
|
|
141
|
+
}), n.each([
|
|
145
142
|
[["@typescript-eslint/no-unsafe-call"], "warn"],
|
|
146
143
|
[/* @__PURE__ */ new Set(["@typescript-eslint/no-unsafe-call"]), "warn"],
|
|
147
144
|
[[], "error"]
|
|
148
145
|
])("#%# should filter scope-related rules and ignore globally silenced rules", (i, g) => {
|
|
149
|
-
c(["@typescript-eslint/no-unsafe-assignment"]),
|
|
146
|
+
c(["@typescript-eslint/no-unsafe-assignment"]), r(l({
|
|
150
147
|
"@typescript-eslint/no-unsafe-assignment": "error",
|
|
151
148
|
"@typescript-eslint/no-unsafe-member-access": "error",
|
|
152
149
|
"@typescript-eslint/no-unsafe-call": "error"
|
|
@@ -159,38 +156,41 @@ if (import.meta.vitest) {
|
|
|
159
156
|
});
|
|
160
157
|
}
|
|
161
158
|
function U(...e) {
|
|
162
|
-
return e.flat().reduce((
|
|
159
|
+
return e.flat().reduce((s, n) => u(s, n), {});
|
|
163
160
|
}
|
|
164
161
|
const p = {
|
|
165
162
|
async config() {
|
|
166
163
|
return import("./index-C2p6z9H4.js");
|
|
167
164
|
},
|
|
168
165
|
async javascript() {
|
|
169
|
-
return import("./index-
|
|
166
|
+
return import("./index-BbY-DzQZ.js");
|
|
170
167
|
},
|
|
171
168
|
async "javascript-node"() {
|
|
172
|
-
return import("./index-
|
|
169
|
+
return import("./index-C__itRdP.js");
|
|
173
170
|
},
|
|
174
171
|
async "javascript-dom"() {
|
|
175
|
-
return import("./index-
|
|
172
|
+
return import("./index-C9C56Sak.js");
|
|
176
173
|
},
|
|
177
174
|
async typescript() {
|
|
178
|
-
return import("./index-
|
|
175
|
+
return import("./index-5XpuN8zJ.js");
|
|
179
176
|
},
|
|
180
177
|
async "typescript-node"() {
|
|
181
|
-
return import("./index-
|
|
178
|
+
return import("./index-Cy4JQvOe.js");
|
|
182
179
|
},
|
|
183
180
|
async "typescript-dom"() {
|
|
184
|
-
return import("./index-
|
|
181
|
+
return import("./index-kDh8-AEb.js");
|
|
185
182
|
},
|
|
186
183
|
async vue3() {
|
|
187
|
-
return import("./index-
|
|
184
|
+
return import("./index-C2ejyG13.js");
|
|
188
185
|
},
|
|
189
186
|
async "vue3-typescript"() {
|
|
190
|
-
return import("./index-
|
|
187
|
+
return import("./index-PPmRJNMx.js");
|
|
191
188
|
},
|
|
192
189
|
async vue2() {
|
|
193
|
-
return import("./index-
|
|
190
|
+
return import("./index-uJNHwtXG.js");
|
|
191
|
+
},
|
|
192
|
+
async "vue2-typescript"() {
|
|
193
|
+
return import("./index-BfVokhiU.js");
|
|
194
194
|
},
|
|
195
195
|
async jest() {
|
|
196
196
|
return import("./index-CG7O0RJO.js");
|
|
@@ -201,8 +201,10 @@ const p = {
|
|
|
201
201
|
};
|
|
202
202
|
async function H(e) {
|
|
203
203
|
await D();
|
|
204
|
-
const
|
|
205
|
-
|
|
204
|
+
const s = e.preset.map(async (o) => typeof p[o] == "function" && (await p[o]()).default).filter(Boolean), r = (await Promise.all(s)).reduce((o, i) => u(o, i), {});
|
|
205
|
+
delete r.files;
|
|
206
|
+
const t = u(r, e.config);
|
|
207
|
+
return t ? (e.silenceRules ? t.rules = l(t.rules, e.silenceRules) : t.rules = l(t.rules), t) : Promise.reject(new Error("No config found"));
|
|
206
208
|
}
|
|
207
209
|
export {
|
|
208
210
|
u as merge,
|
package/dist/rules/vue2.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Linter } from 'eslint';
|
|
2
|
-
declare const
|
|
3
|
-
export
|
|
2
|
+
export declare const vue2Options: Linter.Config;
|
|
3
|
+
export declare const vue2Composition: Linter.Config;
|