@abyssalfragments/linter-config 0.0.0-stage → 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Abyssal Fragments
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
- # Temporary Holding Version
1
+ # @abyssalfragments/linter-config
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Shared ESLint and Oxfmt configurations for Abyssal Fragments projects.
4
+
5
+ Developed on [Forgejo](https://git.abyssalfragments.org/packages/linter-config)
@@ -0,0 +1,25 @@
1
+ export declare enum SharedLicense {
2
+ PRIVATE = "private",
3
+ PRIVATE_MEDIA = "private-media",
4
+ MIT = "mit"
5
+ }
6
+ type EslintConfig = {
7
+ license?: {
8
+ text: string | string[];
9
+ } | {
10
+ file: string;
11
+ } | {
12
+ shared: SharedLicense;
13
+ };
14
+ };
15
+ declare function eslint(config?: EslintConfig): import("eslint/config").ConfigObject[];
16
+ type OxfmtConfig = {
17
+ /** Uses tabs over spaces */
18
+ rumiMode?: boolean;
19
+ };
20
+ declare function oxfmt(config?: OxfmtConfig): {
21
+ ignorePatterns: string[];
22
+ tabWidth: number;
23
+ useTabs: boolean | undefined;
24
+ };
25
+ export { eslint, oxfmt };
package/dist/index.mjs ADDED
@@ -0,0 +1,79 @@
1
+ import js from "@eslint/js";
2
+ import unusedImports from "eslint-plugin-unused-imports";
3
+ import globals from "globals";
4
+ import tseslint from "typescript-eslint";
5
+ import { defineConfig, globalIgnores } from "eslint/config";
6
+ import header from "eslint-plugin-simple-header";
7
+ import eslintConfigPrettier from "eslint-config-prettier/flat";
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
+ };
25
+ // src/eslint.ts
26
+ const defaultConfig$1 = Object.freeze({});
27
+ function eslint(config = defaultConfig$1) {
28
+ return defineConfig([
29
+ globalIgnores(["dist/*"]),
30
+ tseslint.configs.recommended,
31
+ {
32
+ files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
33
+ plugins: {
34
+ js,
35
+ "unused-imports": unusedImports,
36
+ header
37
+ },
38
+ extends: [js.configs.recommended, eslintConfigPrettier],
39
+ languageOptions: { globals: {
40
+ ...globals.node,
41
+ ...globals.nodeBuiltin
42
+ } },
43
+ rules: {
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 }] } : {},
45
+ "no-undef": "off",
46
+ "no-redeclare": "off",
47
+ "@typescript-eslint/no-redeclare": "error",
48
+ "unused-imports/no-unused-imports": "error",
49
+ "no-unused-vars": "off",
50
+ "@typescript-eslint/no-unused-vars": "off",
51
+ "unused-imports/no-unused-vars": ["warn", {
52
+ vars: "all",
53
+ varsIgnorePattern: "^_",
54
+ args: "after-used",
55
+ argsIgnorePattern: "^_"
56
+ }],
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
+ }]
66
+ }
67
+ }
68
+ ]);
69
+ }
70
+ // src/oxfmt.ts
71
+ const defaultConfig = Object.freeze({});
72
+ function oxfmt(config = defaultConfig) {
73
+ return defineConfig$1({
74
+ ignorePatterns: ["dist/**/*"],
75
+ tabWidth: config.rumiMode ? 4 : 2,
76
+ useTabs: config.rumiMode
77
+ });
78
+ }
79
+ export { SharedLicense, eslint, oxfmt };
package/package.json CHANGED
@@ -1,6 +1,54 @@
1
1
  {
2
2
  "name": "@abyssalfragments/linter-config",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.1.1",
4
+ "description": "Abyssal Fragments shared linter config (eslint, prettier, etc)",
5
+ "bugs": {
6
+ "url": "https://git.abyssalfragments.org/packages/linter-config/issues"
7
+ },
8
+ "license": "MIT",
9
+ "author": {
10
+ "name": "Lillith Rose",
11
+ "email": "lillithrose@abyssalfragments.org"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/AbyssalFragments/linter-config"
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "type": "module",
21
+ "exports": {
22
+ ".": "./dist/index.mjs",
23
+ "./package.json": "./package.json"
24
+ },
25
+ "scripts": {
26
+ "build": "tsdown",
27
+ "dev": "tsdown --watch",
28
+ "check": "tsc --noEmit",
29
+ "prepublishOnly": "npm run build",
30
+ "lint": "eslint . && oxfmt --check",
31
+ "fix": "eslint . --fix",
32
+ "format": "oxfmt",
33
+ "lint:dev": "npm run build && npm run lint"
34
+ },
35
+ "dependencies": {
36
+ "@eslint/js": "10.0.1",
37
+ "eslint-config-prettier": "^10.1.8",
38
+ "eslint-plugin-simple-header": "1.2.2",
39
+ "eslint-plugin-unused-imports": "4.4.1",
40
+ "globals": "17.14.0",
41
+ "typescript-eslint": "8.72.2"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "26.6.6",
45
+ "eslint": "10.15.0",
46
+ "oxfmt": "^0.78.0",
47
+ "tsdown": "0.23.7",
48
+ "typescript": "6.0.3"
49
+ },
50
+ "peerDependencies": {
51
+ "eslint": "^10.0.0",
52
+ "oxfmt": "^0.78.0"
53
+ }
6
54
  }