eslint-plugin-etc
Advanced tools
Comparing version 1.3.8 to 1.4.0
@@ -0,1 +1,9 @@ | ||
<a name="1.4.0"></a> | ||
## [1.4.0](https://github.com/cartant/eslint-plugin-etc/compare/v1.3.8...v1.4.0) (2021-04-15) | ||
## Features | ||
- Add `underscore-internal` rule. ([540574e](https://github.com/cartant/eslint-plugin-etc/commit/540574e)) | ||
<a name="1.3.8"></a> | ||
@@ -2,0 +10,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getTags = exports.isDeclaration = void 0; | ||
exports.getTagsFromDeclaration = exports.getTags = exports.isDeclaration = void 0; | ||
const tsutils = require("tsutils"); | ||
@@ -101,3 +101,3 @@ const ts = require("typescript"); | ||
} | ||
return getDeprecationsFromDeclarations(tagName, symbol.declarations); | ||
return getTagsFromDeclarations(tagName, symbol.declarations); | ||
} | ||
@@ -113,5 +113,5 @@ function getSignatureTags(tagName, signature) { | ||
? [] | ||
: getDeprecationsFromDeclaration(tagName, signature.declaration); | ||
: getTagsFromDeclaration(tagName, signature.declaration); | ||
} | ||
function getDeprecationsFromDeclarations(tagName, declarations) { | ||
function getTagsFromDeclarations(tagName, declarations) { | ||
if (declarations === undefined) { | ||
@@ -131,3 +131,3 @@ return []; | ||
} | ||
const result = getDeprecationsFromDeclaration(tagName, declaration); | ||
const result = getTagsFromDeclaration(tagName, declaration); | ||
if (result.length > 0) { | ||
@@ -139,3 +139,3 @@ return result; | ||
} | ||
function getDeprecationsFromDeclaration(tagName, declaration) { | ||
function getTagsFromDeclaration(tagName, declaration) { | ||
const result = []; | ||
@@ -154,2 +154,3 @@ for (const comment of tsutils.getJsDoc(declaration)) { | ||
} | ||
exports.getTagsFromDeclaration = getTagsFromDeclaration; | ||
function isFunctionOrMethod(declarations) { | ||
@@ -156,0 +157,0 @@ if (declarations === undefined || declarations.length === 0) { |
@@ -24,3 +24,4 @@ # Avoid commented-out code (`no-commented-out-code`) | ||
// const answer = 54; | ||
// So it won't effect a failure. | ||
// However, the comment - treated as a block - won't parse, so it won't effect | ||
// a failure. | ||
const answer = 42; | ||
@@ -27,0 +28,0 @@ ``` |
@@ -24,3 +24,3 @@ { | ||
"eslint": "^7.0.0", | ||
"husky": "^4.0.0", | ||
"husky": "^6.0.0", | ||
"lint-staged": "^10.1.1", | ||
@@ -42,7 +42,2 @@ "mocha": "^8.0.0", | ||
"homepage": "https://github.com/cartant/eslint-plugin-etc", | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"keywords": [ | ||
@@ -77,2 +72,3 @@ "lint", | ||
"lint": "eslint source/**/*.ts tests/**/*.ts", | ||
"prepare": "husky install", | ||
"prepublishOnly": "yarn run test && yarn run dist", | ||
@@ -84,3 +80,3 @@ "prettier": "prettier --write \"./{src,tests}/**/*.{js,json,ts,tsx}\"", | ||
}, | ||
"version": "1.3.8" | ||
"version": "1.4.0" | ||
} |
@@ -82,1 +82,2 @@ # eslint-plugin-etc | ||
| [`throw-error`](https://github.com/cartant/eslint-plugin-etc/blob/main/docs/rules/throw-error.md) | Forbids throwing - or rejecting with - non-`Error` values. | | | | ||
| [`underscore-internal`](https://github.com/cartant/eslint-plugin-etc/blob/main/docs/rules/underscore-internal.md) | Forbids internal APIs that are not prefixed with underscores. | | | |
84007
36
1370
83