@alextheman/configs 0.0.0-stage → 1.0.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/dist/index.cjs +156 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +153 -0
- package/package.json +67 -3
- package/README.md +0 -3
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
// src/oxlint/configBase.ts
|
|
3
|
+
const oxlintConfigBase = {
|
|
4
|
+
categories: {
|
|
5
|
+
correctness: "error",
|
|
6
|
+
suspicious: "error"
|
|
7
|
+
},
|
|
8
|
+
options: {
|
|
9
|
+
reportUnusedDisableDirectives: "error",
|
|
10
|
+
typeAware: true,
|
|
11
|
+
typeCheck: true
|
|
12
|
+
},
|
|
13
|
+
overrides: [{
|
|
14
|
+
files: ["**/deprecated/**"],
|
|
15
|
+
rules: { "typescript/no-deprecated": "off" }
|
|
16
|
+
}, {
|
|
17
|
+
files: ["*.config.{js,ts}", "configs/**/*.{ts}"],
|
|
18
|
+
rules: { "sort-keys": [
|
|
19
|
+
"error",
|
|
20
|
+
"asc",
|
|
21
|
+
{ natural: true }
|
|
22
|
+
] }
|
|
23
|
+
}],
|
|
24
|
+
plugins: [
|
|
25
|
+
"eslint",
|
|
26
|
+
"typescript",
|
|
27
|
+
"unicorn",
|
|
28
|
+
"import",
|
|
29
|
+
"node",
|
|
30
|
+
"vitest"
|
|
31
|
+
],
|
|
32
|
+
rules: {
|
|
33
|
+
"arrow-body-style": ["error", "always"],
|
|
34
|
+
"capitalized-comments": "off",
|
|
35
|
+
eqeqeq: "error",
|
|
36
|
+
"func-style": ["error", "declaration"],
|
|
37
|
+
"import/no-named-as-default": "off",
|
|
38
|
+
"import/no-namespace": "error",
|
|
39
|
+
"no-console": ["error", { allow: [
|
|
40
|
+
"warn",
|
|
41
|
+
"error",
|
|
42
|
+
"info",
|
|
43
|
+
"table"
|
|
44
|
+
] }],
|
|
45
|
+
"no-duplicate-imports": ["error", { allowSeparateTypeImports: true }],
|
|
46
|
+
"no-lonely-if": "error",
|
|
47
|
+
"no-magic-numbers": "off",
|
|
48
|
+
"no-new": "off",
|
|
49
|
+
"no-restricted-imports": ["error", { patterns: [{
|
|
50
|
+
group: ["node_modules"],
|
|
51
|
+
message: "Do not import directly from node_modules."
|
|
52
|
+
}, {
|
|
53
|
+
group: ["./", "../"],
|
|
54
|
+
message: "Relative imports are not allowed. Please use imports relative to the project root instead."
|
|
55
|
+
}] }],
|
|
56
|
+
"no-shadow": "off",
|
|
57
|
+
"no-underscore-dangle": "off",
|
|
58
|
+
"no-unused-vars": ["error", {
|
|
59
|
+
argsIgnorePattern: "^_",
|
|
60
|
+
caughtErrorsIgnorePattern: "^_",
|
|
61
|
+
destructuredArrayIgnorePattern: "^_",
|
|
62
|
+
varsIgnorePattern: "^_"
|
|
63
|
+
}],
|
|
64
|
+
"node/no-sync": "error",
|
|
65
|
+
"typescript/adjacent-overload-signatures": "off",
|
|
66
|
+
"typescript/array-type": ["error", { default: "generic" }],
|
|
67
|
+
"typescript/ban-ts-comment": ["error", {
|
|
68
|
+
"ts-check": "allow-with-description",
|
|
69
|
+
"ts-expect-error": "allow-with-description",
|
|
70
|
+
"ts-ignore": "allow-with-description",
|
|
71
|
+
"ts-nocheck": "allow-with-description"
|
|
72
|
+
}],
|
|
73
|
+
"typescript/ban-types": "error",
|
|
74
|
+
"typescript/consistent-type-assertions": ["error", { assertionStyle: "as" }],
|
|
75
|
+
"typescript/consistent-type-definitions": "off",
|
|
76
|
+
"typescript/consistent-type-exports": "error",
|
|
77
|
+
"typescript/consistent-type-imports": ["error", { fixStyle: "separate-type-imports" }],
|
|
78
|
+
"typescript/dot-notation": "error",
|
|
79
|
+
"typescript/no-deprecated": "warn",
|
|
80
|
+
"typescript/no-for-in-array": "off",
|
|
81
|
+
"typescript/no-require-imports": "error",
|
|
82
|
+
"typescript/no-unnecessary-template-expression": "error",
|
|
83
|
+
"typescript/no-unnecessary-type-assertion": "error",
|
|
84
|
+
"typescript/no-unnecessary-type-parameters": "off",
|
|
85
|
+
"typescript/no-unsafe-type-assertion": "off",
|
|
86
|
+
"typescript/prefer-function-type": "error",
|
|
87
|
+
"typescript/restrict-template-expressions": ["error", { allow: [{
|
|
88
|
+
from: "file",
|
|
89
|
+
name: "VersionNumber"
|
|
90
|
+
}] }],
|
|
91
|
+
"unicorn/no-instanceof-array": "error",
|
|
92
|
+
"unicorn/no-process-exit": "error",
|
|
93
|
+
"unicorn/no-typeof-undefined": "error",
|
|
94
|
+
"vitest/consistent-each-for": ["error", {
|
|
95
|
+
describe: "each",
|
|
96
|
+
test: "each"
|
|
97
|
+
}],
|
|
98
|
+
"vitest/consistent-test-it": ["error", { fn: "test" }],
|
|
99
|
+
"vitest/consistent-vitest-vi": ["error", { fn: "vitest" }],
|
|
100
|
+
"vitest/expect-expect": "off",
|
|
101
|
+
"vitest/no-conditional-expect": "off",
|
|
102
|
+
"vitest/no-focused-tests": "error",
|
|
103
|
+
"vitest/no-import-node-test": "error",
|
|
104
|
+
"vitest/no-importing-vitest-globals": "off",
|
|
105
|
+
"vitest/no-test-prefixes": "error",
|
|
106
|
+
"vitest/prefer-describe-function-title": "off",
|
|
107
|
+
"vitest/prefer-importing-vitest-globals": "error",
|
|
108
|
+
"vitest/require-mock-type-parameters": "off"
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
// src/oxfmt/sortImports.ts
|
|
112
|
+
const sortImports = {
|
|
113
|
+
customGroups: [
|
|
114
|
+
{
|
|
115
|
+
elementNamePattern: ["**/*.json"],
|
|
116
|
+
groupName: "json"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
elementNamePattern: ["tests/**"],
|
|
120
|
+
groupName: "type-tests",
|
|
121
|
+
selector: "type"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
elementNamePattern: ["tests/**"],
|
|
125
|
+
groupName: "value-tests"
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
groups: [
|
|
129
|
+
"type-builtin",
|
|
130
|
+
"type-external",
|
|
131
|
+
"type-tests",
|
|
132
|
+
"type-internal",
|
|
133
|
+
"value-external",
|
|
134
|
+
"value-builtin",
|
|
135
|
+
"value-tests",
|
|
136
|
+
"value-internal",
|
|
137
|
+
"json"
|
|
138
|
+
],
|
|
139
|
+
ignoreCase: true,
|
|
140
|
+
internalPattern: ["src/"],
|
|
141
|
+
newlinesBetween: true,
|
|
142
|
+
order: "asc",
|
|
143
|
+
partitionByComment: false,
|
|
144
|
+
partitionByNewLine: false,
|
|
145
|
+
specialCharacters: "keep",
|
|
146
|
+
type: "alphabetical"
|
|
147
|
+
};
|
|
148
|
+
// src/oxfmt/configBase.ts
|
|
149
|
+
const oxfmtConfigBase = {
|
|
150
|
+
ignorePatterns: ["dist/**", "pnpm-lock.yaml"],
|
|
151
|
+
sortImports,
|
|
152
|
+
sortPackageJson: { sortScripts: true }
|
|
153
|
+
};
|
|
154
|
+
exports.oxfmtConfigBase = oxfmtConfigBase;
|
|
155
|
+
exports.oxlintConfigBase = oxlintConfigBase;
|
|
156
|
+
exports.sortImports = sortImports;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { OxlintConfig } from "oxlint";
|
|
2
|
+
import { OxfmtConfig, SortImportsUserConfig } from "oxfmt";
|
|
3
|
+
declare const oxlintConfigBase: OxlintConfig;
|
|
4
|
+
declare const oxfmtConfigBase: OxfmtConfig;
|
|
5
|
+
declare const sortImports: SortImportsUserConfig;
|
|
6
|
+
export { oxfmtConfigBase, oxlintConfigBase, sortImports };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { OxlintConfig } from "oxlint";
|
|
2
|
+
import { OxfmtConfig, SortImportsUserConfig } from "oxfmt";
|
|
3
|
+
declare const oxlintConfigBase: OxlintConfig;
|
|
4
|
+
declare const oxfmtConfigBase: OxfmtConfig;
|
|
5
|
+
declare const sortImports: SortImportsUserConfig;
|
|
6
|
+
export { oxfmtConfigBase, oxlintConfigBase, sortImports };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
// src/oxlint/configBase.ts
|
|
2
|
+
const oxlintConfigBase = {
|
|
3
|
+
categories: {
|
|
4
|
+
correctness: "error",
|
|
5
|
+
suspicious: "error"
|
|
6
|
+
},
|
|
7
|
+
options: {
|
|
8
|
+
reportUnusedDisableDirectives: "error",
|
|
9
|
+
typeAware: true,
|
|
10
|
+
typeCheck: true
|
|
11
|
+
},
|
|
12
|
+
overrides: [{
|
|
13
|
+
files: ["**/deprecated/**"],
|
|
14
|
+
rules: { "typescript/no-deprecated": "off" }
|
|
15
|
+
}, {
|
|
16
|
+
files: ["*.config.{js,ts}", "configs/**/*.{ts}"],
|
|
17
|
+
rules: { "sort-keys": [
|
|
18
|
+
"error",
|
|
19
|
+
"asc",
|
|
20
|
+
{ natural: true }
|
|
21
|
+
] }
|
|
22
|
+
}],
|
|
23
|
+
plugins: [
|
|
24
|
+
"eslint",
|
|
25
|
+
"typescript",
|
|
26
|
+
"unicorn",
|
|
27
|
+
"import",
|
|
28
|
+
"node",
|
|
29
|
+
"vitest"
|
|
30
|
+
],
|
|
31
|
+
rules: {
|
|
32
|
+
"arrow-body-style": ["error", "always"],
|
|
33
|
+
"capitalized-comments": "off",
|
|
34
|
+
eqeqeq: "error",
|
|
35
|
+
"func-style": ["error", "declaration"],
|
|
36
|
+
"import/no-named-as-default": "off",
|
|
37
|
+
"import/no-namespace": "error",
|
|
38
|
+
"no-console": ["error", { allow: [
|
|
39
|
+
"warn",
|
|
40
|
+
"error",
|
|
41
|
+
"info",
|
|
42
|
+
"table"
|
|
43
|
+
] }],
|
|
44
|
+
"no-duplicate-imports": ["error", { allowSeparateTypeImports: true }],
|
|
45
|
+
"no-lonely-if": "error",
|
|
46
|
+
"no-magic-numbers": "off",
|
|
47
|
+
"no-new": "off",
|
|
48
|
+
"no-restricted-imports": ["error", { patterns: [{
|
|
49
|
+
group: ["node_modules"],
|
|
50
|
+
message: "Do not import directly from node_modules."
|
|
51
|
+
}, {
|
|
52
|
+
group: ["./", "../"],
|
|
53
|
+
message: "Relative imports are not allowed. Please use imports relative to the project root instead."
|
|
54
|
+
}] }],
|
|
55
|
+
"no-shadow": "off",
|
|
56
|
+
"no-underscore-dangle": "off",
|
|
57
|
+
"no-unused-vars": ["error", {
|
|
58
|
+
argsIgnorePattern: "^_",
|
|
59
|
+
caughtErrorsIgnorePattern: "^_",
|
|
60
|
+
destructuredArrayIgnorePattern: "^_",
|
|
61
|
+
varsIgnorePattern: "^_"
|
|
62
|
+
}],
|
|
63
|
+
"node/no-sync": "error",
|
|
64
|
+
"typescript/adjacent-overload-signatures": "off",
|
|
65
|
+
"typescript/array-type": ["error", { default: "generic" }],
|
|
66
|
+
"typescript/ban-ts-comment": ["error", {
|
|
67
|
+
"ts-check": "allow-with-description",
|
|
68
|
+
"ts-expect-error": "allow-with-description",
|
|
69
|
+
"ts-ignore": "allow-with-description",
|
|
70
|
+
"ts-nocheck": "allow-with-description"
|
|
71
|
+
}],
|
|
72
|
+
"typescript/ban-types": "error",
|
|
73
|
+
"typescript/consistent-type-assertions": ["error", { assertionStyle: "as" }],
|
|
74
|
+
"typescript/consistent-type-definitions": "off",
|
|
75
|
+
"typescript/consistent-type-exports": "error",
|
|
76
|
+
"typescript/consistent-type-imports": ["error", { fixStyle: "separate-type-imports" }],
|
|
77
|
+
"typescript/dot-notation": "error",
|
|
78
|
+
"typescript/no-deprecated": "warn",
|
|
79
|
+
"typescript/no-for-in-array": "off",
|
|
80
|
+
"typescript/no-require-imports": "error",
|
|
81
|
+
"typescript/no-unnecessary-template-expression": "error",
|
|
82
|
+
"typescript/no-unnecessary-type-assertion": "error",
|
|
83
|
+
"typescript/no-unnecessary-type-parameters": "off",
|
|
84
|
+
"typescript/no-unsafe-type-assertion": "off",
|
|
85
|
+
"typescript/prefer-function-type": "error",
|
|
86
|
+
"typescript/restrict-template-expressions": ["error", { allow: [{
|
|
87
|
+
from: "file",
|
|
88
|
+
name: "VersionNumber"
|
|
89
|
+
}] }],
|
|
90
|
+
"unicorn/no-instanceof-array": "error",
|
|
91
|
+
"unicorn/no-process-exit": "error",
|
|
92
|
+
"unicorn/no-typeof-undefined": "error",
|
|
93
|
+
"vitest/consistent-each-for": ["error", {
|
|
94
|
+
describe: "each",
|
|
95
|
+
test: "each"
|
|
96
|
+
}],
|
|
97
|
+
"vitest/consistent-test-it": ["error", { fn: "test" }],
|
|
98
|
+
"vitest/consistent-vitest-vi": ["error", { fn: "vitest" }],
|
|
99
|
+
"vitest/expect-expect": "off",
|
|
100
|
+
"vitest/no-conditional-expect": "off",
|
|
101
|
+
"vitest/no-focused-tests": "error",
|
|
102
|
+
"vitest/no-import-node-test": "error",
|
|
103
|
+
"vitest/no-importing-vitest-globals": "off",
|
|
104
|
+
"vitest/no-test-prefixes": "error",
|
|
105
|
+
"vitest/prefer-describe-function-title": "off",
|
|
106
|
+
"vitest/prefer-importing-vitest-globals": "error",
|
|
107
|
+
"vitest/require-mock-type-parameters": "off"
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
// src/oxfmt/sortImports.ts
|
|
111
|
+
const sortImports = {
|
|
112
|
+
customGroups: [
|
|
113
|
+
{
|
|
114
|
+
elementNamePattern: ["**/*.json"],
|
|
115
|
+
groupName: "json"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
elementNamePattern: ["tests/**"],
|
|
119
|
+
groupName: "type-tests",
|
|
120
|
+
selector: "type"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
elementNamePattern: ["tests/**"],
|
|
124
|
+
groupName: "value-tests"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
groups: [
|
|
128
|
+
"type-builtin",
|
|
129
|
+
"type-external",
|
|
130
|
+
"type-tests",
|
|
131
|
+
"type-internal",
|
|
132
|
+
"value-external",
|
|
133
|
+
"value-builtin",
|
|
134
|
+
"value-tests",
|
|
135
|
+
"value-internal",
|
|
136
|
+
"json"
|
|
137
|
+
],
|
|
138
|
+
ignoreCase: true,
|
|
139
|
+
internalPattern: ["src/"],
|
|
140
|
+
newlinesBetween: true,
|
|
141
|
+
order: "asc",
|
|
142
|
+
partitionByComment: false,
|
|
143
|
+
partitionByNewLine: false,
|
|
144
|
+
specialCharacters: "keep",
|
|
145
|
+
type: "alphabetical"
|
|
146
|
+
};
|
|
147
|
+
// src/oxfmt/configBase.ts
|
|
148
|
+
const oxfmtConfigBase = {
|
|
149
|
+
ignorePatterns: ["dist/**", "pnpm-lock.yaml"],
|
|
150
|
+
sortImports,
|
|
151
|
+
sortPackageJson: { sortScripts: true }
|
|
152
|
+
};
|
|
153
|
+
export { oxfmtConfigBase, oxlintConfigBase, sortImports };
|
package/package.json
CHANGED
|
@@ -1,6 +1,70 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alextheman/configs",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/alextheman231/configs.git"
|
|
9
|
+
},
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"require": "./dist/index.cjs"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"keywords": [],
|
|
21
|
+
"author": "",
|
|
22
|
+
"license": "ISC",
|
|
23
|
+
"type": "module",
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/node": "26.6.6",
|
|
26
|
+
"alex-c-line": "2.18.2",
|
|
27
|
+
"husky": "9.1.7",
|
|
28
|
+
"markdownlint-cli2": "0.24.2",
|
|
29
|
+
"oxfmt": "0.79.0",
|
|
30
|
+
"oxlint-tsgolint": "7.0.2007",
|
|
31
|
+
"tsdown": "0.23.7",
|
|
32
|
+
"typescript": "6.0.3"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"oxfmt": ">=0.79.0",
|
|
36
|
+
"oxlint": ">=1.94.0",
|
|
37
|
+
"oxlint-tsgolint": ">=7.0.2007"
|
|
38
|
+
},
|
|
39
|
+
"peerDependenciesMeta": {
|
|
40
|
+
"oxlint": {
|
|
41
|
+
"optional": true
|
|
42
|
+
},
|
|
43
|
+
"oxlint-tsgolint": {
|
|
44
|
+
"optional": true
|
|
45
|
+
},
|
|
46
|
+
"oxfmt": {
|
|
47
|
+
"optional": true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "tsdown",
|
|
52
|
+
"build-configs": "tsdown --config tsdown.configs.config.ts",
|
|
53
|
+
"create-feature-docs": "typedoc",
|
|
54
|
+
"create-local-package": "pnpm run build && rm -f alextheman-utility-*.tgz && pnpm pack",
|
|
55
|
+
"create-release": "bash -c 'git pull origin main && alex-c-line template release-note create $@ --status \"Released\" --update-version' --",
|
|
56
|
+
"create-release-note": "bash -c 'git pull origin main && alex-c-line template release-note create $@' --",
|
|
57
|
+
"format": "pnpm run format-oxlint && pnpm run format-oxfmt && pnpm run format-markdownlint",
|
|
58
|
+
"format-oxlint": "oxlint --fix",
|
|
59
|
+
"format-markdownlint": "pnpm exec markdownlint-cli2 --fix \"**/*.md\" \"!{node_modules,dist}/**\" | grep -v \"^Finding:\"",
|
|
60
|
+
"format-oxfmt": "oxfmt \"./**/*.{ts,js,yml,yaml}\"",
|
|
61
|
+
"lint": "pnpm run lint-tsc && pnpm run lint-oxlint && pnpm run lint-markdownlint && pnpm run lint-oxfmt && pnpm run lint-pre-release",
|
|
62
|
+
"lint-oxlint": "oxlint",
|
|
63
|
+
"lint-markdownlint": "bash -o pipefail -c 'pnpm exec markdownlint-cli2 \"**/*.md\" \"!{node_modules,dist}/**\"| grep -v \"^Finding:\"'",
|
|
64
|
+
"lint-oxfmt": "oxfmt --check \"./**/*.{ts,js,yml,yaml}\"",
|
|
65
|
+
"lint-pre-release": "alex-c-line package-json check --rules no-pre-release-dependencies",
|
|
66
|
+
"lint-tsc": "tsc --noEmit",
|
|
67
|
+
"pre-commit": "pnpm run build-configs && alex-c-line pre-commit",
|
|
68
|
+
"update-dependencies": "pnpm update --latest && pnpm update"
|
|
69
|
+
}
|
|
6
70
|
}
|
package/README.md
DELETED