@adbayb/stack 2.40.0-next-9f3b748 → 2.40.0-next-f971d11

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.
@@ -0,0 +1,33 @@
1
+ import { OxfmtConfig } from "oxfmt";
2
+
3
+ //#region configs/oxfmt/index.d.ts
4
+ declare const config: {
5
+ arrowParens: "always";
6
+ bracketSameLine: false;
7
+ bracketSpacing: true;
8
+ embeddedLanguageFormatting: "auto";
9
+ endOfLine: "lf";
10
+ htmlWhitespaceSensitivity: "css";
11
+ ignorePatterns: never[];
12
+ insertFinalNewline: true;
13
+ jsdoc: true;
14
+ jsxSingleQuote: false;
15
+ objectWrap: "preserve";
16
+ printWidth: number;
17
+ proseWrap: "preserve";
18
+ quoteProps: "consistent";
19
+ semi: true;
20
+ singleAttributePerLine: true;
21
+ singleQuote: false;
22
+ sortImports: {
23
+ newlinesBetween: false;
24
+ };
25
+ sortPackageJson: true;
26
+ tabWidth: number;
27
+ trailingComma: "all";
28
+ useTabs: true;
29
+ vueIndentScriptAndStyle: false;
30
+ };
31
+ declare const createConfig: (input: Required<Pick<OxfmtConfig, "overrides">>) => OxfmtConfig;
32
+ //#endregion
33
+ export { createConfig, config as default };
@@ -0,0 +1,37 @@
1
+ import { defineConfig } from "oxfmt";
2
+
3
+ //#region configs/oxfmt/index.ts
4
+ const config = defineConfig({
5
+ arrowParens: "always",
6
+ bracketSameLine: false,
7
+ bracketSpacing: true,
8
+ embeddedLanguageFormatting: "auto",
9
+ endOfLine: "lf",
10
+ htmlWhitespaceSensitivity: "css",
11
+ ignorePatterns: [],
12
+ insertFinalNewline: true,
13
+ jsdoc: true,
14
+ jsxSingleQuote: false,
15
+ objectWrap: "preserve",
16
+ printWidth: 100,
17
+ proseWrap: "preserve",
18
+ quoteProps: "consistent",
19
+ semi: true,
20
+ singleAttributePerLine: true,
21
+ singleQuote: false,
22
+ sortImports: { newlinesBetween: false },
23
+ sortPackageJson: true,
24
+ tabWidth: 4,
25
+ trailingComma: "all",
26
+ useTabs: true,
27
+ vueIndentScriptAndStyle: false
28
+ });
29
+ const createConfig = (input) => {
30
+ return {
31
+ ...config,
32
+ ...input
33
+ };
34
+ };
35
+
36
+ //#endregion
37
+ export { createConfig, config as default };
@@ -0,0 +1,147 @@
1
+ import { OxlintConfig } from "oxlint";
2
+
3
+ //#region configs/oxlint/index.d.ts
4
+ declare const config: {
5
+ categories: {
6
+ correctness: "error";
7
+ nursery: "error";
8
+ pedantic: "error";
9
+ perf: "error";
10
+ restriction: "error";
11
+ style: "error";
12
+ suspicious: "error";
13
+ };
14
+ jsPlugins: string[];
15
+ options: {
16
+ denyWarnings: true;
17
+ reportUnusedDisableDirectives: "error";
18
+ respectEslintDisableDirectives: false;
19
+ typeAware: true;
20
+ typeCheck: true;
21
+ };
22
+ overrides: ({
23
+ files: string[];
24
+ plugins: "vitest"[];
25
+ rules?: never;
26
+ } | {
27
+ files: string[];
28
+ rules: {
29
+ "import/no-anonymous-default-export": "off";
30
+ "import/no-default-export": "off";
31
+ };
32
+ plugins?: never;
33
+ })[];
34
+ plugins: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jsx-a11y" | "react-perf" | "promise" | "node")[];
35
+ rules: {
36
+ "@stylistic/jsx-pascal-case": "error";
37
+ "@stylistic/jsx-self-closing-comp": "error";
38
+ "@stylistic/lines-between-class-members": "error";
39
+ "@stylistic/multiline-comment-style": "error";
40
+ "@stylistic/padding-line-between-statements": ["error", {
41
+ blankLine: string;
42
+ next: string;
43
+ prev: string;
44
+ }, {
45
+ blankLine: string;
46
+ next: string[];
47
+ prev: string[];
48
+ }, {
49
+ blankLine: string;
50
+ next: string[];
51
+ prev: string[];
52
+ }, {
53
+ blankLine: string;
54
+ next: string[];
55
+ prev: string[];
56
+ }, {
57
+ blankLine: string;
58
+ next: string[];
59
+ prev: string[];
60
+ }, {
61
+ blankLine: string;
62
+ next: string[];
63
+ prev: string[];
64
+ }, {
65
+ blankLine: string;
66
+ next: string[];
67
+ prev: string[];
68
+ }, {
69
+ blankLine: string;
70
+ next: string;
71
+ prev: string;
72
+ }, {
73
+ blankLine: string;
74
+ next: string[];
75
+ prev: string[];
76
+ }, {
77
+ blankLine: string;
78
+ next: string;
79
+ prev: string[];
80
+ }];
81
+ "@stylistic/quotes": ["error", string, {
82
+ allowTemplateLiterals: string;
83
+ avoidEscape: boolean;
84
+ }];
85
+ "@stylistic/spaced-comment": "error";
86
+ "array-callback-return": ["error", {
87
+ allowImplicit: true;
88
+ }];
89
+ "arrow-body-style": ["error", "always"];
90
+ "id-length": "off";
91
+ "import/exports-last": "off";
92
+ "import/group-exports": "off";
93
+ "import/max-dependencies": "off";
94
+ "import/no-dynamic-require": "off";
95
+ "import/no-named-export": "off";
96
+ "import/no-nodejs-modules": "off";
97
+ "import/no-relative-parent-imports": "off";
98
+ "import/prefer-default-export": "off";
99
+ "jsdoc/require-param-type": "off";
100
+ "jsdoc/require-property-type": "off";
101
+ "jsdoc/require-returns-type": "off";
102
+ "max-classes-per-file": "off";
103
+ "max-lines": "off";
104
+ "max-lines-per-function": "off";
105
+ "max-statements": "off";
106
+ "nextjs/google-font-display": "error";
107
+ "nextjs/google-font-preconnect": "error";
108
+ "nextjs/no-sync-scripts": "error";
109
+ "nextjs/no-unwanted-polyfillio": "error";
110
+ "no-async-await": "off";
111
+ "no-console": "off";
112
+ "no-continue": "off";
113
+ "no-duplicate-imports": ["error", {
114
+ allowSeparateTypeImports: true;
115
+ }];
116
+ "no-inline-comments": "off";
117
+ "no-magic-numbers": "off";
118
+ "no-optional-chaining": "off";
119
+ "no-rest-spread-properties": "off";
120
+ "no-ternary": "off";
121
+ "no-undef": "off";
122
+ "no-undefined": "off";
123
+ "no-use-before-define": "off";
124
+ "no-void": "off";
125
+ "no-warning-comments": "off";
126
+ "node/no-sync": "off";
127
+ "perfectionist/sort-imports": "off";
128
+ "perfectionist/sort-named-imports": "off";
129
+ "prefer-named-capture-group": "off";
130
+ "prefer-readonly-parameter-types": "off";
131
+ "react/jsx-max-depth": "off";
132
+ "sort-imports": ["error", {
133
+ ignoreDeclarationSort: true;
134
+ }];
135
+ "strict-boolean-expressions": "off";
136
+ "typescript/consistent-return": "off";
137
+ "typescript/consistent-type-definitions": ["error", "type"];
138
+ "typescript/explicit-function-return-type": "off";
139
+ "typescript/explicit-module-boundary-types": "off";
140
+ "typescript/no-unsafe-type-assertion": "off";
141
+ "unicorn/filename-case": "off";
142
+ "unicorn/import-style": "off";
143
+ };
144
+ };
145
+ declare const createConfig: (input: Required<Pick<OxlintConfig, "ignorePatterns">>) => OxlintConfig;
146
+ //#endregion
147
+ export { createConfig, config as default };
@@ -0,0 +1,220 @@
1
+ import e18ePlugin from "@e18e/eslint-plugin";
2
+ import { configs } from "eslint-plugin-perfectionist";
3
+ import { defineConfig } from "oxlint";
4
+
5
+ //#region configs/oxlint/index.ts
6
+ const JAVASCRIPT_EXTENSIONS = [
7
+ "js",
8
+ "jsx",
9
+ "cjs",
10
+ "mjs",
11
+ "mjsx"
12
+ ];
13
+ const TYPESCRIPT_EXTENSIONS = [
14
+ "ts",
15
+ "tsx",
16
+ "cts",
17
+ "mts",
18
+ "mtsx"
19
+ ];
20
+ const JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING = [...JAVASCRIPT_EXTENSIONS, ...TYPESCRIPT_EXTENSIONS].join(",");
21
+ const TEST_LIKE_FILES = [`**/{test,test-d}.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`, `**/*.{test,test-d}.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`];
22
+ const config = defineConfig({
23
+ categories: {
24
+ correctness: "error",
25
+ nursery: "error",
26
+ pedantic: "error",
27
+ perf: "error",
28
+ restriction: "error",
29
+ style: "error",
30
+ suspicious: "error"
31
+ },
32
+ jsPlugins: [
33
+ "@e18e/eslint-plugin",
34
+ "@stylistic/eslint-plugin",
35
+ "eslint-plugin-perfectionist"
36
+ ],
37
+ options: {
38
+ denyWarnings: true,
39
+ reportUnusedDisableDirectives: "error",
40
+ respectEslintDisableDirectives: false,
41
+ typeAware: true,
42
+ typeCheck: true
43
+ },
44
+ overrides: [{
45
+ files: TEST_LIKE_FILES,
46
+ plugins: ["vitest"]
47
+ }, {
48
+ files: [
49
+ ...TEST_LIKE_FILES,
50
+ "**/.config/**",
51
+ "**/.configs/**",
52
+ "**/config/**",
53
+ "**/configs/**",
54
+ "**/examples/**",
55
+ "**/scripts/**",
56
+ "**/tools/**",
57
+ `**/config.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
58
+ `**/configs.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
59
+ `**/*.config.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
60
+ `**/*.configs.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
61
+ `**/stories.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
62
+ `**/*.stories.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`
63
+ ],
64
+ rules: {
65
+ "import/no-anonymous-default-export": "off",
66
+ "import/no-default-export": "off"
67
+ }
68
+ }],
69
+ plugins: [
70
+ "eslint",
71
+ "import",
72
+ "jsdoc",
73
+ "jsx-a11y",
74
+ "node",
75
+ "oxc",
76
+ "promise",
77
+ "react",
78
+ "react-perf",
79
+ "typescript",
80
+ "unicorn"
81
+ ],
82
+ rules: {
83
+ ...e18ePlugin.configs.recommended.rules,
84
+ ...configs["recommended-natural"].rules,
85
+ "@stylistic/jsx-pascal-case": "error",
86
+ "@stylistic/jsx-self-closing-comp": "error",
87
+ "@stylistic/lines-between-class-members": "error",
88
+ "@stylistic/multiline-comment-style": "error",
89
+ "@stylistic/padding-line-between-statements": [
90
+ "error",
91
+ {
92
+ blankLine: "always",
93
+ next: "*",
94
+ prev: "*"
95
+ },
96
+ {
97
+ blankLine: "never",
98
+ next: [
99
+ "singleline-const",
100
+ "singleline-let",
101
+ "singleline-var"
102
+ ],
103
+ prev: [
104
+ "singleline-const",
105
+ "singleline-let",
106
+ "singleline-var"
107
+ ]
108
+ },
109
+ {
110
+ blankLine: "never",
111
+ next: ["singleline-export"],
112
+ prev: ["singleline-export"]
113
+ },
114
+ {
115
+ blankLine: "never",
116
+ next: ["cjs-export"],
117
+ prev: ["cjs-export"]
118
+ },
119
+ {
120
+ blankLine: "never",
121
+ next: ["singleline-expression"],
122
+ prev: ["singleline-expression"]
123
+ },
124
+ {
125
+ blankLine: "never",
126
+ next: ["import"],
127
+ prev: ["import"]
128
+ },
129
+ {
130
+ blankLine: "never",
131
+ next: ["cjs-import"],
132
+ prev: ["cjs-import"]
133
+ },
134
+ {
135
+ blankLine: "never",
136
+ next: "directive",
137
+ prev: "directive"
138
+ },
139
+ {
140
+ blankLine: "never",
141
+ next: ["case", "default"],
142
+ prev: ["case", "default"]
143
+ },
144
+ {
145
+ blankLine: "never",
146
+ next: "*",
147
+ prev: ["case", "default"]
148
+ }
149
+ ],
150
+ "@stylistic/quotes": [
151
+ "error",
152
+ "double",
153
+ {
154
+ allowTemplateLiterals: "avoidEscape",
155
+ avoidEscape: true
156
+ }
157
+ ],
158
+ "@stylistic/spaced-comment": "error",
159
+ "array-callback-return": ["error", { allowImplicit: true }],
160
+ "arrow-body-style": ["error", "always"],
161
+ "id-length": "off",
162
+ "import/exports-last": "off",
163
+ "import/group-exports": "off",
164
+ "import/max-dependencies": "off",
165
+ "import/no-dynamic-require": "off",
166
+ "import/no-named-export": "off",
167
+ "import/no-nodejs-modules": "off",
168
+ "import/no-relative-parent-imports": "off",
169
+ "import/prefer-default-export": "off",
170
+ "jsdoc/require-param-type": "off",
171
+ "jsdoc/require-property-type": "off",
172
+ "jsdoc/require-returns-type": "off",
173
+ "max-classes-per-file": "off",
174
+ "max-lines": "off",
175
+ "max-lines-per-function": "off",
176
+ "max-statements": "off",
177
+ "nextjs/google-font-display": "error",
178
+ "nextjs/google-font-preconnect": "error",
179
+ "nextjs/no-sync-scripts": "error",
180
+ "nextjs/no-unwanted-polyfillio": "error",
181
+ "no-async-await": "off",
182
+ "no-console": "off",
183
+ "no-continue": "off",
184
+ "no-duplicate-imports": ["error", { allowSeparateTypeImports: true }],
185
+ "no-inline-comments": "off",
186
+ "no-magic-numbers": "off",
187
+ "no-optional-chaining": "off",
188
+ "no-rest-spread-properties": "off",
189
+ "no-ternary": "off",
190
+ "no-undef": "off",
191
+ "no-undefined": "off",
192
+ "no-use-before-define": "off",
193
+ "no-void": "off",
194
+ "no-warning-comments": "off",
195
+ "node/no-sync": "off",
196
+ "perfectionist/sort-imports": "off",
197
+ "perfectionist/sort-named-imports": "off",
198
+ "prefer-named-capture-group": "off",
199
+ "prefer-readonly-parameter-types": "off",
200
+ "react/jsx-max-depth": "off",
201
+ "sort-imports": ["error", { ignoreDeclarationSort: true }],
202
+ "strict-boolean-expressions": "off",
203
+ "typescript/consistent-return": "off",
204
+ "typescript/consistent-type-definitions": ["error", "type"],
205
+ "typescript/explicit-function-return-type": "off",
206
+ "typescript/explicit-module-boundary-types": "off",
207
+ "typescript/no-unsafe-type-assertion": "off",
208
+ "unicorn/filename-case": "off",
209
+ "unicorn/import-style": "off"
210
+ }
211
+ });
212
+ const createConfig = (input) => {
213
+ return {
214
+ ...config,
215
+ ...input
216
+ };
217
+ };
218
+
219
+ //#endregion
220
+ export { createConfig, config as default };
package/dist/index.js CHANGED
@@ -441,7 +441,7 @@ const PRESERVE_FILES = ["node_modules"];
441
441
 
442
442
  //#endregion
443
443
  //#region package.json
444
- var version = "2.40.0-next-9f3b748";
444
+ var version = "2.40.0-next-f971d11";
445
445
 
446
446
  //#endregion
447
447
  //#region src/commands/create.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adbayb/stack",
3
- "version": "2.40.0-next-9f3b748",
3
+ "version": "2.40.0-next-f971d11",
4
4
  "description": "My opinionated JavaScript-based toolchain",
5
5
  "keywords": [
6
6
  "development",
@@ -34,8 +34,16 @@
34
34
  "source": "./src/index.ts",
35
35
  "default": "./dist/index.js"
36
36
  },
37
- "./oxfmt": "./configs/oxfmt/index.ts",
38
- "./oxlint": "./configs/oxlint/index.ts",
37
+ "./oxfmt": {
38
+ "source": "./configs/oxfmt/index.ts",
39
+ "types": "./dist/configs/oxfmt.d.ts",
40
+ "default": "./dist/configs/oxfmt.js"
41
+ },
42
+ "./oxlint": {
43
+ "source": "./configs/oxlint/index.ts",
44
+ "types": "./dist/configs/oxlint.d.ts",
45
+ "default": "./dist/configs/oxlint.js"
46
+ },
39
47
  "./typescript": "./configs/typescript/index.json"
40
48
  },
41
49
  "publishConfig": {