@abyssalfragments/linter-config 1.0.1 → 1.1.1

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
@@ -2,4 +2,4 @@
2
2
 
3
3
  Shared ESLint and Oxfmt configurations for Abyssal Fragments projects.
4
4
 
5
- Developed on [Forgejo](https://git.abyssalfragments.org/packages/linter-config)
5
+ Developed on [Forgejo](https://git.abyssalfragments.org/packages/linter-config)
package/dist/index.d.mts CHANGED
@@ -1,11 +1,16 @@
1
- type EslintConfigLicense = {
2
- text: string | string[];
3
- } | {
4
- file: string;
5
- };
1
+ export declare enum SharedLicense {
2
+ PRIVATE = "private",
3
+ PRIVATE_MEDIA = "private-media",
4
+ MIT = "mit"
5
+ }
6
6
  type EslintConfig = {
7
- discord?: boolean;
8
- license?: EslintConfigLicense;
7
+ license?: {
8
+ text: string | string[];
9
+ } | {
10
+ file: string;
11
+ } | {
12
+ shared: SharedLicense;
13
+ };
9
14
  };
10
15
  declare function eslint(config?: EslintConfig): import("eslint/config").ConfigObject[];
11
16
  type OxfmtConfig = {
package/dist/index.mjs CHANGED
@@ -6,6 +6,22 @@ import { defineConfig, globalIgnores } from "eslint/config";
6
6
  import header from "eslint-plugin-simple-header";
7
7
  import eslintConfigPrettier from "eslint-config-prettier/flat";
8
8
  import { defineConfig as defineConfig$1 } from "oxfmt";
9
+ // src/license.ts
10
+ let SharedLicense = /* @__PURE__ */ function(SharedLicense) {
11
+ SharedLicense["PRIVATE"] = "private";
12
+ SharedLicense["PRIVATE_MEDIA"] = "private-media";
13
+ SharedLicense["MIT"] = "mit";
14
+ return SharedLicense;
15
+ }({});
16
+ const Licenses = {
17
+ ["private"]: ["Copyright (c) 2026 Abyssal Fragments", "Unauthorized copying or distribution is strictly prohibited."].join("\n\n"),
18
+ ["private-media"]: [
19
+ "Copyright (c) 2026 Abyssal Fragments",
20
+ "All code and software assets are the exclusive property of Abyssal Fragments. Unauthorized copying, modification, or distribution of these assets is strictly prohibited.",
21
+ "All images and visual content are the property of their respective owners and are used with permission or under applicable rights."
22
+ ].join("\n\n"),
23
+ ["mit"]: ["Copyright (c) 2026 Abyssal Fragments", "SPDX-License-Identifier: MIT"].join("\n")
24
+ };
9
25
  // src/eslint.ts
10
26
  const defaultConfig$1 = Object.freeze({});
11
27
  function eslint(config = defaultConfig$1) {
@@ -25,30 +41,28 @@ function eslint(config = defaultConfig$1) {
25
41
  ...globals.nodeBuiltin
26
42
  } },
27
43
  rules: {
28
- ...config.license ? { "header/header": ["error", "file" in config.license ? { files: [config.license.file] } : { text: config.license.text }] } : {},
44
+ ...config.license ? { "header/header": ["error", "file" in config.license ? { files: [config.license.file] } : { text: "shared" in config.license ? Licenses[config.license.shared] : config.license.text }] } : {},
29
45
  "no-undef": "off",
30
- "@typescript-eslint/no-unused-vars": "off",
31
46
  "no-redeclare": "off",
32
47
  "@typescript-eslint/no-redeclare": "error",
33
- "no-unused-vars": "off",
34
48
  "unused-imports/no-unused-imports": "error",
49
+ "no-unused-vars": "off",
50
+ "@typescript-eslint/no-unused-vars": "off",
35
51
  "unused-imports/no-unused-vars": ["warn", {
36
52
  vars: "all",
37
53
  varsIgnorePattern: "^_",
38
54
  args: "after-used",
39
55
  argsIgnorePattern: "^_"
40
56
  }],
41
- ...config.discord ? {
42
- "no-restricted-imports": ["error", { paths: [{
43
- name: "discord.js",
44
- importNames: ["Colors"],
45
- message: "Use StyledColors instead"
46
- }] }],
47
- "no-restricted-syntax": ["error", {
48
- selector: "Literal[raw=/^0x/i]",
49
- message: "Use StyledColors instead"
50
- }]
51
- } : {}
57
+ "no-restricted-imports": ["error", { paths: [{
58
+ name: "discord.js",
59
+ importNames: ["Colors"],
60
+ message: "Use StyledColors instead"
61
+ }] }],
62
+ "no-restricted-syntax": ["error", {
63
+ selector: "Literal[raw=/^0x/i]",
64
+ message: "Use StyledColors instead"
65
+ }]
52
66
  }
53
67
  }
54
68
  ]);
@@ -62,4 +76,4 @@ function oxfmt(config = defaultConfig) {
62
76
  useTabs: config.rumiMode
63
77
  });
64
78
  }
65
- export { eslint, oxfmt };
79
+ export { SharedLicense, eslint, oxfmt };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyssalfragments/linter-config",
3
- "version": "1.0.1",
3
+ "version": "1.1.1",
4
4
  "description": "Abyssal Fragments shared linter config (eslint, prettier, etc)",
5
5
  "bugs": {
6
6
  "url": "https://git.abyssalfragments.org/packages/linter-config/issues"