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.1.2 to 0.2.0

20

CHANGELOG.json

@@ -5,2 +5,22 @@ {

{
"version": "0.2.0",
"tag": "eslint-plugin-tsdoc_v0.2.0",
"date": "Tue, 19 Nov 2019 22:01:56 GMT",
"comments": {
"minor": [
{
"comment": "Add support for defining your own custom tags using tsdoc.json"
}
],
"dependency": [
{
"comment": "Updating dependency \"@microsoft/tsdoc\" from `0.12.15` to `0.12.16`"
},
{
"comment": "Updating dependency \"@microsoft/tsdoc-config\" from `0.12.15` to `0.12.16`"
}
]
}
},
{
"version": "0.1.2",

@@ -7,0 +27,0 @@ "tag": "eslint-plugin-tsdoc_v0.1.2",

9

CHANGELOG.md
# Change Log - eslint-plugin-tsdoc
This log was last generated on Sat, 09 Nov 2019 05:55:42 GMT and should not be manually modified.
This log was last generated on Tue, 19 Nov 2019 22:01:56 GMT and should not be manually modified.
## 0.2.0
Tue, 19 Nov 2019 22:01:56 GMT
### Minor changes
- Add support for defining your own custom tags using tsdoc.json
## 0.1.2

@@ -6,0 +13,0 @@ Sat, 09 Nov 2019 05:55:42 GMT

60

lib/index.js
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var tsdoc_1 = require("@microsoft/tsdoc");
var messageIds = {};
var tsdoc_config_1 = require("@microsoft/tsdoc-config");
var tsdocMessageIds = {};
var defaultTSDocConfiguration = new tsdoc_1.TSDocConfiguration();
defaultTSDocConfiguration.allTsdocMessageIds.forEach(function (messageId) {
messageIds[messageId] = messageId + ": {{ unformattedText }}";
tsdocMessageIds[messageId] = messageId + ": {{unformattedText}}";
});

@@ -14,3 +26,3 @@ var plugin = {

meta: {
messages: messageIds,
messages: __assign({ "error-loading-config-file": "Error loading TSDoc config file:\n{{details}}", "error-applying-config": "Error applying TSDoc configuration: {{details}}" }, tsdocMessageIds),
type: "problem",

@@ -27,19 +39,27 @@ docs: {

var tsdocConfiguration = new tsdoc_1.TSDocConfiguration();
// Create a lax configuration that allows every standard tag regardless of standardization group
tsdocConfiguration.setSupportForTags(tsdoc_1.StandardTags.allDefinitions, true);
// Also add the three AEDoc tags
tsdocConfiguration.addTagDefinitions([
new tsdoc_1.TSDocTagDefinition({
tagName: '@betaDocumentation',
syntaxKind: tsdoc_1.TSDocTagSyntaxKind.ModifierTag
}),
new tsdoc_1.TSDocTagDefinition({
tagName: '@internalRemarks',
syntaxKind: tsdoc_1.TSDocTagSyntaxKind.BlockTag
}),
new tsdoc_1.TSDocTagDefinition({
tagName: '@preapproved',
syntaxKind: tsdoc_1.TSDocTagSyntaxKind.ModifierTag
})
], true);
var sourceFilePath = context.getFilename();
var tsdocConfigFile = tsdoc_config_1.TSDocConfigFile.loadForFolder(sourceFilePath);
if (!tsdocConfigFile.fileNotFound) {
if (tsdocConfigFile.hasErrors) {
context.report({
loc: { line: 1, column: 1 },
messageId: "error-loading-config-file",
data: {
details: tsdocConfigFile.getErrorSummary()
}
});
}
try {
tsdocConfigFile.configureParser(tsdocConfiguration);
}
catch (e) {
context.report({
loc: { line: 1, column: 1 },
messageId: "error-applying-config",
data: {
details: e.message
}
});
}
}
var tsdocParser = new tsdoc_1.TSDocParser(tsdocConfiguration);

@@ -46,0 +66,0 @@ var sourceCode = context.getSourceCode();

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

@@ -29,3 +29,4 @@ "keywords": [

"dependencies": {
"@microsoft/tsdoc": "0.12.15"
"@microsoft/tsdoc": "0.12.16",
"@microsoft/tsdoc-config": "0.12.16"
},

@@ -36,3 +37,3 @@ "devDependencies": {

"@types/estree": "0.0.39",
"@types/node": "10.7.1",
"@types/node": "10.17.5",
"eslint": "^6.0.0",

@@ -39,0 +40,0 @@ "rimraf": "~2.6.3",

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