@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 +1 -1
- package/dist/index.d.mts +12 -7
- package/dist/index.mjs +29 -15
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
export declare enum SharedLicense {
|
|
2
|
+
PRIVATE = "private",
|
|
3
|
+
PRIVATE_MEDIA = "private-media",
|
|
4
|
+
MIT = "mit"
|
|
5
|
+
}
|
|
6
6
|
type EslintConfig = {
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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