@infernodesign/eslint-config 1.2.3 → 1.2.4
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/cli.js +16 -16
- package/package.json +1 -2
package/dist/cli.js
CHANGED
|
@@ -9,7 +9,7 @@ import parse from "parse-gitignore";
|
|
|
9
9
|
import { execSync } from "node:child_process";
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "1.2.
|
|
12
|
+
var version = "1.2.4";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/cli/constants.ts
|
|
@@ -121,9 +121,9 @@ const dependenciesMap = {
|
|
|
121
121
|
//#region src/cli/utils.ts
|
|
122
122
|
function getEslintConfigContent(mainConfig, additionalConfigs) {
|
|
123
123
|
return `
|
|
124
|
-
import
|
|
124
|
+
import { inferno } from '@infernodesign/eslint-config'
|
|
125
125
|
|
|
126
|
-
export default
|
|
126
|
+
export default inferno({
|
|
127
127
|
${mainConfig}
|
|
128
128
|
}${additionalConfigs?.map((config) => `,{\n${config}\n}`)})
|
|
129
129
|
`.trimStart();
|
|
@@ -268,11 +268,14 @@ async function run(options = {}) {
|
|
|
268
268
|
};
|
|
269
269
|
if (!argSkipPrompt) {
|
|
270
270
|
result = await p.group({
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
271
|
+
extra: ({ results }) => {
|
|
272
|
+
const isArgExtraValid = argExtra?.length && !argExtra.filter((element) => !extra.includes(element)).length;
|
|
273
|
+
if (!results.uncommittedConfirmed || isArgExtraValid) return;
|
|
274
|
+
const message = !isArgExtraValid && argExtra ? `"${argExtra}" isn't a valid extra util. Please choose from below: ` : "Select a extra utils:";
|
|
275
|
+
return p.multiselect({
|
|
276
|
+
message: c.reset(message),
|
|
277
|
+
options: extraOptions,
|
|
278
|
+
required: false
|
|
276
279
|
});
|
|
277
280
|
},
|
|
278
281
|
frameworks: ({ results }) => {
|
|
@@ -285,14 +288,11 @@ async function run(options = {}) {
|
|
|
285
288
|
required: false
|
|
286
289
|
});
|
|
287
290
|
},
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
message: c.reset(message),
|
|
294
|
-
options: extraOptions,
|
|
295
|
-
required: false
|
|
291
|
+
uncommittedConfirmed: () => {
|
|
292
|
+
if (argSkipPrompt || isGitClean()) return Promise.resolve(true);
|
|
293
|
+
return p.confirm({
|
|
294
|
+
initialValue: false,
|
|
295
|
+
message: "There are uncommitted changes in the current repository, are you sure to continue?"
|
|
296
296
|
});
|
|
297
297
|
},
|
|
298
298
|
updateVscodeSettings: ({ results }) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infernodesign/eslint-config",
|
|
3
3
|
"description": "ESLint config for Inferno Design.",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Inferno Design <support@infernodesign.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -81,7 +81,6 @@
|
|
|
81
81
|
"@types/node": "^24.7.2",
|
|
82
82
|
"@unocss/eslint-plugin": "^66.5.3",
|
|
83
83
|
"astro-eslint-parser": "^1.2.2",
|
|
84
|
-
"bumpp": "^10.3.1",
|
|
85
84
|
"eslint": "^9.37.0",
|
|
86
85
|
"eslint-plugin-astro": "^1.3.1",
|
|
87
86
|
"eslint-plugin-format": "^1.0.2",
|