@tsslint/cli 0.0.10 → 0.0.12

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/index.js +7 -7
  2. package/package.json +4 -4
package/index.js CHANGED
@@ -72,13 +72,12 @@ const glob = require("glob");
72
72
  process.exit(hasError ? 1 : 0);
73
73
  async function projectWorker(tsconfigOption) {
74
74
  const tsconfig = await getTsconfigPath(tsconfigOption);
75
- log.step(`Project: ${path.relative(process.cwd(), tsconfig)} (${parseCommonLine(tsconfig).fileNames.length} input files)`);
76
- const configFile = ts.findConfigFile(path.dirname(tsconfig), ts.sys.fileExists, 'tsl.config.ts');
75
+ const configFile = ts.findConfigFile(path.dirname(tsconfig), ts.sys.fileExists, 'tsslint.config.ts');
76
+ log.step(`Project: ${path.relative(process.cwd(), tsconfig)}, Config: ${configFile ? path.relative(process.cwd(), configFile) : undefined} (${parseCommonLine(tsconfig).fileNames.length} input files)`);
77
77
  if (!configFile) {
78
- log.error('No tsl.config.ts file found!');
78
+ log.error('No tsslint.config.ts file found!');
79
79
  return;
80
80
  }
81
- log.message(`Config: ${path.relative(process.cwd(), configFile)}`);
82
81
  if (!configs.has(configFile)) {
83
82
  configs.set(configFile, await config.buildConfigFile(configFile, ts.sys.createHash));
84
83
  }
@@ -128,11 +127,12 @@ const glob = require("glob");
128
127
  }
129
128
  const diagnostics = linter.lint(fileName);
130
129
  for (const diagnostic of diagnostics) {
131
- const output = ts.formatDiagnosticsWithColorAndContext([diagnostic], {
130
+ let output = ts.formatDiagnosticsWithColorAndContext([diagnostic], {
132
131
  getCurrentDirectory: ts.sys.getCurrentDirectory,
133
132
  getCanonicalFileName: ts.sys.useCaseSensitiveFileNames ? x => x : x => x.toLowerCase(),
134
133
  getNewLine: () => ts.sys.newLine,
135
134
  });
135
+ output = output.replace(`TS${diagnostic.code}`, `TSSLint(${diagnostic.code})`);
136
136
  if (diagnostic.category === ts.DiagnosticCategory.Error) {
137
137
  log.error(output);
138
138
  }
@@ -161,8 +161,8 @@ const glob = require("glob");
161
161
  shortTsconfig = `./${shortTsconfig}`;
162
162
  }
163
163
  tsconfig = await text({
164
- message: 'Select the tsconfig project. (You can use --project or --projects to skip this prompt.)',
165
- placeholder: shortTsconfig ? `${shortTsconfig} (${parseCommonLine(tsconfig).fileNames.length} input files)` : 'No tsconfig.json found, please enter the path to your tsconfig.json file.',
164
+ message: 'Select the tsconfig project. (Use --project or --projects to skip this prompt.)',
165
+ placeholder: shortTsconfig ? `${shortTsconfig} (${parseCommonLine(tsconfig).fileNames.length} input files)` : 'No tsconfig.json/jsconfig.json found, please enter the path to the tsconfig.json/jsconfig.json file.',
166
166
  defaultValue: shortTsconfig,
167
167
  validate(value) {
168
168
  value ||= shortTsconfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsslint/cli",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "tsslint": "./bin/tsslint.js"
@@ -16,12 +16,12 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@clack/prompts": "^0.7.0",
19
- "@tsslint/config": "0.0.10",
20
- "@tsslint/core": "0.0.10",
19
+ "@tsslint/config": "0.0.12",
20
+ "@tsslint/core": "0.0.12",
21
21
  "glob": "^10.3.10"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "typescript": "*"
25
25
  },
26
- "gitHead": "79b03c8ead69ee6e2e6fbb469012d378a7cf1d31"
26
+ "gitHead": "f6737f340ad02a90054dbdc0514b5c253bb695e7"
27
27
  }