Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-tsdoc

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-tsdoc - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

CHANGELOG.json

3

lib/ConfigCache.d.ts
import { TSDocConfigFile } from '@microsoft/tsdoc-config';
export declare class ConfigCache {
private static _cachedConfigs;
private static _cachedPaths;
/**

@@ -8,4 +9,4 @@ * Node.js equivalent of performance.now().

private static _getTimeInMs;
static getForSourceFile(sourceFilePath: string): TSDocConfigFile;
static getForSourceFile(sourceFilePath: string, tsConfigRootDir?: string | undefined): TSDocConfigFile;
}
//# sourceMappingURL=ConfigCache.d.ts.map

@@ -48,6 +48,9 @@ "use strict";

}
static getForSourceFile(sourceFilePath) {
static getForSourceFile(sourceFilePath, tsConfigRootDir) {
const sourceFileFolder = path.dirname(path.resolve(sourceFilePath));
// First, determine the file to be loaded. If not found, the configFilePath will be an empty string.
const configFilePath = tsdoc_config_1.TSDocConfigFile.findConfigPathForFolder(sourceFileFolder);
// If the eslint config has specified where the tsconfig file is, use that path directly without probing the filesystem.
const configFilePath = tsConfigRootDir
? path.join(tsConfigRootDir, tsdoc_config_1.TSDocConfigFile.FILENAME)
: tsdoc_config_1.TSDocConfigFile.findConfigPathForFolder(sourceFileFolder);
// If configFilePath is an empty string, then we'll use the folder of sourceFilePath as our cache key

@@ -108,2 +111,3 @@ // (instead of an empty string)

ConfigCache._cachedConfigs = new Map();
ConfigCache._cachedPaths = new Map();
//# sourceMappingURL=ConfigCache.js.map

@@ -29,7 +29,10 @@ "use strict";

create: (context) => {
const sourceFilePath = context.getFilename();
const sourceFilePath = context.filename;
// If eslint is configured with @typescript-eslint/parser, there is a parser option
// to explicitly specify where the tsconfig file is. Use that if available.
const tsConfigDir = context.parserOptions.tsconfigRootDir;
Debug_1.Debug.log(`Linting: "${sourceFilePath}"`);
const tsdocConfiguration = new tsdoc_1.TSDocConfiguration();
try {
const tsdocConfigFile = ConfigCache_1.ConfigCache.getForSourceFile(sourceFilePath);
const tsdocConfigFile = ConfigCache_1.ConfigCache.getForSourceFile(sourceFilePath, tsConfigDir);
if (!tsdocConfigFile.fileNotFound) {

@@ -36,0 +39,0 @@ if (tsdocConfigFile.hasErrors) {

{
"name": "eslint-plugin-tsdoc",
"version": "0.3.0",
"version": "0.4.0",
"description": "An ESLint plugin that validates TypeScript doc comments",

@@ -25,4 +25,4 @@ "keywords": [

"dependencies": {
"@microsoft/tsdoc": "0.15.0",
"@microsoft/tsdoc-config": "0.17.0"
"@microsoft/tsdoc": "0.15.1",
"@microsoft/tsdoc-config": "0.17.1"
},

@@ -29,0 +29,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc