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

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.
@@ -35,6 +35,9 @@ const config = defineConfig({
35
35
  {
36
36
  files: TEST_LIKE_FILES,
37
37
  plugins: ["vitest"],
38
+ rules: {
39
+ "vitest/no-importing-vitest-globals": "off",
40
+ },
38
41
  },
39
42
  {
40
43
  files: [
@@ -145,7 +148,6 @@ const config = defineConfig({
145
148
  { allowTemplateLiterals: "avoidEscape", avoidEscape: true },
146
149
  ],
147
150
  "@stylistic/spaced-comment": "error",
148
- "array-callback-return": ["error", { allowImplicit: true }],
149
151
  "arrow-body-style": ["error", "always"],
150
152
  "id-length": "off",
151
153
  "import/exports-last": "off",
@@ -156,6 +158,7 @@ const config = defineConfig({
156
158
  "import/no-nodejs-modules": "off",
157
159
  "import/no-relative-parent-imports": "off",
158
160
  "import/prefer-default-export": "off",
161
+ "import/unambiguous": "off",
159
162
  "jsdoc/require-param-type": "off",
160
163
  "jsdoc/require-property-type": "off",
161
164
  "jsdoc/require-returns-type": "off",
@@ -186,7 +189,9 @@ const config = defineConfig({
186
189
  "perfectionist/sort-named-imports": "off", // Already supported by eslint/sort-imports
187
190
  "prefer-named-capture-group": "off",
188
191
  "prefer-readonly-parameter-types": "off",
192
+ "react/jsx-filename-extension": ["error", { extensions: ["jsx", "tsx"] }],
189
193
  "react/jsx-max-depth": "off",
194
+ "react/react-in-jsx-scope": "off",
190
195
  "sort-imports": ["error", { ignoreDeclarationSort: true }],
191
196
  "strict-boolean-expressions": "off",
192
197
  "typescript/consistent-return": "off",
@@ -196,6 +201,7 @@ const config = defineConfig({
196
201
  "typescript/no-unsafe-type-assertion": "off",
197
202
  "unicorn/filename-case": "off",
198
203
  "unicorn/import-style": "off",
204
+ "unicorn/no-useless-undefined": "off",
199
205
  },
200
206
  });
201
207
 
@@ -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,155 @@
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: {
26
+ "vitest/no-importing-vitest-globals": "off";
27
+ "import/no-anonymous-default-export"?: never;
28
+ "import/no-default-export"?: never;
29
+ };
30
+ } | {
31
+ files: string[];
32
+ rules: {
33
+ "import/no-anonymous-default-export": "off";
34
+ "import/no-default-export": "off";
35
+ "vitest/no-importing-vitest-globals"?: never;
36
+ };
37
+ plugins?: never;
38
+ })[];
39
+ plugins: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jsx-a11y" | "react-perf" | "promise" | "node")[];
40
+ rules: {
41
+ "@stylistic/jsx-pascal-case": "error";
42
+ "@stylistic/jsx-self-closing-comp": "error";
43
+ "@stylistic/lines-between-class-members": "error";
44
+ "@stylistic/multiline-comment-style": "error";
45
+ "@stylistic/padding-line-between-statements": ["error", {
46
+ blankLine: string;
47
+ next: string;
48
+ prev: string;
49
+ }, {
50
+ blankLine: string;
51
+ next: string[];
52
+ prev: string[];
53
+ }, {
54
+ blankLine: string;
55
+ next: string[];
56
+ prev: string[];
57
+ }, {
58
+ blankLine: string;
59
+ next: string[];
60
+ prev: string[];
61
+ }, {
62
+ blankLine: string;
63
+ next: string[];
64
+ prev: string[];
65
+ }, {
66
+ blankLine: string;
67
+ next: string[];
68
+ prev: string[];
69
+ }, {
70
+ blankLine: string;
71
+ next: string[];
72
+ prev: string[];
73
+ }, {
74
+ blankLine: string;
75
+ next: string;
76
+ prev: string;
77
+ }, {
78
+ blankLine: string;
79
+ next: string[];
80
+ prev: string[];
81
+ }, {
82
+ blankLine: string;
83
+ next: string;
84
+ prev: string[];
85
+ }];
86
+ "@stylistic/quotes": ["error", string, {
87
+ allowTemplateLiterals: string;
88
+ avoidEscape: boolean;
89
+ }];
90
+ "@stylistic/spaced-comment": "error";
91
+ "arrow-body-style": ["error", "always"];
92
+ "id-length": "off";
93
+ "import/exports-last": "off";
94
+ "import/group-exports": "off";
95
+ "import/max-dependencies": "off";
96
+ "import/no-dynamic-require": "off";
97
+ "import/no-named-export": "off";
98
+ "import/no-nodejs-modules": "off";
99
+ "import/no-relative-parent-imports": "off";
100
+ "import/prefer-default-export": "off";
101
+ "import/unambiguous": "off";
102
+ "jsdoc/require-param-type": "off";
103
+ "jsdoc/require-property-type": "off";
104
+ "jsdoc/require-returns-type": "off";
105
+ "max-classes-per-file": "off";
106
+ "max-lines": "off";
107
+ "max-lines-per-function": "off";
108
+ "max-statements": "off";
109
+ "nextjs/google-font-display": "error";
110
+ "nextjs/google-font-preconnect": "error";
111
+ "nextjs/no-sync-scripts": "error";
112
+ "nextjs/no-unwanted-polyfillio": "error";
113
+ "no-async-await": "off";
114
+ "no-console": "off";
115
+ "no-continue": "off";
116
+ "no-duplicate-imports": ["error", {
117
+ allowSeparateTypeImports: true;
118
+ }];
119
+ "no-inline-comments": "off";
120
+ "no-magic-numbers": "off";
121
+ "no-optional-chaining": "off";
122
+ "no-rest-spread-properties": "off";
123
+ "no-ternary": "off";
124
+ "no-undef": "off";
125
+ "no-undefined": "off";
126
+ "no-use-before-define": "off";
127
+ "no-void": "off";
128
+ "no-warning-comments": "off";
129
+ "node/no-sync": "off";
130
+ "perfectionist/sort-imports": "off";
131
+ "perfectionist/sort-named-imports": "off";
132
+ "prefer-named-capture-group": "off";
133
+ "prefer-readonly-parameter-types": "off";
134
+ "react/jsx-filename-extension": ["error", {
135
+ extensions: string[];
136
+ }];
137
+ "react/jsx-max-depth": "off";
138
+ "react/react-in-jsx-scope": "off";
139
+ "sort-imports": ["error", {
140
+ ignoreDeclarationSort: true;
141
+ }];
142
+ "strict-boolean-expressions": "off";
143
+ "typescript/consistent-return": "off";
144
+ "typescript/consistent-type-definitions": ["error", "type"];
145
+ "typescript/explicit-function-return-type": "off";
146
+ "typescript/explicit-module-boundary-types": "off";
147
+ "typescript/no-unsafe-type-assertion": "off";
148
+ "unicorn/filename-case": "off";
149
+ "unicorn/import-style": "off";
150
+ "unicorn/no-useless-undefined": "off";
151
+ };
152
+ };
153
+ declare const createConfig: (input: Required<Pick<OxlintConfig, "ignorePatterns">>) => OxlintConfig;
154
+ //#endregion
155
+ export { createConfig, config as default };
@@ -0,0 +1,224 @@
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
+ rules: { "vitest/no-importing-vitest-globals": "off" }
48
+ }, {
49
+ files: [
50
+ ...TEST_LIKE_FILES,
51
+ "**/.config/**",
52
+ "**/.configs/**",
53
+ "**/config/**",
54
+ "**/configs/**",
55
+ "**/examples/**",
56
+ "**/scripts/**",
57
+ "**/tools/**",
58
+ `**/config.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
59
+ `**/configs.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
60
+ `**/*.config.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
61
+ `**/*.configs.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
62
+ `**/stories.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
63
+ `**/*.stories.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`
64
+ ],
65
+ rules: {
66
+ "import/no-anonymous-default-export": "off",
67
+ "import/no-default-export": "off"
68
+ }
69
+ }],
70
+ plugins: [
71
+ "eslint",
72
+ "import",
73
+ "jsdoc",
74
+ "jsx-a11y",
75
+ "node",
76
+ "oxc",
77
+ "promise",
78
+ "react",
79
+ "react-perf",
80
+ "typescript",
81
+ "unicorn"
82
+ ],
83
+ rules: {
84
+ ...e18ePlugin.configs.recommended.rules,
85
+ ...configs["recommended-natural"].rules,
86
+ "@stylistic/jsx-pascal-case": "error",
87
+ "@stylistic/jsx-self-closing-comp": "error",
88
+ "@stylistic/lines-between-class-members": "error",
89
+ "@stylistic/multiline-comment-style": "error",
90
+ "@stylistic/padding-line-between-statements": [
91
+ "error",
92
+ {
93
+ blankLine: "always",
94
+ next: "*",
95
+ prev: "*"
96
+ },
97
+ {
98
+ blankLine: "never",
99
+ next: [
100
+ "singleline-const",
101
+ "singleline-let",
102
+ "singleline-var"
103
+ ],
104
+ prev: [
105
+ "singleline-const",
106
+ "singleline-let",
107
+ "singleline-var"
108
+ ]
109
+ },
110
+ {
111
+ blankLine: "never",
112
+ next: ["singleline-export"],
113
+ prev: ["singleline-export"]
114
+ },
115
+ {
116
+ blankLine: "never",
117
+ next: ["cjs-export"],
118
+ prev: ["cjs-export"]
119
+ },
120
+ {
121
+ blankLine: "never",
122
+ next: ["singleline-expression"],
123
+ prev: ["singleline-expression"]
124
+ },
125
+ {
126
+ blankLine: "never",
127
+ next: ["import"],
128
+ prev: ["import"]
129
+ },
130
+ {
131
+ blankLine: "never",
132
+ next: ["cjs-import"],
133
+ prev: ["cjs-import"]
134
+ },
135
+ {
136
+ blankLine: "never",
137
+ next: "directive",
138
+ prev: "directive"
139
+ },
140
+ {
141
+ blankLine: "never",
142
+ next: ["case", "default"],
143
+ prev: ["case", "default"]
144
+ },
145
+ {
146
+ blankLine: "never",
147
+ next: "*",
148
+ prev: ["case", "default"]
149
+ }
150
+ ],
151
+ "@stylistic/quotes": [
152
+ "error",
153
+ "double",
154
+ {
155
+ allowTemplateLiterals: "avoidEscape",
156
+ avoidEscape: true
157
+ }
158
+ ],
159
+ "@stylistic/spaced-comment": "error",
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
+ "import/unambiguous": "off",
171
+ "jsdoc/require-param-type": "off",
172
+ "jsdoc/require-property-type": "off",
173
+ "jsdoc/require-returns-type": "off",
174
+ "max-classes-per-file": "off",
175
+ "max-lines": "off",
176
+ "max-lines-per-function": "off",
177
+ "max-statements": "off",
178
+ "nextjs/google-font-display": "error",
179
+ "nextjs/google-font-preconnect": "error",
180
+ "nextjs/no-sync-scripts": "error",
181
+ "nextjs/no-unwanted-polyfillio": "error",
182
+ "no-async-await": "off",
183
+ "no-console": "off",
184
+ "no-continue": "off",
185
+ "no-duplicate-imports": ["error", { allowSeparateTypeImports: true }],
186
+ "no-inline-comments": "off",
187
+ "no-magic-numbers": "off",
188
+ "no-optional-chaining": "off",
189
+ "no-rest-spread-properties": "off",
190
+ "no-ternary": "off",
191
+ "no-undef": "off",
192
+ "no-undefined": "off",
193
+ "no-use-before-define": "off",
194
+ "no-void": "off",
195
+ "no-warning-comments": "off",
196
+ "node/no-sync": "off",
197
+ "perfectionist/sort-imports": "off",
198
+ "perfectionist/sort-named-imports": "off",
199
+ "prefer-named-capture-group": "off",
200
+ "prefer-readonly-parameter-types": "off",
201
+ "react/jsx-filename-extension": ["error", { extensions: ["jsx", "tsx"] }],
202
+ "react/jsx-max-depth": "off",
203
+ "react/react-in-jsx-scope": "off",
204
+ "sort-imports": ["error", { ignoreDeclarationSort: true }],
205
+ "strict-boolean-expressions": "off",
206
+ "typescript/consistent-return": "off",
207
+ "typescript/consistent-type-definitions": ["error", "type"],
208
+ "typescript/explicit-function-return-type": "off",
209
+ "typescript/explicit-module-boundary-types": "off",
210
+ "typescript/no-unsafe-type-assertion": "off",
211
+ "unicorn/filename-case": "off",
212
+ "unicorn/import-style": "off",
213
+ "unicorn/no-useless-undefined": "off"
214
+ }
215
+ });
216
+ const createConfig = (input) => {
217
+ return {
218
+ ...config,
219
+ ...input
220
+ };
221
+ };
222
+
223
+ //#endregion
224
+ 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-bfbc2eb";
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-bfbc2eb",
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": {