Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Commit

Permalink
Merge branch 'master' into add-visitor-keys
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsnik authored Oct 24, 2018
2 parents 75f1020 + 4172933 commit 8d79499
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 40 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ _test.js
.DS_Store
.vscode
yarn.lock
.eslint-release-info.json
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
v20.0.0 - October 8, 2018

* f4b9893 Breaking: Support TypeScript 3.1 (fixes #524) (#525) (James Henry)

v19.0.2 - September 29, 2018

* aa0fe13 Fix: Re-expose parse method (fixes #519) (#521) (Kevin Partington)
* 655359f Chore: Makefile tweaks (#522) (Kevin Partington)

v19.0.1 - September 25, 2018

* 7a367c7 Fix: Remove lib from package.json files (#518) (James Henry)
Expand Down
38 changes: 17 additions & 21 deletions Makefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,6 @@ const OPEN_SOURCE_LICENSES = [
/MIT/, /BSD/, /Apache/, /ISC/, /WTF/, /Public Domain/
];

//------------------------------------------------------------------------------
// Data
//------------------------------------------------------------------------------

const NODE_MODULES = "./node_modules/",

// Utilities - intentional extra space at the end of each string
JEST = `${NODE_MODULES}jest/bin/jest.js`,

// Files
MAKEFILE = "./Makefile.js",
/* eslint-disable no-use-before-define */
JS_FILES = "parser.js visitor-keys.js",
TEST_FILES = find("tests/lib/").filter(fileType("js")).join(" "),
TOOLS_FILES = find("tools/").filter(fileType("js")).join(" ");
/* eslint-enable no-use-before-define */

//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
Expand All @@ -59,6 +42,19 @@ function fileType(extension) {
};
}

//------------------------------------------------------------------------------
// Data
//------------------------------------------------------------------------------

const JEST = "jest",
LINT_OPTIONS = "--report-unused-disable-directives",

// Files
MAKEFILE = "./Makefile.js",
JS_FILES = "parser.js visitor-keys.js",
TEST_FILES = find("tests/lib/").filter(fileType("js")).join(" "),
TOOLS_FILES = find("tools/").filter(fileType("js")).join(" ");

//------------------------------------------------------------------------------
// Tasks
//------------------------------------------------------------------------------
Expand All @@ -72,25 +68,25 @@ target.lint = function() {
lastReturn;

echo("Validating Makefile.js");
lastReturn = nodeCLI.exec("eslint", MAKEFILE);
lastReturn = nodeCLI.exec("eslint", MAKEFILE, LINT_OPTIONS);
if (lastReturn.code !== 0) {
errors++;
}

echo("Validating JavaScript files");
lastReturn = nodeCLI.exec("eslint", JS_FILES);
lastReturn = nodeCLI.exec("eslint", JS_FILES, LINT_OPTIONS);
if (lastReturn.code !== 0) {
errors++;
}

echo("Validating JavaScript test files");
lastReturn = nodeCLI.exec("eslint", TEST_FILES);
lastReturn = nodeCLI.exec("eslint", TEST_FILES, LINT_OPTIONS);
if (lastReturn.code !== 0) {
errors++;
}

echo("Validating JavaScript tools files");
lastReturn = nodeCLI.exec("eslint", TOOLS_FILES);
lastReturn = nodeCLI.exec("eslint", TOOLS_FILES, LINT_OPTIONS);
if (lastReturn.code !== 0) {
errors++;
}
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
> <h1>Help Wanted!</h1>
> If you're familiar with TypeScript and ESLint, and you'd like to see this project progress, please consider contributing. We need people with a good knowledge of TypeScript to ensure that the integration with the ESLint ecosystem is useful.
# TypeScript ESLint Parser

An ESLint custom parser which leverages [TypeScript ESTree](https://github.com/JamesHenry/typescript-estree) to allow for ESLint to lint TypeScript source code.
Expand Down Expand Up @@ -37,10 +40,6 @@ If you use a non-supported version of TypeScript, the parser will log a warning

**Please ensure that you are using a supported version before submitting any issues/bug reports.**

## Help Wanted!

If you're familiar with TypeScript and ESLint, and you'd like to see this project progress, please consider contributing. We need people with a good knowledge of TypeScript to ensure this parser is useful.

## Reporting Issues

Please **do not report parsing/AST issues in this repo**, report them directly to [TypeScript ESTree](https://github.com/JamesHenry/typescript-estree).
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "typescript-eslint-parser",
"description": "An Esprima-style parser for TypeScript",
"description": "An ESLint custom parser which leverages TypeScript ESTree",
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
"homepage": "https://github.com/eslint/typescript-eslint-parser",
"main": "parser.js",
"version": "19.0.1",
"version": "20.0.0",
"files": [
"parser.js",
"visitor-keys.js"
Expand All @@ -20,12 +20,12 @@
"devDependencies": {
"eslint-config-eslint": "4.0.0",
"eslint-plugin-node": "6.0.1",
"eslint-release": "0.11.1",
"eslint-release": "1.1.0",
"jest": "23.1.0",
"npm-license": "0.3.3",
"shelljs": "0.8.2",
"shelljs-nodecli": "0.1.1",
"typescript": "~3.0.1"
"typescript": "~3.1.1"
},
"keywords": [
"ast",
Expand All @@ -42,16 +42,16 @@
"integration-tests": "docker-compose -f tests/integration/docker-compose.yml up",
"kill-integration-test-containers": "docker-compose -f tests/integration/docker-compose.yml down -v --rmi local",
"lint": "node Makefile.js lint",
"release": "eslint-release",
"ci-release": "eslint-ci-release",
"gh-release": "eslint-gh-release",
"alpharelease": "eslint-prerelease alpha",
"betarelease": "eslint-prerelease beta"
"generate-release": "eslint-generate-release",
"generate-alpharelease": "eslint-generate-prerelease alpha",
"generate-betarelease": "eslint-generate-prerelease beta",
"generate-rcrelease": "eslint-generate-prerelease rc",
"publish-release": "eslint-publish-release"
},
"dependencies": {
"eslint": "4.19.1",
"typescript-estree": "1.0.0",
"eslint-visitor-keys": "^1.0.0"
"typescript-estree": "2.1.0"
},
"peerDependencies": {
"typescript": "*"
Expand Down
4 changes: 4 additions & 0 deletions parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ exports.parseForESLint = function parseForESLint(code, options) {
return { ast, visitorKeys };
};

exports.parse = function(code, options) {
return this.parseForESLint(code, options).ast;
};

// Deep copy.
/* istanbul ignore next */
exports.Syntax = (function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"devDependencies": {
"eslint": "4.19.1",
"jest": "23.1.0",
"typescript": "~2.9.1"
"typescript": "~3.1.1"
}
}
2 changes: 1 addition & 1 deletion tests/integration/jsdoc-indent-issues-344-422/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"devDependencies": {
"eslint": "4.19.1",
"jest": "23.1.0",
"typescript": "~2.9.1"
"typescript": "~3.1.1"
}
}
2 changes: 1 addition & 1 deletion tests/integration/method-overloads-issue-389/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"devDependencies": {
"eslint": "4.19.1",
"jest": "23.1.0",
"typescript": "~2.9.1"
"typescript": "~3.1.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"devDependencies": {
"eslint": "4.19.1",
"jest": "23.1.0",
"typescript": "~2.9.1"
"typescript": "~3.1.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"devDependencies": {
"eslint": "4.19.1",
"jest": "23.1.0",
"typescript": "~2.9.1"
"typescript": "~3.1.1"
}
}

0 comments on commit 8d79499

Please sign in to comment.