@cedarjs/cli 6.0.0-canary.2777 → 6.0.0-canary.2779

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.
@@ -97,13 +97,11 @@ const handler = async ({
97
97
  {
98
98
  title: "Cleaning up...",
99
99
  task: () => {
100
- runBinSync("eslint", [
101
- "--fix",
102
- "--config",
103
- `${getPaths().base}/node_modules/@cedarjs/eslint-config/shared.js`,
104
- `${getPaths().api.jobsConfig}`,
105
- ...Object.keys(jobFiles)
106
- ]);
100
+ runBinSync(
101
+ "eslint",
102
+ ["--fix", `${getPaths().api.jobsConfig}`, ...Object.keys(jobFiles)],
103
+ { cwd: getPaths().base }
104
+ );
107
105
  }
108
106
  }
109
107
  ],
@@ -407,12 +407,9 @@ const handler = async ({
407
407
  {
408
408
  title: "Cleaning up...",
409
409
  task: () => {
410
- runBinSync("eslint", [
411
- "--fix",
412
- "--config",
413
- `${getPaths().base}/node_modules/@cedarjs/eslint-config/index.js`,
414
- ...Object.keys(packageFiles)
415
- ]);
410
+ runBinSync("eslint", ["--fix", ...Object.keys(packageFiles)], {
411
+ cwd: getPaths().base
412
+ });
416
413
  }
417
414
  }
418
415
  ],
@@ -1,63 +1,8 @@
1
1
  import fs from "node:fs";
2
- import path from "node:path";
3
2
  import { terminalLink } from "termi-link";
4
3
  import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
5
4
  import { runBin } from "@cedarjs/cli-helpers/packageManager/exec";
6
- import { getPaths, getConfig } from "@cedarjs/project-config";
7
- function detectLegacyEslintConfig() {
8
- const projectRoot = getPaths().base;
9
- const legacyConfigFiles = [
10
- ".eslintrc.js",
11
- ".eslintrc.cjs",
12
- ".eslintrc.json",
13
- ".eslintrc.yaml",
14
- ".eslintrc.yml"
15
- ];
16
- const foundLegacyFiles = [];
17
- for (const configFile of legacyConfigFiles) {
18
- if (fs.existsSync(path.join(projectRoot, configFile))) {
19
- foundLegacyFiles.push(configFile);
20
- }
21
- }
22
- const packageJsonPath = path.join(projectRoot, "package.json");
23
- if (fs.existsSync(packageJsonPath)) {
24
- try {
25
- const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
26
- if (packageJson.eslintConfig) {
27
- foundLegacyFiles.push("package.json (eslintConfig field)");
28
- }
29
- if (packageJson.eslint) {
30
- foundLegacyFiles.push("package.json (eslint field)");
31
- }
32
- } catch {
33
- }
34
- }
35
- return foundLegacyFiles;
36
- }
37
- function showLegacyEslintDeprecationWarning(legacyFiles) {
38
- console.warn("");
39
- console.warn("\u26A0\uFE0F DEPRECATION WARNING: Legacy ESLint Configuration Detected");
40
- console.warn("");
41
- console.warn(" The following legacy ESLint configuration files were found:");
42
- legacyFiles.forEach((file) => {
43
- console.warn(` - ${file}`);
44
- });
45
- console.warn("");
46
- console.warn(
47
- " Cedar has migrated to ESLint flat config format. Legacy configurations"
48
- );
49
- console.warn(
50
- " still work but are deprecated and will be removed in a future version."
51
- );
52
- console.warn("");
53
- console.warn(" To migrate to the new format:");
54
- console.warn(" 1. Remove the legacy config file(s) listed above");
55
- console.warn(" 2. Create an eslint.config.mjs");
56
- console.warn(" 3. Use the flat config format with @cedarjs/eslint-config");
57
- console.warn("");
58
- console.warn(" See more here: https://github.com/cedarjs/cedar/pull/629");
59
- console.warn("");
60
- }
5
+ import { getPaths } from "@cedarjs/project-config";
61
6
  const command = "lint [paths..]";
62
7
  const description = "Lint your files";
63
8
  const builder = (yargs) => {
@@ -86,11 +31,6 @@ const handler = async ({
86
31
  format = "stylish"
87
32
  }) => {
88
33
  recordTelemetryAttributes({ command: "lint", fix, format });
89
- const config = getConfig();
90
- const legacyConfigFiles = detectLegacyEslintConfig();
91
- if (legacyConfigFiles.length > 0 && config instanceof Object && "eslintLegacyConfigWarning" in config && config.eslintLegacyConfigWarning) {
92
- showLegacyEslintDeprecationWarning(legacyConfigFiles);
93
- }
94
34
  try {
95
35
  const sbPath = getPaths().web.storybook;
96
36
  const eslintArgs = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/cli",
3
- "version": "6.0.0-canary.2777",
3
+ "version": "6.0.0-canary.2779",
4
4
  "description": "The CedarJS Command Line",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,17 +33,17 @@
33
33
  "dependencies": {
34
34
  "@babel/parser": "7.29.7",
35
35
  "@babel/preset-typescript": "7.29.7",
36
- "@cedarjs/api-server": "6.0.0-canary.2777",
37
- "@cedarjs/cli-helpers": "6.0.0-canary.2777",
38
- "@cedarjs/fastify-web": "6.0.0-canary.2777",
39
- "@cedarjs/internal": "6.0.0-canary.2777",
40
- "@cedarjs/prerender": "6.0.0-canary.2777",
41
- "@cedarjs/project-config": "6.0.0-canary.2777",
42
- "@cedarjs/structure": "6.0.0-canary.2777",
43
- "@cedarjs/telemetry": "6.0.0-canary.2777",
44
- "@cedarjs/utils": "6.0.0-canary.2777",
45
- "@cedarjs/vite": "6.0.0-canary.2777",
46
- "@cedarjs/web-server": "6.0.0-canary.2777",
36
+ "@cedarjs/api-server": "6.0.0-canary.2779",
37
+ "@cedarjs/cli-helpers": "6.0.0-canary.2779",
38
+ "@cedarjs/fastify-web": "6.0.0-canary.2779",
39
+ "@cedarjs/internal": "6.0.0-canary.2779",
40
+ "@cedarjs/prerender": "6.0.0-canary.2779",
41
+ "@cedarjs/project-config": "6.0.0-canary.2779",
42
+ "@cedarjs/structure": "6.0.0-canary.2779",
43
+ "@cedarjs/telemetry": "6.0.0-canary.2779",
44
+ "@cedarjs/utils": "6.0.0-canary.2779",
45
+ "@cedarjs/vite": "6.0.0-canary.2779",
46
+ "@cedarjs/web-server": "6.0.0-canary.2779",
47
47
  "@listr2/prompt-adapter-enquirer": "4.3.0",
48
48
  "@opentelemetry/api": "1.9.1",
49
49
  "@opentelemetry/core": "1.30.1",