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

eslint-codemod-utils

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-codemod-utils - npm Package Compare versions

Comparing version 1.8.2 to 1.8.3

4

dist/cjs/__tests__/ts-node.test.js

@@ -57,2 +57,6 @@ "use strict";

});
test('parsed keyword assertions', () => {
const { body } = espree.parse(`"10" as any as unknown as null as boolean`, ESPREE_OPTIONS);
expect((0, __1.node)(body[0]).toString()).eq(`"10" as any as unknown as null as boolean`);
});
});

@@ -116,2 +116,5 @@ "use strict";

TSAnyKeyword: ts_nodes_1.tsAnyKeyword,
TSUnknownKeyword: ts_nodes_1.tsUnknownKeyword,
TSBooleanKeyword: ts_nodes_1.tsBooleanKeyword,
TSReadonlyKeyword: ts_nodes_1.tsReadonlyKeyword,
TSNullKeyword: ts_nodes_1.tsNullKeyword,

@@ -118,0 +121,0 @@ TSQualifiedName: ts_nodes_1.tsQualifiedName,

@@ -65,2 +65,5 @@ import { TSESTree } from '@typescript-eslint/types';

export declare const tsNullKeyword: StringableASTNodeFn<TSESTree.TSNullKeyword>;
export declare const tsUnknownKeyword: StringableASTNodeFn<TSESTree.TSUnknownKeyword>;
export declare const tsBooleanKeyword: StringableASTNodeFn<TSESTree.TSBooleanKeyword>;
export declare const tsReadonlyKeyword: StringableASTNodeFn<TSESTree.TSReadonlyKeyword>;
export declare const tsEmptyBodyFunctionExpression: StringableASTNodeFn<TSESTree.TSEmptyBodyFunctionExpression>;

@@ -67,0 +70,0 @@ export declare const tsQualifiedName: StringableASTNodeFn<TSESTree.TSQualifiedName>;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.tsNonNullExpression = exports.tsLiteralType = exports.tsTypeParameterInstantiation = exports.tsQualifiedName = exports.tsEmptyBodyFunctionExpression = exports.tsNullKeyword = exports.tsTypeReference = exports.tsAnyKeyword = exports.tsStringKeyword = exports.tsAsExpression = void 0;
exports.tsNonNullExpression = exports.tsLiteralType = exports.tsTypeParameterInstantiation = exports.tsQualifiedName = exports.tsEmptyBodyFunctionExpression = exports.tsReadonlyKeyword = exports.tsBooleanKeyword = exports.tsUnknownKeyword = exports.tsNullKeyword = exports.tsTypeReference = exports.tsAnyKeyword = exports.tsStringKeyword = exports.tsAsExpression = void 0;
const types_1 = require("@typescript-eslint/types");

@@ -107,2 +107,26 @@ const node_1 = require("./utils/node");

