@abyssalfragments/linter-config 1.1.1 → 1.2.0
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/dist/index.d.mts +5 -2
- package/dist/index.mjs +8 -2
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,10 @@ export declare enum SharedLicense {
|
|
|
3
3
|
PRIVATE_MEDIA = "private-media",
|
|
4
4
|
MIT = "mit"
|
|
5
5
|
}
|
|
6
|
-
type
|
|
6
|
+
type SharedConfig = {
|
|
7
|
+
extraIgnores?: string[];
|
|
8
|
+
};
|
|
9
|
+
type EslintConfig = SharedConfig & {
|
|
7
10
|
license?: {
|
|
8
11
|
text: string | string[];
|
|
9
12
|
} | {
|
|
@@ -13,7 +16,7 @@ type EslintConfig = {
|
|
|
13
16
|
};
|
|
14
17
|
};
|
|
15
18
|
declare function eslint(config?: EslintConfig): import("eslint/config").ConfigObject[];
|
|
16
|
-
type OxfmtConfig = {
|
|
19
|
+
type OxfmtConfig = SharedConfig & {
|
|
17
20
|
/** Uses tabs over spaces */
|
|
18
21
|
rumiMode?: boolean;
|
|
19
22
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -22,11 +22,17 @@ const Licenses = {
|
|
|
22
22
|
].join("\n\n"),
|
|
23
23
|
["mit"]: ["Copyright (c) 2026 Abyssal Fragments", "SPDX-License-Identifier: MIT"].join("\n")
|
|
24
24
|
};
|
|
25
|
+
// src/shared.ts
|
|
26
|
+
const sharedIgnores = [
|
|
27
|
+
"dist",
|
|
28
|
+
"build",
|
|
29
|
+
"drizzle"
|
|
30
|
+
];
|
|
25
31
|
// src/eslint.ts
|
|
26
32
|
const defaultConfig$1 = Object.freeze({});
|
|
27
33
|
function eslint(config = defaultConfig$1) {
|
|
28
34
|
return defineConfig([
|
|
29
|
-
globalIgnores([
|
|
35
|
+
globalIgnores([...config.extraIgnores ? config.extraIgnores : [], ...sharedIgnores.map((i) => `${i}/*`)]),
|
|
30
36
|
tseslint.configs.recommended,
|
|
31
37
|
{
|
|
32
38
|
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
|
|
@@ -71,7 +77,7 @@ function eslint(config = defaultConfig$1) {
|
|
|
71
77
|
const defaultConfig = Object.freeze({});
|
|
72
78
|
function oxfmt(config = defaultConfig) {
|
|
73
79
|
return defineConfig$1({
|
|
74
|
-
ignorePatterns: [
|
|
80
|
+
ignorePatterns: [...config.extraIgnores ? config.extraIgnores : [], ...sharedIgnores.map((i) => `${i}/**/*`)],
|
|
75
81
|
tabWidth: config.rumiMode ? 4 : 2,
|
|
76
82
|
useTabs: config.rumiMode
|
|
77
83
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abyssalfragments/linter-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
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"
|
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
"eslint": "^10.0.0",
|
|
52
52
|
"oxfmt": "^0.78.0"
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
}
|