Skip to content

Commit

Permalink
chore: rename and reorg packages (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry committed Jan 19, 2019
1 parent 78a8b7c commit 132c078
Show file tree
Hide file tree
Showing 989 changed files with 286 additions and 825 deletions.
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/eslint-plugin-tslint.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: eslint-plugin-tslint
about: Report an issue with the eslint-plugin-tslint package
name: '@typescript-eslint/eslint-plugin-tslint'
about: Report an issue with the '@typescript-eslint/eslint-plugin-tslint' package
title: ''
labels: 'package: eslint-plugin-tslint, triage'
labels: 'package: @typescript-eslint/eslint-plugin-tslint, triage'
assignees: ''
---

Expand All @@ -13,8 +13,8 @@ assignees: ''

**What version of the following packages are you using?**

- eslint-plugin-tslint: <!-- Please fill in -->
- typescript-eslint-parser: <!-- Please fill in -->
- @typescript-eslint/eslint-plugin-tslint: <!-- Please fill in -->
- @typescript-eslint/parser: <!-- Please fill in -->
- TypeScript: <!-- Please fill in -->
- ESLint: <!-- Please fill in -->

Expand Down
14 changes: 7 additions & 7 deletions .github/ISSUE_TEMPLATE/eslint-plugin-typescript.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: eslint-plugin-typescript
about: Report an issue with the eslint-plugin-typescript package
name: '@typescript-eslint/eslint-plugin'
about: Report an issue with the '@typescript-eslint/eslint-plugin' package
title: ''
labels: 'package: eslint-plugin, triage'
assignees: ''
Expand Down Expand Up @@ -38,8 +38,8 @@ Please try to avoid code that isn't directly related to the bug, as it makes it

**Versions**

| package | version |
| -------------------------- | ------- |
| `eslint-plugin-typescript` | `X.Y.Z` |
| `typescript-eslint-parser` | `X.Y.Z` |
| `typescript` | `X.Y.Z` |
| package | version |
| ---------------------------------- | ------- |
| `@typescript-eslint/eslint-plugin` | `X.Y.Z` |
| `@typescript-eslint/parser` | `X.Y.Z` |
| `typescript` | `X.Y.Z` |
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/typescript-eslint-parser.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: 'typescript-eslint-parser'
about: Report an issue with the typescript-eslint-parser package
name: '@typescript-eslint/parser'
about: Report an issue with the '@typescript-eslint/parser' package
title: ''
labels: 'package: parser, triage'
assignees: ''
Expand All @@ -13,7 +13,7 @@ assignees: ''

**What version of the following packages are you using?**

- typescript-eslint-parser: <!-- Please fill in -->
- @typescript-eslint/parser: <!-- Please fill in -->
- TypeScript: <!-- Please fill in -->
- ESLint: <!-- Please fill in -->

Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/typescript-estree.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
name: typescript-estree
about: Report an issue with the `typescript-estree` package
name: '@typescript-eslint/typescript-estree'
about: Report an issue with the `@typescript-eslint/typescript-estree` package
title: ''
labels: 'package: typescript-estree, triage'
assignees: ''
---

**What version of TypeScript are you using?**

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

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

Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
**/tests/fixtures/**/*
**/dist
**/coverage
**/typescript-eslint-shared-fixtures
**/shared-fixtures
**/tests/integration/fixtures/**/*
**/lib/configs/recommended.json
**/.vscode
Expand Down
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ install:
script:
- commitlint-travis
- yarn check-format
- yarn workspace eslint-plugin-typescript docs:check
# TODO: Fix this check
# - yarn workspace eslint-plugin docs:check
- yarn build
- yarn test
- yarn integration-tests
Expand All @@ -29,3 +30,9 @@ after_success:
branches:
only:
- master
deploy:
on:
branch: master
provider: script
script: npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN && npx lerna publish --canary --force-publish --yes
skip_cleanup: true
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

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

- [`typescript-estree`](./packages/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>
- [`@typescript-eslint/typescript-estree`](./packages/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`](./packages/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`.
- [`@typescript-eslint/parser`](./packages/parser/) - An ESLint-specific parser which leverages `typescript-estree` and is designed to be used as a replacement for ESLint's default parser, `espree`.

- [`eslint-plugin-typescript`](./packages/eslint-plugin-typescript/) - An ESLint-specific plugin which, when used in conjunction with `typescript-eslint-parser`, allows for TypeScript-specific linting rules to run.
- [`@typescript-eslint/eslint-plugin`](./packages/eslint-plugin/) - An ESLint-specific plugin which, when used in conjunction with `@typescript-eslint/parser`, allows for TypeScript-specific linting rules to run.

- [`eslint-plugin-tslint`](./packages/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.
- [`@typescript-eslint/eslint-plugin-tslint`](./packages/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.

## Supported TypeScript Version

Expand All @@ -42,4 +42,4 @@ 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.
TypeScript ESLint 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.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.0.0",
"version": "0.2.0",
"npmClient": "yarn",
"useWorkspaces": true,
"stream": true
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "typescript-eslint",
"name": "@typescript-eslint/typescript-eslint",
"private": true,
"workspaces": [
"packages/*"
Expand Down Expand Up @@ -62,7 +62,7 @@
"@types/node": "^10.12.2",
"@types/semver": "^5.5.0",
"cz-conventional-changelog": "2.1.0",
"eslint": "^4.19.1",
"eslint": "^5.12.1",
"glob": "7.1.2",
"husky": "0.14.3",
"jest": "23.6.0",
Expand All @@ -72,6 +72,7 @@
"prettier": "^1.14.3",
"rimraf": "^2.6.3",
"ts-jest": "^23.10.4",
"tslint": "^5.11.0",
"typescript": "~3.2.1"
}
}
27 changes: 0 additions & 27 deletions packages/eslint-plugin-tslint/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,27 +0,0 @@
# [3.1.0](https://github.com/JamesHenry/eslint-plugin-tslint/compare/v3.0.0...v3.1.0) (2018-10-19)

### Bug Fixes

- Tiny lint note elimination ([a731838](https://github.com/JamesHenry/eslint-plugin-tslint/commit/a731838))

### Features

- Support for tslint property ([18a4afb](https://github.com/JamesHenry/eslint-plugin-tslint/commit/18a4afb)), closes [#40](https://github.com/JamesHenry/eslint-plugin-tslint/issues/40)

# [3.0.0](https://github.com/JamesHenry/eslint-plugin-tslint/compare/v2.1.0...v3.0.0) (2018-09-09)

### Bug Fixes

- Fixed bug when file not defined in tsconfig ([20b498b](https://github.com/JamesHenry/eslint-plugin-tslint/commit/20b498b))
- Pass sourceText parameter to service getSource ([dd4c2f8](https://github.com/JamesHenry/eslint-plugin-tslint/commit/dd4c2f8))
- Update program when sourceFile was updated ([0fe933c](https://github.com/JamesHenry/eslint-plugin-tslint/commit/0fe933c))
- Updated typescript-service dependency ([2f4f434](https://github.com/JamesHenry/eslint-plugin-tslint/commit/2f4f434))

### Features

- **core:** Added support rules requires type information ([6bc1deb](https://github.com/JamesHenry/eslint-plugin-tslint/commit/6bc1deb)), closes [#32](https://github.com/JamesHenry/eslint-plugin-tslint/issues/32) [#34](https://github.com/JamesHenry/eslint-plugin-tslint/issues/34)
- Post merge adapdation from tslint2 repository ([477c656](https://github.com/JamesHenry/eslint-plugin-tslint/commit/477c656)), closes [#32](https://github.com/JamesHenry/eslint-plugin-tslint/issues/32) [#34](https://github.com/JamesHenry/eslint-plugin-tslint/issues/34)

### BREAKING CHANGES

- New dependency
12 changes: 5 additions & 7 deletions packages/eslint-plugin-tslint/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# ESLint Plugin TSLint

[![Travis](https://img.shields.io/travis/JamesHenry/eslint-plugin-tslint.svg?style=flat-square)](https://travis-ci.org/JamesHenry/eslint-plugin-tslint)
[![GitHub license](https://img.shields.io/npm/l/eslint-plugin-tslint.svg?style=flat-square)](https://github.com/JamesHenry/eslint-plugin-tslint/blob/master/LICENSE)
[![NPM Version](https://img.shields.io/npm/v/eslint-plugin-tslint.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-tslint)
[![NPM Downloads](https://img.shields.io/npm/dt/eslint-plugin-tslint.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-tslint)
[![Travis](https://img.shields.io/travis/@typescript-eslint/eslint-plugin-tslint.svg?style=flat-square)](https://travis-ci.org/@typescript-eslint/eslint-plugin-tslint)
[![GitHub license](https://img.shields.io/npm/l/@typescript-eslint/eslint-plugin-tslint.svg?style=flat-square)](https://github.com/@typescript-eslint/eslint-plugin-tslint/blob/master/LICENSE)
[![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/eslint-plugin-tslint.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin-tslint)
[![NPM Downloads](https://img.shields.io/npm/dt/@typescript-eslint/eslint-plugin-tslint.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin-tslint)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)
[![greenkeeper.io](https://badges.greenkeeper.io/JamesHenry/mongoose-schema-to-typescript-interface.svg?style=flat-square)](https://greenkeeper.io)

ESLint plugin wraps a TSLint configuration and lints the whole source using TSLint.

## INSTALL

```
npm i -D eslint-plugin-tslint
npm i -D @typescript-eslint/eslint-plugin-tslint
```

## USAGE
Expand Down
7 changes: 3 additions & 4 deletions packages/eslint-plugin-tslint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-tslint",
"version": "3.1.0",
"name": "@typescript-eslint/eslint-plugin-tslint",
"version": "0.2.0",
"main": "dist/index.js",
"typings": "src/index.ts",
"description": "TSLint wrapper plugin for ESLint",
Expand Down Expand Up @@ -33,7 +33,6 @@
"devDependencies": {
"@types/eslint": "^4.16.3",
"@types/lodash.memoize": "^4.1.4",
"typescript-eslint-parser": "21.0.2",
"tslint": "^5.11.0"
"@typescript-eslint/parser": "0.2.0"
}
}
4 changes: 2 additions & 2 deletions packages/eslint-plugin-tslint/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ export const rules = {

/**
* The user needs to have configured "project" in their parserOptions
* for typescript-eslint-parser
* for @typescript-eslint/parser
*/
if (!parserServices || !parserServices.program) {
throw new Error(
`You must provide a value for the "parserOptions.project" property for typescript-eslint-parser`
`You must provide a value for the "parserOptions.project" property for @typescript-eslint/parser`
);
}

Expand Down
16 changes: 8 additions & 8 deletions packages/eslint-plugin-tslint/tests/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const parserOptions: any = {
ecmaFeatures: {},
/**
* Project is needed to generate the parserServices
* within typescript-eslint-parser
* within @typescript-eslint/parser
*/
project: './tests/tsconfig.json'
};
Expand Down Expand Up @@ -40,7 +40,7 @@ ruleTester.run('tslint/config', rules.config, {
valid: [
{
code: 'var foo = true;',
parser: 'typescript-eslint-parser',
parser: '@typescript-eslint/parser',
parserOptions,
options: [tslintRulesConfig]
},
Expand All @@ -50,7 +50,7 @@ ruleTester.run('tslint/config', rules.config, {
/\n/g,
' '
),
parser: 'typescript-eslint-parser',
parser: '@typescript-eslint/parser',
parserOptions: {
...parserOptions,
project: `${__dirname}/test-project/tsconfig.json`
Expand All @@ -63,7 +63,7 @@ ruleTester.run('tslint/config', rules.config, {
},
{
code: 'throw "should be ok because rule is not loaded";',
parser: 'typescript-eslint-parser',
parser: '@typescript-eslint/parser',
parserOptions,
options: [tslintRulesConfig]
}
Expand All @@ -72,7 +72,7 @@ ruleTester.run('tslint/config', rules.config, {
invalid: [
{
options: [{ lintFile: './tests/test-project/tslint.json' }],
parser: 'typescript-eslint-parser',
parser: '@typescript-eslint/parser',
parserOptions,
code: 'throw "err" // no-string-throw',
errors: [
Expand All @@ -84,7 +84,7 @@ ruleTester.run('tslint/config', rules.config, {
},
{
code: 'var foo = true // semicolon',
parser: 'typescript-eslint-parser',
parser: '@typescript-eslint/parser',
parserOptions,
options: [tslintRulesConfig],
output: 'var foo = true // semicolon',
Expand All @@ -98,7 +98,7 @@ ruleTester.run('tslint/config', rules.config, {
},
{
code: 'var foo = true // fail',
parser: 'typescript-eslint-parser',
parser: '@typescript-eslint/parser',
parserOptions,
options: [tslintRulesDirectoryConfig],
output: 'var foo = true // fail',
Expand All @@ -116,7 +116,7 @@ ruleTester.run('tslint/config', rules.config, {
/\n/g,
' '
),
parser: 'typescript-eslint-parser',
parser: '@typescript-eslint/parser',
parserOptions: {
...parserOptions,
project: `${__dirname}/test-project/tsconfig.json`
Expand Down
42 changes: 0 additions & 42 deletions packages/eslint-plugin-typescript/lib/configs/recommended.json

This file was deleted.

File renamed without changes.
File renamed without changes.

0 comments on commit 132c078

Please sign in to comment.