exports.tsNullKeyword = tsNullKeyword;
const tsUnknownKeyword = ({ ...other }) => {
return {
...other,
type: types_1.AST_NODE_TYPES.TSUnknownKeyword,
toString: () => `unknown`,
};
};
exports.tsUnknownKeyword = tsUnknownKeyword;
const tsBooleanKeyword = ({ ...other }) => {
return {
...other,
type: types_1.AST_NODE_TYPES.TSBooleanKeyword,
toString: () => `boolean`,
};
};
exports.tsBooleanKeyword = tsBooleanKeyword;
const tsReadonlyKeyword = ({ ...other }) => {
return {
...other,
type: types_1.AST_NODE_TYPES.TSReadonlyKeyword,
toString: () => `readonly`,
};
};
exports.tsReadonlyKeyword = tsReadonlyKeyword;
const tsEmptyBodyFunctionExpression = ({ returnType, ...other }) => {

@@ -109,0 +133,0 @@ return {

5

dist/esm/constants.js
import { jsxAttribute, jsxClosingElement, jsxClosingFragment, jsxElement, jsxEmptyExpression, jsxExpressionContainer, jsxFragment, jsxIdentifier, jsxMemberExpression, jsxOpeningElement, jsxOpeningFragment, jsxSpreadAttribute, jsxSpreadChild, jsxText, } from './jsx-nodes';
import { arrayExpression, arrayPattern, arrowFunctionExpression, assignmentExpression, awaitExpression, binaryExpression, blockStatement, breakStatement, callExpression, catchClause, chainExpression, classBody, classDeclaration, classExpression, conditionalExpression, continueStatement, debuggerStatement, doWhileStatement, emptyStatement, exportAllDeclaration, exportDefaultDeclaration, exportNamedDeclaration, exportSpecifier, expressionStatement, forInStatement, forOfStatement, forStatement, functionDeclaration, functionExpression, identifier, ifStatement, importDeclaration, importDefaultSpecifier, importExpression, importNamespaceSpecifier, importSpecifier, literal, logicalExpression, memberExpression, methodDefinition, newExpression, objectExpression, objectPattern, program, property, propertyDefinition, restElement, returnStatement, sequenceExpression, spreadElement, staticBlock, superCallExpression, switchCase, switchStatement, taggedTemplateExpression, templateElement, templateLiteral, thisExpression, throwStatement, tryStatement, unaryExpression, updateExpression, variableDeclaration, variableDeclarator, whileStatement, withStatement, yieldExpression, } from './nodes';
import { tsAnyKeyword, tsAsExpression, tsEmptyBodyFunctionExpression, tsLiteralType, tsNonNullExpression, tsNullKeyword, tsQualifiedName, tsStringKeyword, tsTypeParameterInstantiation, tsTypeReference, } from './ts-nodes';
import { tsAnyKeyword, tsAsExpression, tsBooleanKeyword, tsEmptyBodyFunctionExpression, tsLiteralType, tsNonNullExpression, tsNullKeyword, tsQualifiedName, tsReadonlyKeyword, tsStringKeyword, tsTypeParameterInstantiation, tsTypeReference, tsUnknownKeyword, } from './ts-nodes';
import { identity } from './utils/identity';

@@ -113,2 +113,5 @@ export const DEFAULT_WHITESPACE = '\n ';

TSAnyKeyword: tsAnyKeyword,
TSUnknownKeyword: tsUnknownKeyword,
TSBooleanKeyword: tsBooleanKeyword,
TSReadonlyKeyword: tsReadonlyKeyword,
TSNullKeyword: tsNullKeyword,

@@ -115,0 +118,0 @@ TSQualifiedName: tsQualifiedName,

@@ -65,2 +65,5 @@ import { TSESTree } from '@typescript-eslint/types';

export declare const tsNullKeyword: StringableASTNodeFn<TSESTree.TSNullKeyword>;
export declare const tsUnknownKeyword: StringableASTNodeFn<TSESTree.TSUnknownKeyword>;
export declare const tsBooleanKeyword: StringableASTNodeFn<TSESTree.TSBooleanKeyword>;
export declare const tsReadonlyKeyword: StringableASTNodeFn<TSESTree.TSReadonlyKeyword>;
export declare const tsEmptyBodyFunctionExpression: StringableASTNodeFn<TSESTree.TSEmptyBodyFunctionExpression>;

@@ -67,0 +70,0 @@ export declare const tsQualifiedName: StringableASTNodeFn<TSESTree.TSQualifiedName>;

@@ -99,2 +99,23 @@ import { AST_NODE_TYPES } from '@typescript-eslint/types';

};
export const tsUnknownKeyword = ({ ...other }) => {
return {
...other,
type: AST_NODE_TYPES.TSUnknownKeyword,
toString: () => `unknown`,
};
};
export const tsBooleanKeyword = ({ ...other }) => {
return {
...other,
type: AST_NODE_TYPES.TSBooleanKeyword,
toString: () => `boolean`,
};
};
export const tsReadonlyKeyword = ({ ...other }) => {
return {
...other,
type: AST_NODE_TYPES.TSReadonlyKeyword,
toString: () => `readonly`,
};
};
export const tsEmptyBodyFunctionExpression = ({ returnType, ...other }) => {

@@ -101,0 +122,0 @@ return {

{
"name": "eslint-codemod-utils",
"version": "1.8.2",
"version": "1.8.3",
"description": "A collection of AST helper functions for more complex ESLint rule fixes.",

@@ -5,0 +5,0 @@ "author": "Alex Hinds",

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