🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@typescript-eslint/typescript-estree

Package Overview
Dependencies
Maintainers
1
Versions
4268
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typescript-eslint/typescript-estree - npm Package Compare versions

Comparing version

to
1.4.1-alpha.1

2

dist/ast-converter.js

@@ -27,3 +27,3 @@ "use strict";

useJSXTextNode: extra.useJSXTextNode || false,
shouldProvideParserServices
shouldProvideParserServices,
});

@@ -30,0 +30,0 @@ const estree = instance.convertProgram();

@@ -28,3 +28,3 @@ "use strict";

type: block ? 'Block' : 'Line',
value: text
value: text,
};

@@ -37,3 +37,3 @@ if (typeof start === 'number') {

start: startLoc,
end: endLoc
end: endLoc,
};

@@ -57,3 +57,3 @@ }

end: triviaScanner.getTextPos(),
kind: triviaScanner.getToken()
kind: triviaScanner.getToken(),
};

@@ -60,0 +60,0 @@ const comment = code.substring(range.pos, range.end);

@@ -91,3 +91,3 @@ /**

*/
export declare function canContainDirective(node: ts.Node): boolean;
export declare function canContainDirective(node: ts.SourceFile | ts.Block | ts.ModuleBlock): boolean;
/**

@@ -94,0 +94,0 @@ * Returns range for the given ts.Node

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

SyntaxKind.BarEqualsToken,
SyntaxKind.CaretEqualsToken
SyntaxKind.CaretEqualsToken,
];
const LOGICAL_OPERATORS = [
SyntaxKind.BarBarToken,
SyntaxKind.AmpersandAmpersandToken
SyntaxKind.AmpersandAmpersandToken,
];

@@ -96,3 +96,3 @@ const TOKEN_TO_TEXT = {

[SyntaxKind.NewKeyword]: 'new',
[SyntaxKind.ImportKeyword]: 'import'
[SyntaxKind.ImportKeyword]: 'import',
};

@@ -212,3 +212,3 @@ /**

line: loc.line + 1,
column: loc.character
column: loc.character,
};

@@ -228,3 +228,3 @@ }

start: getLineAndCharacterFor(start, ast),
end: getLineAndCharacterFor(end, ast)
end: getLineAndCharacterFor(end, ast),
};

@@ -239,22 +239,17 @@ }

function canContainDirective(node) {
switch (node.kind) {
case typescript_1.default.SyntaxKind.SourceFile:
case typescript_1.default.SyntaxKind.ModuleBlock:
return true;
case typescript_1.default.SyntaxKind.Block:
switch (node.parent.kind) {
case typescript_1.default.SyntaxKind.Constructor:
case typescript_1.default.SyntaxKind.GetAccessor:
case typescript_1.default.SyntaxKind.SetAccessor:
case typescript_1.default.SyntaxKind.ArrowFunction:
case typescript_1.default.SyntaxKind.FunctionExpression:
case typescript_1.default.SyntaxKind.FunctionDeclaration:
case typescript_1.default.SyntaxKind.MethodDeclaration:
return true;
default:
return false;
}
default:
return false;
if (node.kind === typescript_1.default.SyntaxKind.Block) {
switch (node.parent.kind) {
case typescript_1.default.SyntaxKind.Constructor:
case typescript_1.default.SyntaxKind.GetAccessor:
case typescript_1.default.SyntaxKind.SetAccessor:
case typescript_1.default.SyntaxKind.ArrowFunction:
case typescript_1.default.SyntaxKind.FunctionExpression:
case typescript_1.default.SyntaxKind.FunctionDeclaration:
case typescript_1.default.SyntaxKind.MethodDeclaration:
return true;
default:
return false;
}
}
return true;
}

@@ -498,3 +493,3 @@ exports.canContainDirective = canContainDirective;

range: [start, end],
loc: getLocFor(start, end, ast)
loc: getLocFor(start, end, ast),
};

@@ -504,3 +499,3 @@ if (newToken.type === 'RegularExpression') {

pattern: value.slice(1, value.lastIndexOf('/')),
flags: value.slice(value.lastIndexOf('/') + 1)
flags: value.slice(value.lastIndexOf('/') + 1),
};

@@ -582,3 +577,3 @@ }

column: loc.character,
message
message,
};

@@ -585,0 +580,0 @@ }

@@ -59,3 +59,3 @@ "use strict";

tsconfigRootDir: process.cwd(),
extraFileExtensions: []
extraFileExtensions: [],
};

@@ -122,3 +122,3 @@ }

return null;
}
},
};

@@ -128,3 +128,3 @@ const program = typescript_1.default.createProgram([FILENAME], {

target: typescript_1.default.ScriptTarget.Latest,
jsx: extra.jsx ? typescript_1.default.JsxEmit.Preserve : undefined
jsx: extra.jsx ? typescript_1.default.JsxEmit.Preserve : undefined,
}, compilerHost);

@@ -222,3 +222,3 @@ const ast = program.getSourceFile(FILENAME);

'Please only submit bug reports when using the officially supported version.',
border
border,
];

@@ -334,4 +334,4 @@ extra.log(versionWarning.join('\n\n'));

? astMaps.tsNodeToESTreeNodeMap
: undefined
}
: undefined,
},
};

@@ -338,0 +338,0 @@ }

@@ -37,3 +37,5 @@ "use strict";

*/
/* istanbul ignore next */
console.warn(`Warning From TSC: "${e.message}`);
/* istanbul ignore next */
return undefined;

@@ -40,0 +42,0 @@ }

@@ -16,3 +16,3 @@ 'use strict';

allowNonTsExtensions: true,
allowJs: true
allowJs: true,
};

@@ -33,3 +33,3 @@ /**

code: '',
filePath: ''
filePath: '',
};

@@ -92,3 +92,4 @@ /**

.getConfigFileParsingDiagnostics()
.filter(diag => diag.category === typescript_1.default.DiagnosticCategory.Error && diag.code !== 18003);
.filter(diag => diag.category === typescript_1.default.DiagnosticCategory.Error &&
diag.code !== 18003);
if (configFileDiagnostics.length > 0) {

@@ -105,3 +106,3 @@ diagnosticReporter(configFileDiagnostics[0]);

watchCallbackTrackingMap.delete(normalizedFileName);
}
},
};

@@ -108,0 +109,0 @@ };

{
"name": "@typescript-eslint/typescript-estree",
"version": "1.4.1-alpha.0+7bf4342",
"version": "1.4.1-alpha.1+1b3d31e",
"description": "A parser that converts TypeScript source code into an ESTree compatible form",

@@ -47,5 +47,5 @@ "main": "dist/parser.js",

"@babel/types": "^7.3.2",
"@typescript-eslint/shared-fixtures": "1.4.1-alpha.0+7bf4342"
"@typescript-eslint/shared-fixtures": "1.4.1-alpha.1+1b3d31e"
},
"gitHead": "7bf4342d5ebf73fe1d86c13da99fe56ce13f8e8c"
"gitHead": "1b3d31e7b978f6c17e458e9ab74bc357b9b0574d"
}

@@ -80,3 +80,3 @@ <h1 align="center">TypeScript ESTree</h1>

range: true,
loc: true
loc: true,
});

@@ -83,0 +83,0 @@ ```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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

Sorry, the diff of this file is not supported yet