Socket
Socket
Sign inDemoInstall

@blitz/eslint-plugin

Package Overview
Dependencies
136
Maintainers
11
Versions
44
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.34 to 0.0.35

1

dist/rules/block-scope-case.js

@@ -12,3 +12,2 @@ "use strict";

docs: {
category: 'Best Practices',
description: 'Ensures all case statements are block scoped',

@@ -15,0 +14,0 @@ recommended: 'error',

@@ -18,3 +18,2 @@ "use strict";

docs: {
category: 'Best Practices',
description: 'Enforce a specific parameter name in catch clauses',

@@ -21,0 +20,0 @@ recommended: 'error',

@@ -56,3 +56,2 @@ "use strict";

docs: {
category: 'Best Practices',
description: (0, messages_1.oneLine) `Enforce block comments to start with a capital first letter and end with a dot and

@@ -59,0 +58,0 @@ line comments to not start with a capital first letter and no dot

36

dist/rules/lines-around-comment.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultOptions = exports.ruleName = void 0;
const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
const lines_around_comment_1 = __importDefault(require("eslint/lib/rules/lines-around-comment"));
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
exports.ruleName = 'lines-around-comment';
const baseRule = utils_1.ESLintUtils.nullThrows(require('eslint/use-at-your-own-risk').builtinRules.get(exports.ruleName), '');
exports.defaultOptions = {

@@ -40,3 +37,2 @@ beforeBlockComment: true,

description: 'Require empty lines around comments',
category: 'Stylistic Issues',
recommended: false,

@@ -137,4 +133,4 @@ extendsBaseRule: true,

],
fixable: lines_around_comment_1.default.meta.fixable,
messages: lines_around_comment_1.default.meta.messages,
fixable: baseRule.meta.fixable,
messages: baseRule.meta.messages,
},

@@ -162,3 +158,3 @@ defaultOptions: [exports.defaultOptions],

}
return node.type === experimental_utils_1.AST_NODE_TYPES.MemberExpression && node.object.type === objectType;
return node.type === utils_1.AST_NODE_TYPES.MemberExpression && node.object.type === objectType;
}

@@ -174,3 +170,3 @@ const allowSwitchStart = options === null || options === void 0 ? void 0 : options.allowSwitchStart;

const allowMemberCallExpression = options === null || options === void 0 ? void 0 : options.allowMemberCallExpression;
const rules = lines_around_comment_1.default.create(Object.create(context, {
const rules = baseRule.create(Object.create(context, {
report: {

@@ -181,12 +177,12 @@ enumerable: true,

if ((parentNode && parentNode.type === 'CallExpression') ||
(isCommentAtParentStart(descriptor.node, experimental_utils_1.AST_NODE_TYPES.SwitchStatement) && allowSwitchStart) ||
(isCommentAtParentEnd(descriptor.node, experimental_utils_1.AST_NODE_TYPES.SwitchStatement) && allowSwitchEnd) ||
(isCommentAtParentStart(descriptor.node, experimental_utils_1.AST_NODE_TYPES.TSEnumDeclaration) && allowEnumStart) ||
(isCommentAtParentEnd(descriptor.node, experimental_utils_1.AST_NODE_TYPES.TSEnumDeclaration) && allowEnumEnd) ||
(isCommentAtParentStart(descriptor.node, experimental_utils_1.AST_NODE_TYPES.TSInterfaceBody) && allowInterfaceStart) ||
(isCommentAtParentEnd(descriptor.node, experimental_utils_1.AST_NODE_TYPES.TSInterfaceBody) && allowInterfaceEnd) ||
(isCommentAtParentStart(descriptor.node, experimental_utils_1.AST_NODE_TYPES.TSTypeLiteral) && allowObjectStart) ||
(isCommentAtParentEnd(descriptor.node, experimental_utils_1.AST_NODE_TYPES.TSTypeLiteral) && allowObjectEnd) ||
((isMemberExpression(parentNode, experimental_utils_1.AST_NODE_TYPES.CallExpression) ||
isMemberExpression(parentNode, experimental_utils_1.AST_NODE_TYPES.Identifier)) &&
(isCommentAtParentStart(descriptor.node, utils_1.AST_NODE_TYPES.SwitchStatement) && allowSwitchStart) ||
(isCommentAtParentEnd(descriptor.node, utils_1.AST_NODE_TYPES.SwitchStatement) && allowSwitchEnd) ||
(isCommentAtParentStart(descriptor.node, utils_1.AST_NODE_TYPES.TSEnumDeclaration) && allowEnumStart) ||
(isCommentAtParentEnd(descriptor.node, utils_1.AST_NODE_TYPES.TSEnumDeclaration) && allowEnumEnd) ||
(isCommentAtParentStart(descriptor.node, utils_1.AST_NODE_TYPES.TSInterfaceBody) && allowInterfaceStart) ||
(isCommentAtParentEnd(descriptor.node, utils_1.AST_NODE_TYPES.TSInterfaceBody) && allowInterfaceEnd) ||
(isCommentAtParentStart(descriptor.node, utils_1.AST_NODE_TYPES.TSTypeLiteral) && allowObjectStart) ||
(isCommentAtParentEnd(descriptor.node, utils_1.AST_NODE_TYPES.TSTypeLiteral) && allowObjectEnd) ||
((isMemberExpression(parentNode, utils_1.AST_NODE_TYPES.CallExpression) ||
isMemberExpression(parentNode, utils_1.AST_NODE_TYPES.Identifier)) &&
allowMemberCallExpression)) {

@@ -193,0 +189,0 @@ return;

@@ -13,3 +13,2 @@ "use strict";

docs: {
category: 'Stylistic Issues',
description: (0, common_tags_1.oneLine) `

@@ -21,2 +20,3 @@ Require an empty line before 'return' statements, only for block statemenet with more than 2 nodes

fixable: 'whitespace',
hasSuggestions: true,
schema: [

@@ -23,0 +23,0 @@ {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createRule = void 0;
const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
const utils_1 = require("@typescript-eslint/utils");
const version = require('../../package.json').version;
exports.createRule = experimental_utils_1.ESLintUtils.RuleCreator((name) => {
exports.createRule = utils_1.ESLintUtils.RuleCreator((name) => {
return `https://github.com/stackblitz/eslint-plugin/blob/v${version}/docs/rules/${name}.md`;
});
//# sourceMappingURL=index.js.map
{
"name": "@blitz/eslint-plugin",
"version": "0.0.34",
"version": "0.0.35",
"description": "An ESLint config to enforce a consistent code styles across StackBlitz projects",

@@ -28,6 +28,6 @@ "keywords": [

"@typescript-eslint/eslint-plugin": "5.14.0",
"@typescript-eslint/experimental-utils": "^4.20.0",
"@typescript-eslint/parser": "^5.14.0",
"@typescript-eslint/utils": "^5.14.0",
"common-tags": "^1.8.0",
"eslint": "^7.32.0",
"eslint": "^8.11.0",
"eslint-config-prettier": "^8.5.0",

@@ -42,4 +42,5 @@ "eslint-plugin-prettier": "^4.0.0"

"@types/node": "^14.6.0",
"eslint-etc": "^4.0.4",
"eslint-etc": "^5.1.0",
"jest": "^27.5.1",
"jest-node-exports-resolver": "^1.1.5",
"prettier": "^2.5.1",

@@ -46,0 +47,0 @@ "ts-jest": "^27.1.3",

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

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc