@cedarjs/cli 3.0.0-canary.13365 → 3.0.0-canary.13367
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/commands/lint.js +14 -17
- package/package.json +11 -11
package/dist/commands/lint.js
CHANGED
|
@@ -58,10 +58,10 @@ function showLegacyEslintDeprecationWarning(legacyFiles) {
|
|
|
58
58
|
console.warn(" See more here: https://github.com/cedarjs/cedar/pull/629");
|
|
59
59
|
console.warn("");
|
|
60
60
|
}
|
|
61
|
-
const command = "lint [
|
|
61
|
+
const command = "lint [paths..]";
|
|
62
62
|
const description = "Lint your files";
|
|
63
63
|
const builder = (yargs) => {
|
|
64
|
-
yargs.positional("
|
|
64
|
+
yargs.positional("paths", {
|
|
65
65
|
description: "Specify file(s) or directory(ies) to lint relative to project root",
|
|
66
66
|
type: "array"
|
|
67
67
|
}).option("fix", {
|
|
@@ -79,7 +79,7 @@ const builder = (yargs) => {
|
|
|
79
79
|
)}`
|
|
80
80
|
);
|
|
81
81
|
};
|
|
82
|
-
const handler = async ({
|
|
82
|
+
const handler = async ({ paths, fix, format }) => {
|
|
83
83
|
recordTelemetryAttributes({ command: "lint", fix, format });
|
|
84
84
|
const config = getConfig();
|
|
85
85
|
const legacyConfigFiles = detectLegacyEslintConfig();
|
|
@@ -87,21 +87,18 @@ const handler = async ({ path: path2, fix, format }) => {
|
|
|
87
87
|
showLegacyEslintDeprecationWarning(legacyConfigFiles);
|
|
88
88
|
}
|
|
89
89
|
try {
|
|
90
|
-
const pathString = path2?.join(" ");
|
|
91
90
|
const sbPath = getPaths().web.storybook;
|
|
92
|
-
const args = [
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
].filter(Boolean);
|
|
104
|
-
const result = await execa("yarn", args, {
|
|
91
|
+
const args = ["eslint", fix && "--fix", "--format", format, ...paths];
|
|
92
|
+
if (paths.length === 0) {
|
|
93
|
+
args.push(
|
|
94
|
+
fs.existsSync(getPaths().web.src) && "web/src",
|
|
95
|
+
fs.existsSync(getPaths().web.config) && "web/config",
|
|
96
|
+
fs.existsSync(sbPath) && "web/.storybook",
|
|
97
|
+
fs.existsSync(getPaths().scripts) && "scripts",
|
|
98
|
+
fs.existsSync(getPaths().api.src) && "api/src"
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
const result = await execa("yarn", args.filter(Boolean), {
|
|
105
102
|
cwd: getPaths().base,
|
|
106
103
|
stdio: "inherit"
|
|
107
104
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "3.0.0-canary.
|
|
3
|
+
"version": "3.0.0-canary.13367+4edbb1ade",
|
|
4
4
|
"description": "The CedarJS Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/preset-typescript": "7.28.5",
|
|
35
35
|
"@babel/runtime-corejs3": "7.29.0",
|
|
36
|
-
"@cedarjs/api-server": "3.0.0-canary.
|
|
37
|
-
"@cedarjs/cli-helpers": "3.0.0-canary.
|
|
38
|
-
"@cedarjs/fastify-web": "3.0.0-canary.
|
|
39
|
-
"@cedarjs/internal": "3.0.0-canary.
|
|
40
|
-
"@cedarjs/prerender": "3.0.0-canary.
|
|
41
|
-
"@cedarjs/project-config": "3.0.0-canary.
|
|
42
|
-
"@cedarjs/structure": "3.0.0-canary.
|
|
43
|
-
"@cedarjs/telemetry": "3.0.0-canary.
|
|
44
|
-
"@cedarjs/web-server": "3.0.0-canary.
|
|
36
|
+
"@cedarjs/api-server": "3.0.0-canary.13367",
|
|
37
|
+
"@cedarjs/cli-helpers": "3.0.0-canary.13367",
|
|
38
|
+
"@cedarjs/fastify-web": "3.0.0-canary.13367",
|
|
39
|
+
"@cedarjs/internal": "3.0.0-canary.13367",
|
|
40
|
+
"@cedarjs/prerender": "3.0.0-canary.13367",
|
|
41
|
+
"@cedarjs/project-config": "3.0.0-canary.13367",
|
|
42
|
+
"@cedarjs/structure": "3.0.0-canary.13367",
|
|
43
|
+
"@cedarjs/telemetry": "3.0.0-canary.13367",
|
|
44
|
+
"@cedarjs/web-server": "3.0.0-canary.13367",
|
|
45
45
|
"@listr2/prompt-adapter-enquirer": "2.0.16",
|
|
46
46
|
"@opentelemetry/api": "1.9.0",
|
|
47
47
|
"@opentelemetry/core": "1.30.1",
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
"publishConfig": {
|
|
105
105
|
"access": "public"
|
|
106
106
|
},
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "4edbb1ade15442a45ce47e6b721ae12d5b5ec8be"
|
|
108
108
|
}
|