@travetto/eslint 4.0.0-rc.0 → 4.0.0-rc.1

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/README.md CHANGED
@@ -83,9 +83,9 @@ import { Program, BaseExpression, Expression } from 'estree';
83
83
  import type { TrvEslintPlugin } from '@travetto/eslint';
84
84
 
85
85
  const groupTypeMap = {
86
- node: ['node', 'travetto', 'local'],
87
- travetto: ['travetto', 'local'],
88
- local: ['local'],
86
+ node: ['node', 'travetto', 'workspace'],
87
+ travetto: ['travetto', 'workspace'],
88
+ workspace: ['workspace'],
89
89
  };
90
90
 
91
91
  interface TSAsExpression extends BaseExpression {
@@ -143,9 +143,9 @@ export const ImportOrder: TrvEslintPlugin = {
143
143
  continue;
144
144
  }
145
145
 
146
- const lineType: typeof groupType = /^@travetto/.test(from) ? 'travetto' : /^[^.]/.test(from) ? 'node' : 'local';
146
+ const lineType: typeof groupType = /^@travetto/.test(from) ? 'travetto' : /^[^.]/.test(from) ? 'node' : 'workspace';
147
147
 
148
- if (/module\/[^/]+\/doc\//.test(context.getFilename()) && lineType === 'local' && from.startsWith('..')) {
148
+ if (/module\/[^/]+\/doc\//.test(context.getFilename()) && lineType === 'workspace' && from.startsWith('..')) {
149
149
  context.report({ message: 'Doc does not support parent imports', node });
150
150
  }
151
151
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/eslint",
3
- "version": "4.0.0-rc.0",
3
+ "version": "4.0.0-rc.1",
4
4
  "description": "ES Linting Rules",
5
5
  "keywords": [
6
6
  "eslint",
@@ -24,17 +24,17 @@
24
24
  "directory": "module/eslint"
25
25
  },
26
26
  "dependencies": {
27
- "@eslint/js": "^8.52.0",
28
- "@travetto/manifest": "^4.0.0-rc.0",
29
- "@types/eslint": "^8.44.8",
27
+ "@eslint/js": "^8.56.0",
28
+ "@travetto/manifest": "^4.0.0-rc.1",
29
+ "@types/eslint": "^8.56.2",
30
30
  "@types/eslint__js": "^8.42.3",
31
- "@typescript-eslint/eslint-plugin": "^6.13.2",
32
- "@typescript-eslint/parser": "^6.13.2",
33
- "eslint": "^8.55.0",
31
+ "@typescript-eslint/eslint-plugin": "^6.20.0",
32
+ "@typescript-eslint/parser": "^6.20.0",
33
+ "eslint": "^8.56.0",
34
34
  "eslint-plugin-unused-imports": "^3.0.0"
35
35
  },
36
36
  "peerDependencies": {
37
- "@travetto/cli": "^4.0.0-rc.0"
37
+ "@travetto/cli": "^4.0.0-rc.1"
38
38
  },
39
39
  "peerDependenciesMeta": {
40
40
  "@travetto/cli": {
@@ -1,3 +1,5 @@
1
+ import { spawn } from 'node:child_process';
2
+
1
3
  import { RuntimeContext } from '@travetto/manifest';
2
4
  import { Env, ExecUtil } from '@travetto/base';
3
5
  import { CliCommandShape, CliCommand, CliModuleUtil, CliScmUtil } from '@travetto/cli';
@@ -28,19 +30,19 @@ export class LintCommand implements CliCommandShape {
28
30
  .filter(x => !x.endsWith('package.json') && !x.endsWith('package-lock.json'));
29
31
  } else {
30
32
  const mods = await CliModuleUtil.findModules(this.changed ? 'changed' : 'all');
31
- files = mods.filter(x => x.local).map(x => x.sourcePath);
33
+ files = mods.filter(x => x.workspace).map(x => x.sourcePath);
32
34
  }
33
35
 
34
36
 
35
- const res = await ExecUtil.spawn('npx', [
37
+ const res = await ExecUtil.getResult(spawn('npx', [
36
38
  'eslint',
37
39
  ...(this.format ? ['--format', this.format] : []),
38
40
  ...files
39
41
  ], {
40
42
  cwd: RuntimeContext.workspace.path,
41
43
  stdio: 'inherit',
42
- catchAsResult: true
43
- }).result;
44
+ shell: false
45
+ }), { catch: true });
44
46
 
45
47
  process.exitCode = res.code;
46
48
  }