Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Import typescript-estree package and history #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 89 commits into from
Jan 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
f5838e9
feat(*): Initial commit
JamesHenry Sep 22, 2018
26b6114
docs(README): Updated docs
JamesHenry Sep 22, 2018
2d73c36
chore: force LF for tsx files (#11)
uniqueiniquity Sep 26, 2018
e95ff0a
feat: Support `unknown` keyword (#3)
g-plane Sep 26, 2018
fa81813
chore: lint commit messages (#12)
JamesHenry Sep 27, 2018
38e70d7
style: format code and markdown using prettier (#13)
JamesHenry Sep 27, 2018
fbdd116
feat: support TypeScript 3.1 (#14)
outofambit Oct 8, 2018
7f78eec
feat: support shorthand JSX fragments (#15)
wsabransky Oct 8, 2018
b6a515a
fix(ast): fix wrong node type on literal expressions (#4)
g-plane Oct 8, 2018
227d802
fix: parse ArrayExpressions correctly (#20)
madbence Oct 28, 2018
a6fd571
feat: document API and standardize config options (#22)
kaicataldo Oct 31, 2018
62c2500
fix(*): brute force initial conversion to TS (#25)
JamesHenry Nov 4, 2018
af7301b
chore: test Node v11 in CI (#29)
kaicataldo Nov 8, 2018
c7d094c
chore: combine basics and ecmaFeatures into javascript tests (#26)
kaicataldo Nov 11, 2018
f3008a0
feat: offer semantic services alongside AST (#24)
uniqueiniquity Nov 22, 2018
05d1387
fix: correct JSXFragment fields (#34)
ikatyang Nov 25, 2018
3d9502e
test: ast alignment tests did not account for javascript rename (#36)
JamesHenry Nov 25, 2018
3ddabbe
feat: typed parser return value (#33)
g-plane Nov 26, 2018
9d9e791
feat: add optional global flag to TSModuleDeclaration for global augm…
armano2 Nov 30, 2018
cb9ca5d
fix: trigger publish
JamesHenry Nov 30, 2018
fc26ed9
feat: ts 3.2 support (#35) (#37)
JamesHenry Dec 1, 2018
44db65b
test: replace babylon(beta) with babel/parser (#40)
armano2 Dec 1, 2018
5ff979c
chore: regenerate yarn-lock to fix vulnerabilities (#41)
armano2 Dec 5, 2018
2a22663
refactor: improve type checking in parser (#43)
armano2 Dec 13, 2018
82d971d
feat: fix issues in AST (#42)
armano2 Dec 19, 2018
6c82768
refactor: mark AsteriskAsteriskEquals as assignment operator (#46)
armano2 Dec 19, 2018
76e7198
refactor: remove internal typescript method call with hasModifier (#48)
armano2 Dec 19, 2018
cb5a569
chore: add editorconfig (#49)
armano2 Dec 21, 2018
ff960fa
refactor: improve types in node-utils (#47)
armano2 Dec 21, 2018
255b14f
fix: non-existent files and custom file extensions (#53)
uniqueiniquity Dec 27, 2018
e2ef714
fix: many missing nodes and better babel alignment (#65)
armano2 Dec 28, 2018
0d461e7
feat: add errorOnTypeScriptSyntaticAndSemanticIssues option (#57)
JamesHenry Dec 28, 2018
da6dd79
fix: add missing TSInferType node (#68)
armano2 Jan 1, 2019
2b58046
test: refactor omitDeep function to support name changes (#70)
armano2 Jan 1, 2019
b1bd6d2
fix: add missing TSThisType no known nodes (#73)
armano2 Jan 1, 2019
a2a1c68
fix: change incorrect FirstNode to QualifiedName (#76)
armano2 Jan 1, 2019
3698833
refactor: remove convertDecorators helper (#75)
armano2 Jan 1, 2019
7db735d
feat: add support and tests for TSAsExpression (#69)
armano2 Jan 1, 2019
7090e16
feat: add support for export equal declaration (#71)
armano2 Jan 1, 2019
cc00e87
refactor: improve typing (#83)
armano2 Jan 4, 2019
b80f708
test: fix issues with collecting coverage from tests (#84)
armano2 Jan 4, 2019
5dc7152
test: add missing test cases for in and for loop (#85)
armano2 Jan 4, 2019
aa614e1
fix: set parent nodes correctly for virtual files (#78)
armano2 Jan 4, 2019
2f17d13
refactor: remove duplicated type ConstructorTypeNode (#81)
armano2 Jan 4, 2019
5f57189
BREAKING: add missing TSTypeAssertion node (#79)
armano2 Jan 4, 2019
063ee6c
fix: commit message for add missing TSTypeAssertion node (#79)
JamesHenry Jan 4, 2019
c93365f
test: add FixturesTester (#67)
armano2 Jan 4, 2019
13e9ed3
fix: parsing comments in jsx (#82)
armano2 Jan 4, 2019
4db3a65
feat: align call and construct signature declarations (#74)
armano2 Jan 4, 2019
ece0a36
feat: add missing TSNamespaceExportDeclaration node (#87)
armano2 Jan 4, 2019
47769b1
test: enable alignment tests for importMeta and add labels test (#88)
armano2 Jan 4, 2019
9dd95f9
refactor: migrate nodeTypes to enum and correct ESTreeComment interfa…
armano2 Jan 4, 2019
92a8d55
fix: correct typo in parser options in word syntactic (#89)
armano2 Jan 5, 2019
a472a53
refactor: remove dead code from NamedImports (#90)
armano2 Jan 5, 2019
683f30d
feat: update TSFunctionType and TSConstructorType nodes (#91)
armano2 Jan 6, 2019
e76fd35
refactor: improve types and add comments (#92)
armano2 Jan 6, 2019
e78a0cf
feat: report on TS 1141, enable semantic errors for AST comparison (#93)
JamesHenry Jan 6, 2019
3cf0b9a
feat(diagnostics): report on TS 1121 and TS 1200 (#94)
JamesHenry Jan 6, 2019
2626591
feat(diagnostics): report on TS 1049, TS 1211 and TS 2364 (#95)
JamesHenry Jan 6, 2019
bf40d10
feat(diagnostics): report on TS 1014, 1048, 1117, 2462, 17012, 17013 …
JamesHenry Jan 6, 2019
6bac258
feat(diagnostics): report on TS 1044, 1045, 1097, 1206, 1246 (#97)
JamesHenry Jan 6, 2019
b507224
fix: functions without body should be TSDeclareFunctions (#98)
armano2 Jan 6, 2019
65cac58
feat(diagnostics): report on TS 1090, 1173, 1190, 1242, 2369 (#99)
JamesHenry Jan 6, 2019
76a2445
fix: don't mutate original TypeScript AST in converter (#100)
armano2 Jan 6, 2019
8a0cf3e
chore: add comments about babel issues (#101)
armano2 Jan 6, 2019
b19caaa
fix: parenthesized expressions are not eligible for directive (#103)
JamesHenry Jan 6, 2019
d070ad5
chore: add new notes about PRs in babel (#106)
armano2 Jan 8, 2019
1b2470e
fix: regression in TSTypeParameter node "name" (#111)
armano2 Jan 10, 2019
21e28ac
refactor: simplify assigning directive property to nodes (#105)
armano2 Jan 10, 2019
cbc1f58
refactor: unify converting of class and interface heritage (#107)
armano2 Jan 10, 2019
c36a6de
feat(diagnostics): report on TS 1096 (#110)
armano2 Jan 10, 2019
9f5d1f8
test: add unsupported test cases for errors (#113)
armano2 Jan 10, 2019
5b95a71
feat: rest element should contain information about type annotation (…
armano2 Jan 10, 2019
8817e8a
fix: commit message for #108
JamesHenry Jan 10, 2019
07ccceb
feat: update TSMethodSignature node (#104)
armano2 Jan 10, 2019
224a701
chore: add codecov (#114)
JamesHenry Jan 11, 2019
1d1f524
test: improve workflow for development (#116)
armano2 Jan 11, 2019
ecb826e
refactor: add explicit implementation of TSLiteralType (#117)
armano2 Jan 12, 2019
170b3ca
feat: update TSIndexSignature and report on TS1071 (#115)
armano2 Jan 12, 2019
577b8ab
test: add missing test cases for patterns (#119)
armano2 Jan 12, 2019
4773ec8
feat: change logic of distinguishing patterns from statements (#118)
armano2 Jan 12, 2019
0ad8109
feat(ast): update TSInterfaceDeclaration and TSClassImplements (#120)
JamesHenry Jan 12, 2019
5cc146d
refactor: migrate node-utils from commonjs to es6 module (#121)
armano2 Jan 12, 2019
9210ced
test: add test cases for broken converting (#123)
armano2 Jan 13, 2019
f0e779e
feat: updates to constructor method node (#124)
armano2 Jan 13, 2019
085ce10
chore: move config to top level where possible
JamesHenry Jan 13, 2019
e0e4375
build: disable commit linting on travis for now
JamesHenry Jan 13, 2019
e5781b1
chore: fix .prettierignore
JamesHenry Jan 13, 2019
664d2ef
docs: update README
JamesHenry Jan 13, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
coverage:
status:
patch:
default:
target: 90%
project:
default:
target: auto
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
quote_type = single
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* text=auto
*.js eol=lf
*.ts eol=lf
*.tsx eol=lf
*.yml eol=lf
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**What version of TypeScript are you using?**

**What version of `typescript-estree` are you using?**

**What code were you trying to parse?**

```ts
// Put your code here
```

**What did you expect to happen?**

**What actually happened?**
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,8 @@ typings/

# next.js build output
.next

.DS_Store
.vscode
.idea
dist
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/tests/fixtures/**/*
**/dist
**/coverage
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
language: node_js
cache:
yarn: true
directories:
- node_modules
notifications:
email: false
node_js:
- '11'
- '10'
- '9'
- '8'
- '6'
install:
- yarn --ignore-engines
script:
# - commitlint-travis
- yarn check-format
- yarn test
- yarn build
- yarn global add codecov
after_success:
- codecov
branches:
only:
- master
26 changes: 26 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
TypeScript ESLint

Originally extracted from:

TypeScript ESLint Parser
Copyright JS Foundation and other contributors, https://js.foundation

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
52 changes: 51 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,51 @@
# typescript-eslint
<h1 align="center">TypeScript ESLint</h1>

<p align="center">Monorepo for all the tooling which enables ESLint to support TypeScript</p>

<p align="center">
<a href="https://travis-ci.org/typescript-eslint/typescript-eslint"><img src="https://img.shields.io/travis/typescript-eslint/typescript-eslint.svg?style=flat-square" alt="Travis"/></a>
<a href="https://github.com/typescript-eslint/typescript-eslint/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/typescript-estree.svg?style=flat-square" alt="GitHub license" /></a>
<a href="https://www.npmjs.com/package/typescript-estree"><img src="https://img.shields.io/npm/v/typescript-estree.svg?style=flat-square" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/package/typescript-estree"><img src="https://img.shields.io/npm/dt/typescript-estree.svg?style=flat-square" alt="NPM Downloads" /></a>
<a href="http://commitizen.github.io/cz-cli/"><img src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg" alt="Commitizen friendly" /></a>
</p>

<br>

## About

This repo contains several packages which allow ESLint users to lint their TypeScript code.

- `typescript-estree` - An entirely generic TypeScript parser which takes TypeScript source code and produces an <a href="https://github.com/estree/estree">ESTree</a>-compatible AST</p>

- This package is also used to power the amazing opinionated code formatter [Prettier](https://prettier.io)'s own TypeScript use-case.

- `typescript-eslint-parser` - An ESLint-specific parser which leverages `typescript-estree` and is designed to be used as a replacement for ESLint's default parser, `espree`.

- PENDING MIGRATION TO MONOREPO

- `eslint-plugin-typescript` - An ESLint-specific plugin which, when used in conjunction with `typescript-eslint-parser`, allows for TypeScript-specific linting rules to run.

- PENDING MIGRATION TO MONOREPO

- `eslint-plugin-tslint` - An ESLint-specific plugin which runs an instance of TSLint within your ESLint setup to allow for users to more easily migrate from TSLint to ESLint.

- PENDING MIGRATION TO MONOREPO

## Supported TypeScript Version

We will always endeavor to support the latest stable version of TypeScript.

The version of TypeScript currently supported by this parser is `~3.2.1`. This is reflected in the `devDependency` requirement within the package.json file, and it is what the tests will be run against. We have an open `peerDependency` requirement in order to allow for experimentation on newer/beta versions of TypeScript.

If you use a non-supported version of TypeScript, the parser will log a warning to the console.

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

## Contributing

COMING SOON!

## License

TypeScript ESTree inherits from the the original TypeScript ESLint Parser license, as the majority of the work began there. It is licensed under a permissive BSD 2-clause license.
6 changes: 2 additions & 4 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"packages": [
"packages/*"
],
"version": "0.0.0",
"npmClient": "yarn"
"npmClient": "yarn",
"useWorkspaces": true
}
62 changes: 61 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,67 @@
{
"name": "typescript-eslint",
"private": true,
"workspaces": [
"packages/*"
],
"author": "James Henry <[email protected]>",
"license": "BSD-2-Clause",
"repository": "typescript-eslint/typescript-eslint",
"bugs": {
"url": "https://github.com/typescript-eslint/typescript-eslint/issues"
},
"scripts": {
"postinstall": "lerna bootstrap",
"test": "lerna run test",
"build": "lerna run build",
"clean": "lerna run clean",
"precommit": "yarn test && lint-staged",
"cz": "git-cz",
"commitmsg": "commitlint -E GIT_PARAMS",
"check-format": "prettier --list-different \"./**/*.{ts,js,json,md}\""
},
"lint-staged": {
"*.{ts,js,json,md}": [
"prettier --write",
"git add"
]
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"engines": {
"node": ">=6.14.0"
},
"devDependencies": {
"lerna": "^3.10.5"
"@babel/code-frame": "7.0.0",
"@babel/parser": "7.2.3",
"@commitlint/cli": "^7.1.2",
"@commitlint/config-conventional": "^7.1.2",
"@commitlint/travis-cli": "^7.1.2",
"@types/babel-code-frame": "^6.20.1",
"@types/jest": "^23.3.9",
"@types/lodash.isplainobject": "^4.0.4",
"@types/lodash.unescape": "^4.0.4",
"@types/node": "^10.12.2",
"@types/semver": "^5.5.0",
"@types/shelljs": "^0.8.0",
"cz-conventional-changelog": "2.1.0",
"glob": "7.1.2",
"husky": "0.14.3",
"jest": "23.6.0",
"lerna": "^3.10.5",
"lint-staged": "7.3.0",
"lodash.isplainobject": "4.0.6",
"prettier": "^1.14.3",
"shelljs": "0.8.2",
"ts-jest": "^23.10.4",
"typescript": "~3.2.1"
}
}
26 changes: 26 additions & 0 deletions packages/typescript-estree/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
TypeScript ESTree

Originally extracted from:

TypeScript ESLint Parser
Copyright JS Foundation and other contributors, https://js.foundation

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading