@eslinted/defaults 10.34.1 → 10.34.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.
Files changed (54) hide show
  1. package/dist/files/{utility.d.ts → project/index.d.ts} +1 -1
  2. package/dist/files/project/index.d.ts.map +1 -0
  3. package/dist/files/project/index.js +24 -0
  4. package/dist/files/project/index.js.map +1 -0
  5. package/dist/files/project/shared/index.d.ts +3 -0
  6. package/dist/files/project/shared/index.d.ts.map +1 -0
  7. package/dist/files/project/shared/index.js +3 -0
  8. package/dist/files/project/shared/index.js.map +1 -0
  9. package/dist/files/project/shared/roots.d.ts.map +1 -0
  10. package/dist/files/project/shared/roots.js.map +1 -0
  11. package/dist/files/project/shared/subdirectories.d.ts.map +1 -0
  12. package/dist/files/project/shared/subdirectories.js.map +1 -0
  13. package/dist/files/scopes/css.js +1 -1
  14. package/dist/files/scopes/html.js +1 -1
  15. package/dist/files/scopes/js.js +1 -1
  16. package/dist/files/scopes/json.js +1 -1
  17. package/dist/files/scopes/jsonc.js +1 -1
  18. package/dist/files/scopes/jsoncc.js +1 -1
  19. package/dist/files/scopes/mocha.js +1 -1
  20. package/dist/files/scopes/svelte.js +1 -1
  21. package/dist/files/scopes/ts.js +1 -1
  22. package/dist/files/scopes/yml.js +1 -1
  23. package/package.json +1 -1
  24. package/src/files/project/index.ts +48 -0
  25. package/src/files/project/shared/index.ts +2 -0
  26. package/src/files/scopes/css.ts +1 -1
  27. package/src/files/scopes/html.ts +1 -1
  28. package/src/files/scopes/js.ts +1 -1
  29. package/src/files/scopes/json.ts +1 -1
  30. package/src/files/scopes/jsonc.ts +1 -1
  31. package/src/files/scopes/jsoncc.ts +1 -1
  32. package/src/files/scopes/mocha.ts +1 -1
  33. package/src/files/scopes/svelte.ts +1 -1
  34. package/src/files/scopes/ts.ts +1 -1
  35. package/src/files/scopes/yml.ts +1 -1
  36. package/dist/files/common/index.d.ts +0 -3
  37. package/dist/files/common/index.d.ts.map +0 -1
  38. package/dist/files/common/index.js +0 -3
  39. package/dist/files/common/index.js.map +0 -1
  40. package/dist/files/common/roots.d.ts.map +0 -1
  41. package/dist/files/common/roots.js.map +0 -1
  42. package/dist/files/common/subdirectories.d.ts.map +0 -1
  43. package/dist/files/common/subdirectories.js.map +0 -1
  44. package/dist/files/utility.d.ts.map +0 -1
  45. package/dist/files/utility.js +0 -29
  46. package/dist/files/utility.js.map +0 -1
  47. package/src/files/common/index.ts +0 -2
  48. package/src/files/utility.ts +0 -59
  49. /package/dist/files/{common → project/shared}/roots.d.ts +0 -0
  50. /package/dist/files/{common → project/shared}/roots.js +0 -0
  51. /package/dist/files/{common → project/shared}/subdirectories.d.ts +0 -0
  52. /package/dist/files/{common → project/shared}/subdirectories.js +0 -0
  53. /package/src/files/{common → project/shared}/roots.ts +0 -0
  54. /package/src/files/{common → project/shared}/subdirectories.ts +0 -0
@@ -1,2 +1,2 @@
1
1
  export declare function CreateScope(extension: string, { filenames, subdirectories, custom, }?: Partial<Record<"filenames" | "subdirectories" | "custom", string[]>>): string[];
