@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.
Files changed (2) hide show
  1. package/dist/commands/lint.js +14 -17
  2. package/package.json +11 -11
@@ -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 [path..]";
61
+ const command = "lint [paths..]";
62
62
  const description = "Lint your files";
63
63
  const builder = (yargs) => {
64
- yargs.positional("path", {
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 ({ path: path2, fix, format }) => {
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
- "eslint",
94
- fix && "--fix",
95
- "--format",
96
- format,
97
- !pathString && fs.existsSync(getPaths().web.src) && "web/src",
98
- !pathString && fs.existsSync(getPaths().web.config) && "web/config",
99
- !pathString && fs.existsSync(sbPath) && "web/.storybook",
100
- !pathString && fs.existsSync(getPaths().scripts) && "scripts",
101
- !pathString && fs.existsSync(getPaths().api.src) && "api/src",
102
- pathString
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.13365+ebf1df2c0",
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.13365",
37
- "@cedarjs/cli-helpers": "3.0.0-canary.13365",
38
- "@cedarjs/fastify-web": "3.0.0-canary.13365",
39
- "@cedarjs/internal": "3.0.0-canary.13365",
40
- "@cedarjs/prerender": "3.0.0-canary.13365",
41
- "@cedarjs/project-config": "3.0.0-canary.13365",
42
- "@cedarjs/structure": "3.0.0-canary.13365",
43
- "@cedarjs/telemetry": "3.0.0-canary.13365",
44
- "@cedarjs/web-server": "3.0.0-canary.13365",
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": "ebf1df2c0f03f8188fa6c53509d2f338aa0c04de"
107
+ "gitHead": "4edbb1ade15442a45ce47e6b721ae12d5b5ec8be"
108
108
  }