@opinionated-ts/config 0.1.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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/index.d.mts +51 -0
- package/dist/index.mjs +117 -0
- package/package.json +87 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Opinionated TS
|
|
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
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# config
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { RuleConfigSeverity } from "@commitlint/types";
|
|
2
|
+
//#region src/configs/commitlint.d.ts
|
|
3
|
+
declare const commitlintConfig: {
|
|
4
|
+
extends: string[];
|
|
5
|
+
rules: {
|
|
6
|
+
"breaking-change-exclamation-mark": [RuleConfigSeverity.Error, "always"];
|
|
7
|
+
"header-max-length": [RuleConfigSeverity.Error, "always", number];
|
|
8
|
+
"scope-case": [RuleConfigSeverity.Error, "always", "lower-case"];
|
|
9
|
+
"scope-max-length": [RuleConfigSeverity.Error, "always", number];
|
|
10
|
+
"subject-case": [RuleConfigSeverity.Error, "always", "lower-case"[]];
|
|
11
|
+
"subject-full-stop": [RuleConfigSeverity.Error, "never", string];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/configs/cspell.d.ts
|
|
16
|
+
declare const cspellConfig: {
|
|
17
|
+
dictionaries: string[];
|
|
18
|
+
files: string[];
|
|
19
|
+
ignorePaths: string[];
|
|
20
|
+
import: string[];
|
|
21
|
+
language: string;
|
|
22
|
+
words: string[];
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/configs/oxfmt.d.ts
|
|
26
|
+
declare const oxfmtConfig: {
|
|
27
|
+
sortTailwindcss: true;
|
|
28
|
+
sortImports: {
|
|
29
|
+
groups: (string | string[])[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/configs/oxlint.d.ts
|
|
34
|
+
declare const oxlintConfig: {
|
|
35
|
+
categories: {
|
|
36
|
+
correctness: "error";
|
|
37
|
+
perf: "warn";
|
|
38
|
+
suspicious: "warn";
|
|
39
|
+
style: "off";
|
|
40
|
+
restriction: "off";
|
|
41
|
+
nursery: "off";
|
|
42
|
+
pedantic: "off";
|
|
43
|
+
};
|
|
44
|
+
options: {
|
|
45
|
+
typeCheck: true;
|
|
46
|
+
typeAware: true;
|
|
47
|
+
};
|
|
48
|
+
plugins: ("import" | "jsx-a11y" | "node" | "oxc" | "promise" | "react" | "react-perf" | "typescript" | "unicorn")[];
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
export { commitlintConfig, cspellConfig, oxfmtConfig, oxlintConfig };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { RuleConfigSeverity } from "@commitlint/types";
|
|
2
|
+
import "oxlint";
|
|
3
|
+
const commitlintConfig = {
|
|
4
|
+
extends: ["@commitlint/config-conventional"],
|
|
5
|
+
rules: {
|
|
6
|
+
"breaking-change-exclamation-mark": [RuleConfigSeverity.Error, "always"],
|
|
7
|
+
"header-max-length": [
|
|
8
|
+
RuleConfigSeverity.Error,
|
|
9
|
+
"always",
|
|
10
|
+
100
|
|
11
|
+
],
|
|
12
|
+
"scope-case": [
|
|
13
|
+
RuleConfigSeverity.Error,
|
|
14
|
+
"always",
|
|
15
|
+
"lower-case"
|
|
16
|
+
],
|
|
17
|
+
"scope-max-length": [
|
|
18
|
+
RuleConfigSeverity.Error,
|
|
19
|
+
"always",
|
|
20
|
+
20
|
|
21
|
+
],
|
|
22
|
+
"subject-case": [
|
|
23
|
+
RuleConfigSeverity.Error,
|
|
24
|
+
"always",
|
|
25
|
+
["lower-case"]
|
|
26
|
+
],
|
|
27
|
+
"subject-full-stop": [
|
|
28
|
+
RuleConfigSeverity.Error,
|
|
29
|
+
"never",
|
|
30
|
+
"."
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/configs/cspell.ts
|
|
36
|
+
const cspellConfig = {
|
|
37
|
+
dictionaries: [
|
|
38
|
+
"typescript",
|
|
39
|
+
"git",
|
|
40
|
+
"bash",
|
|
41
|
+
"sql",
|
|
42
|
+
"filetypes",
|
|
43
|
+
"node",
|
|
44
|
+
"npm",
|
|
45
|
+
"html",
|
|
46
|
+
"css",
|
|
47
|
+
"json",
|
|
48
|
+
"markdown",
|
|
49
|
+
"softwareTerms"
|
|
50
|
+
],
|
|
51
|
+
files: ["**/*.{js,ts,jsx,tsx,txt,md}"],
|
|
52
|
+
ignorePaths: [
|
|
53
|
+
"node_modules",
|
|
54
|
+
"dist",
|
|
55
|
+
"coverage",
|
|
56
|
+
"build"
|
|
57
|
+
],
|
|
58
|
+
import: ["@cspell/dict-es-es/cspell-ext.json"],
|
|
59
|
+
language: "en,es,es-ES",
|
|
60
|
+
words: [
|
|
61
|
+
"oxlint",
|
|
62
|
+
"oxfmt",
|
|
63
|
+
"tsgolint"
|
|
64
|
+
]
|
|
65
|
+
};
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/configs/oxfmt.ts
|
|
68
|
+
const oxfmtConfig = {
|
|
69
|
+
sortTailwindcss: true,
|
|
70
|
+
sortImports: { groups: [
|
|
71
|
+
"type-import",
|
|
72
|
+
["value-builtin", "value-external"],
|
|
73
|
+
"type-internal",
|
|
74
|
+
"value-internal",
|
|
75
|
+
[
|
|
76
|
+
"type-parent",
|
|
77
|
+
"type-sibling",
|
|
78
|
+
"type-index"
|
|
79
|
+
],
|
|
80
|
+
[
|
|
81
|
+
"value-parent",
|
|
82
|
+
"value-sibling",
|
|
83
|
+
"value-index"
|
|
84
|
+
],
|
|
85
|
+
"unknown"
|
|
86
|
+
] }
|
|
87
|
+
};
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/configs/oxlint.ts
|
|
90
|
+
const oxlintConfig = {
|
|
91
|
+
categories: {
|
|
92
|
+
correctness: "error",
|
|
93
|
+
perf: "warn",
|
|
94
|
+
suspicious: "warn",
|
|
95
|
+
style: "off",
|
|
96
|
+
restriction: "off",
|
|
97
|
+
nursery: "off",
|
|
98
|
+
pedantic: "off"
|
|
99
|
+
},
|
|
100
|
+
options: {
|
|
101
|
+
typeCheck: true,
|
|
102
|
+
typeAware: true
|
|
103
|
+
},
|
|
104
|
+
plugins: [
|
|
105
|
+
"node",
|
|
106
|
+
"promise",
|
|
107
|
+
"typescript",
|
|
108
|
+
"import",
|
|
109
|
+
"oxc",
|
|
110
|
+
"react",
|
|
111
|
+
"react-perf",
|
|
112
|
+
"jsx-a11y",
|
|
113
|
+
"unicorn"
|
|
114
|
+
]
|
|
115
|
+
};
|
|
116
|
+
//#endregion
|
|
117
|
+
export { commitlintConfig, cspellConfig, oxfmtConfig, oxlintConfig };
|
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.1.0",
|
|
3
|
+
"name": "@opinionated-ts/config",
|
|
4
|
+
"description": "Opinionated, reusable TypeScript development configurations focused on performance, code quality and developer experience.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"code-quality",
|
|
7
|
+
"commitlint",
|
|
8
|
+
"cspell",
|
|
9
|
+
"developer-tools",
|
|
10
|
+
"formatter",
|
|
11
|
+
"lefthook",
|
|
12
|
+
"linting",
|
|
13
|
+
"opinionated",
|
|
14
|
+
"oxc",
|
|
15
|
+
"oxfmt",
|
|
16
|
+
"oxlint",
|
|
17
|
+
"tooling",
|
|
18
|
+
"typescript",
|
|
19
|
+
"typescript-config"
|
|
20
|
+
],
|
|
21
|
+
"homepage": "https://github.com/opinionated-ts/config#readme",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/opinionated-ts/config/issues"
|
|
24
|
+
},
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"author": {
|
|
27
|
+
"name": "Opinionated TS",
|
|
28
|
+
"url": "https://github.com/opinionated-ts"
|
|
29
|
+
},
|
|
30
|
+
"contributors": [
|
|
31
|
+
{
|
|
32
|
+
"name": "Daniel A. Hernández Ochoa",
|
|
33
|
+
"url": "https://github.com/DanhezCode"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/opinionated-ts/config.git"
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"dist",
|
|
42
|
+
"LICENSE",
|
|
43
|
+
"README.md"
|
|
44
|
+
],
|
|
45
|
+
"type": "module",
|
|
46
|
+
"exports": {
|
|
47
|
+
".": "./dist/index.mjs",
|
|
48
|
+
"./package.json": "./package.json"
|
|
49
|
+
},
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "tsdown",
|
|
55
|
+
"cspell": "cspell lint .",
|
|
56
|
+
"fmt": "oxfmt --check .",
|
|
57
|
+
"fmt:fix": "oxfmt .",
|
|
58
|
+
"lint": "oxlint",
|
|
59
|
+
"lint:fix": "oxlint --fix",
|
|
60
|
+
"check": "bun fmt && bun lint && bun cspell",
|
|
61
|
+
"fix": "bun fmt:fix && bun lint:fix",
|
|
62
|
+
"hooks:install": "lefthook install"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@commitlint/cli": "^21.2.2",
|
|
66
|
+
"@commitlint/config-conventional": "^21.2.2",
|
|
67
|
+
"@cspell/dict-es-es": "^3.0.8",
|
|
68
|
+
"cspell": "^10.0.1",
|
|
69
|
+
"lefthook": "^2.1.10",
|
|
70
|
+
"oxfmt": "^0.64.0",
|
|
71
|
+
"oxlint": "^1.79.0",
|
|
72
|
+
"oxlint-tsgolint": "^7.0.2001"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@types/bun": "^1.4.0",
|
|
76
|
+
"@types/node": "^26.2.0",
|
|
77
|
+
"tsdown": "^0.22.14"
|
|
78
|
+
},
|
|
79
|
+
"peerDependencies": {
|
|
80
|
+
"typescript": "^7.0.2"
|
|
81
|
+
},
|
|
82
|
+
"engines": {
|
|
83
|
+
"bun": "^1.4.0",
|
|
84
|
+
"node": "^26.2.0"
|
|
85
|
+
},
|
|
86
|
+
"packageManager": "bun@1.4.0"
|
|
87
|
+
}
|