2
- //# sourceMappingURL=utility.d.ts.map
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/files/project/index.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CACzB,SAAS,EAAE,MAAM,EACjB,EACE,SAAc,EACd,cAAmB,EACnB,MAAW,GACZ,GAAE,OAAO,CACR,MAAM,CACF,WAAW,GACX,gBAAgB,GAChB,QAAQ,EACV,MAAM,EAAE,CACT,CACG,YAgCP"}
@@ -0,0 +1,24 @@
1
+ import * as SHARED from "./shared/index.js";
2
+ export function CreateScope(extension, { filenames = [], subdirectories = [], custom = [], } = {}) {
3
+ const branches = [
4
+ "",
5
+ `{${[
6
+ ...SHARED.subdirectories,
7
+ ...subdirectories,
8
+ ].join(",")}}/**/`,
9
+ ], leaves = [
10
+ "*." + extension,
11
+ ...filenames,
12
+ ];
13
+ return [
14
+ ...SHARED
15
+ .roots
16
+ .map(root => branches
17
+ .map(branch => leaves
18
+ .map(leaf => root + branch + leaf))
19
+ .flat())
20
+ .flat(),
21
+ ...custom,
22
+ ];
23
+ }
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/files/project/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,MAAM,UAAU,WAAW,CACzB,SAAiB,EACjB,EACE,SAAS,GAAG,EAAE,EACd,cAAc,GAAG,EAAE,EACnB,MAAM,GAAG,EAAE,MAQT,EAAE;IAEN,MAAM,QAAQ,GAAG;QACf,EAAE;QACF,IACE;YACE,GAAG,MAAM,CAAC,cAAc;YACxB,GAAG,cAAc;SAClB,CAAC,IAAI,CAAC,GAAG,CACZ,OAAO;KACR,EACD,MAAM,GAAG;QACP,IAAI,GAAG,SAAS;QAChB,GAAG,SAAS;KACb,CAAC;IAEF,OAAO;QACL,GAAG,MAAM;aACN,KAAK;aACL,GAAG,CACF,IAAI,CAAC,EAAE,CAAC,QAAQ;aACb,GAAG,CACF,MAAM,CAAC,EAAE,CAAC,MAAM;aACb,GAAG,CACF,IAAI,CAAC,EAAE,CAAC,IAAI,GAAG,MAAM,GAAG,IAAI,CAC7B,CACJ;aACA,IAAI,EAAE,CACV;aACA,IAAI,EAAE;QACT,GAAG,MAAM;KACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { roots } from "./roots.js";
2
+ export { subdirectories } from "./subdirectories.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/files/project/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { roots } from "./roots.js";
2
+ export { subdirectories } from "./subdirectories.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/files/project/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roots.d.ts","sourceRoot":"","sources":["../../../../src/files/project/shared/roots.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAGjB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roots.js","sourceRoot":"","sources":["../../../../src/files/project/shared/roots.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,EAAE;IACF,SAAS;CACV,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subdirectories.d.ts","sourceRoot":"","sources":["../../../../src/files/project/shared/subdirectories.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,UAO1B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subdirectories.js","sourceRoot":"","sources":["../../../../src/files/project/shared/subdirectories.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,KAAK;IACL,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,OAAO;CACR,CAAC"}
@@ -1,3 +1,3 @@
1
- import { CreateScope } from "../utility.js";
1
+ import { CreateScope } from "../project/index.js";
2
2
  export default CreateScope("css");
3
3
  //# sourceMappingURL=css.js.map
@@ -1,3 +1,3 @@
1
- import { CreateScope } from "../utility.js";
1
+ import { CreateScope } from "../project/index.js";
2
2
  export default CreateScope("html");
3
3
  //# sourceMappingURL=html.js.map
@@ -1,3 +1,3 @@
1
- import { CreateScope } from "../utility.js";
1
+ import { CreateScope } from "../project/index.js";
2
2
  export default CreateScope("{c,m,}js");
3
3
  //# sourceMappingURL=js.js.map
@@ -1,3 +1,3 @@
1
- import { CreateScope } from "../utility.js";
1
+ import { CreateScope } from "../project/index.js";
2
2
  export default CreateScope("json");
3
3
  //# sourceMappingURL=json.js.map
@@ -1,3 +1,3 @@
1
- import { CreateScope } from "../utility.js";
1
+ import { CreateScope } from "../project/index.js";
2
2
  export default CreateScope("jsonc");
3
3
  //# sourceMappingURL=jsonc.js.map
@@ -1,4 +1,4 @@
1
- import { CreateScope } from "../utility.js";
1
+ import { CreateScope } from "../project/index.js";
2
2
  export default CreateScope("{jsonc,code-snippets}", {
3
3
  filenames: ["{tsconfig,.vscode/**/*}.json"],
4
4
  subdirectories: [".vscode"],
@@ -1,3 +1,3 @@
1
- import { CreateScope } from "../utility.js";
1
+ import { CreateScope } from "../project/index.js";
2
2
  export default CreateScope("{spec,test}.{c,m,}ts");
3
3
  //# sourceMappingURL=mocha.js.map
@@ -1,3 +1,3 @@
1
- import { CreateScope } from "../utility.js";
1
+ import { CreateScope } from "../project/index.js";
2
2
  export default CreateScope("svelte");
3
3
  //# sourceMappingURL=svelte.js.map
@@ -1,3 +1,3 @@
1
- import { CreateScope } from "../utility.js";
1
+ import { CreateScope } from "../project/index.js";
2
2
  export default CreateScope("{c,m,}ts");
3
3
  //# sourceMappingURL=ts.js.map
@@ -1,4 +1,4 @@
1
- import { CreateScope } from "../utility.js";
1
+ import { CreateScope } from "../project/index.js";
2
2
  export default CreateScope("y{a,}ml", {
3
3
  subdirectories: [".github"],
4
4
  });
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "$schema": "https://json.schemastore.org/package",
4
4
  "$help": "https://docs.npmjs.com/cli/configuring-npm/package-json",
5
5
  "name": "@eslinted/defaults",
6
- "version": "10.34.1",
6
+ "version": "10.34.2",
7
7
  "repository": "github:jimmy-zhening-luo/linted-defaults",
8
8
  "private": false,
9
9
  "engineStrict": true,
@@ -0,0 +1,48 @@
1
+ import * as SHARED from "./shared";
2
+
3
+ export function CreateScope(
4
+ extension: string,
5
+ {
6
+ filenames = [],
7
+ subdirectories = [],
8
+ custom = [],
9
+ }: Partial<
10
+ Record<
11
+ | "filenames"
12
+ | "subdirectories"
13
+ | "custom",
14
+ string[]
15
+ >
16
+ > = {},
17
+ ) {
18
+ const branches = [
19
+ "",
20
+ `{${
21
+ [
22
+ ...SHARED.subdirectories,
23
+ ...subdirectories,
24
+ ].join(",")
25
+ }}/**/`,
26
+ ],
27
+ leaves = [
28
+ "*." + extension,
29
+ ...filenames,
30
+ ];
31
+
32
+ return [
33
+ ...SHARED
34
+ .roots
35
+ .map(
36
+ root => branches
37
+ .map(
38
+ branch => leaves
39
+ .map(
40
+ leaf => root + branch + leaf,
41
+ ),
42
+ )
43
+ .flat(),
44
+ )
45
+ .flat(),
46
+ ...custom,
47
+ ];
48
+ }
@@ -0,0 +1,2 @@
1
+ export { roots } from "./roots";
2
+ export { subdirectories } from "./subdirectories";
@@ -1,4 +1,4 @@
1
- import { CreateScope } from "../utility";
1
+ import { CreateScope } from "../project";
2
2
 
3
3
  export default CreateScope(
4
4
  "css",
@@ -1,4 +1,4 @@
1
- import { CreateScope } from "../utility";
1
+ import { CreateScope } from "../project";
2
2
 
3
3
  export default CreateScope(
4
4
  "html",
@@ -1,4 +1,4 @@
1
- import { CreateScope } from "../utility";
1
+ import { CreateScope } from "../project";
2
2
 
3
3
  export default CreateScope(
4
4
  "{c,m,}js",
@@ -1,4 +1,4 @@
1
- import { CreateScope } from "../utility";
1
+ import { CreateScope } from "../project";
2
2
 
3
3
  export default CreateScope(
4
4
  "json",
@@ -1,4 +1,4 @@
1
- import { CreateScope } from "../utility";
1
+ import { CreateScope } from "../project";
2
2
 
3
3
  export default CreateScope(
4
4
  "jsonc",
@@ -1,4 +1,4 @@
1
- import { CreateScope } from "../utility";
1
+ import { CreateScope } from "../project";
2
2
 
3
3
  export default CreateScope(
4
4
  "{jsonc,code-snippets}",
@@ -1,4 +1,4 @@
1
- import { CreateScope } from "../utility";
1
+ import { CreateScope } from "../project";
2
2
 
3
3
  export default CreateScope(
4
4
  "{spec,test}.{c,m,}ts",
@@ -1,4 +1,4 @@
1
- import { CreateScope } from "../utility";
1
+ import { CreateScope } from "../project";
2
2
 
3
3
  export default CreateScope(
4
4
  "svelte",
@@ -1,4 +1,4 @@
1
- import { CreateScope } from "../utility";
1
+ import { CreateScope } from "../project";
2
2
 
3
3
  export default CreateScope(
4
4
  "{c,m,}ts",
@@ -1,4 +1,4 @@
1
- import { CreateScope } from "../utility";
1
+ import { CreateScope } from "../project";
2
2
 
3
3
  export default CreateScope(
4
4
  "y{a,}ml",
@@ -1,3 +0,0 @@
1
- export * from "./roots.js";
2
- export * from "./subdirectories.js";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/files/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from "./roots.js";
2
- export * from "./subdirectories.js";
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/files/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"roots.d.ts","sourceRoot":"","sources":["../../../src/files/common/roots.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAGjB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"roots.js","sourceRoot":"","sources":["../../../src/files/common/roots.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,EAAE;IACF,SAAS;CACV,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"subdirectories.d.ts","sourceRoot":"","sources":["../../../src/files/common/subdirectories.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,UAO1B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"subdirectories.js","sourceRoot":"","sources":["../../../src/files/common/subdirectories.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,KAAK;IACL,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,OAAO;CACR,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/files/utility.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CACzB,SAAS,EAAE,MAAM,EACjB,EACE,SAAc,EACd,cAAmB,EACnB,MAAW,GACZ,GAAE,OAAO,CAAC,MAAM,CACb,WAAW,GACX,gBAAgB,GAChB,QAAQ,EACV,MAAM,EAAE,CACT,CAAM,YA6CR"}
@@ -1,29 +0,0 @@
1
- import * as common from "./common/index.js";
2
- export function CreateScope(extension, { filenames = [], subdirectories = [], custom = [], } = {}) {
3
- function glob(common, scoped = []) {
4
- return `{${[
5
- ...common,
6
- ...scoped,
7
- ]
8
- .join(",")}}`;
9
- }
10
- const { roots } = common, branches = [
11
- "",
12
- `${glob(common.subdirectories, subdirectories)}/**/`,
13
- ], leaves = [
14
- `*.${extension}`,
15
- ...filenames,
16
- ];
17
- return [
18
- ...roots.map(root => branches.map(branch => leaves.map(leaf => [
19
- root,
20
- branch,
21
- leaf,
22
- ]
23
- .join("")))
24
- .flat())
25
- .flat(),
26
- ...custom,
27
- ];
28
- }
29
- //# sourceMappingURL=utility.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/files/utility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,MAAM,UAAU,WAAW,CACzB,SAAiB,EACjB,EACE,SAAS,GAAG,EAAE,EACd,cAAc,GAAG,EAAE,EACnB,MAAM,GAAG,EAAE,MAMR,EAAE;IAEP,SAAS,IAAI,CACX,MAAyB,EACzB,SAAmB,EAAE;QAErB,OAAO,IACL;YACE,GAAG,MAAM;YACT,GAAG,MAAM;SACV;aACE,IAAI,CAAC,GAAG,CACb,GAAG,CAAC;IACN,CAAC;IAED,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EACxB,QAAQ,GAAG;QACT,EAAE;QACF,GAAG,IAAI,CACL,MAAM,CAAC,cAAc,EACrB,cAAc,CACf,MAAM;KACR,EACD,MAAM,GAAG;QACP,KAAK,SAAS,EAAE;QAChB,GAAG,SAAS;KACb,CAAC;IAEF,OAAO;QACL,GAAG,KAAK,CAAC,GAAG,CACV,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,GAAG,CAClB,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAClB,IAAI,CAAC,EAAE,CAAC;YACN,IAAI;YACJ,MAAM;YACN,IAAI;SACL;aACE,IAAI,CAAC,EAAE,CAAC,CACZ,CACF;aACE,IAAI,EAAE,CACV;aACE,IAAI,EAAE;QACT,GAAG,MAAM;KACV,CAAC;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from "./roots";
2
- export * from "./subdirectories";
@@ -1,59 +0,0 @@
1
- import * as common from "./common";
2
-
3
- export function CreateScope(
4
- extension: string,
5
- {
6
- filenames = [],
7
- subdirectories = [],
8
- custom = [],
9
- }: Partial<Record<
10
- | "filenames"
11
- | "subdirectories"
12
- | "custom",
13
- string[]
14
- >> = {},
15
- ) {
16
- function glob(
17
- common: readonly string[],
18
- scoped: string[] = [],
19
- ) {
20
- return `{${
21
- [
22
- ...common,
23
- ...scoped,
24
- ]
25
- .join(",")
26
- }}`;
27
- }
28
-
29
- const { roots } = common,
30
- branches = [
31
- "",
32
- `${glob(
33
- common.subdirectories,
34
- subdirectories,
35
- )}/**/`,
36
- ],
37
- leaves = [
38
- `*.${extension}`,
39
- ...filenames,
40
- ];
41
-
42
- return [
43
- ...roots.map(
44
- root => branches.map(
45
- branch => leaves.map(
46
- leaf => [
47
- root,
48
- branch,
49
- leaf,
50
- ]
51
- .join(""),
52
- ),
53
- )
54
- .flat(),
55
- )
56
- .flat(),
57
- ...custom,
58
- ];
59
- }
File without changes
File without changes