Skip to content

Commit

Permalink
Merge branch 'master' into feature/add-ignoreTaggedTemplateExpression…
Browse files Browse the repository at this point in the history
…s-option
  • Loading branch information
bradzacher committed Apr 12, 2020
2 parents 4556c0c + 6b4680b commit 1cc2310
Show file tree
Hide file tree
Showing 175 changed files with 15,881 additions and 7,156 deletions.
27 changes: 15 additions & 12 deletions .cspell.json
Expand Up @@ -11,7 +11,8 @@
"**/**/ROADMAP.md",
"**/*.{json,snap}",
".cspell.json",
"yarn.lock"
"yarn.lock",
".github/workflows/**"
],
"dictionaries": [
"typescript",
Expand All @@ -34,45 +35,47 @@
"\\(#.+?\\)"
],
"words": [
"ASTs",
"Airbnb",
"Airbnb's",
"Codecov",
"Crockford",
"errored",
"IDE's",
"IIFE",
"IIFEs",
"OOM",
"OOMs",
"Premade",
"ROADMAP",
"ASTs",
"autofix",
"autofixers",
"backticks",
"bigint",
"bivariant",
"blockless",
"codebases",
"Codecov",
"contravariant",
"Crockford",
"declarators",
"destructure",
"destructured",
"errored",
"erroring",
"ESLint",
"ESLint's",
"espree",
"estree",
"IDE's",
"IIFE",
"IIFEs",
"linebreaks",
"necroing",
"nocheck",
"nullish",
"OOM",
"OOMs",
"parameterised",
"performant",
"pluggable",
"postprocess",
"Premade",
"prettier's",
"recurse",
"reimplement",
"resync",
"ROADMAP",
"ruleset",
"rulesets",
"superset",
Expand Down
13 changes: 12 additions & 1 deletion .eslintrc.js
Expand Up @@ -174,7 +174,7 @@ module.exports = {
'@typescript-eslint/internal/no-typescript-estree-import': 'error',
},
},
// rule source files
// plugin rule source files
{
files: [
'packages/eslint-plugin-internal/src/rules/**/*.ts',
Expand All @@ -187,6 +187,17 @@ module.exports = {
'import/no-default-export': 'off',
},
},
// plugin rule tests
{
files: [
'packages/eslint-plugin-internal/tests/rules/**/*.test.ts',
'packages/eslint-plugin-tslint/tests/rules/**/*.test.ts',
'packages/eslint-plugin/tests/rules/**/*.test.ts',
],
rules: {
'@typescript-eslint/internal/plugin-test-formatting': 'error',
},
},
// tools and tests
{
files: ['**/tools/**/*.ts', '**/tests/**/*.ts'],
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/eslint-plugin-tslint.md
Expand Up @@ -15,7 +15,7 @@ The more relevant information you can include, the faster we can find the issue

<!--
Make sure you read through our FAQ before posting.
https://github.com/typescript-eslint/typescript-eslint/blob/issue-template-update/docs/getting-started/linting/FAQ.md
https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md
-->

**Repro**
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/eslint-plugin-typescript.md
Expand Up @@ -28,7 +28,7 @@ Are you opening an issue because the rule you're trying to use is not found?

<!--
Make sure you read through our FAQ before posting.
https://github.com/typescript-eslint/typescript-eslint/blob/issue-template-update/docs/getting-started/linting/FAQ.md
https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md
-->

**Repro**
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/typescript-eslint-parser.md
Expand Up @@ -15,7 +15,7 @@ The more relevant information you can include, the faster we can find the issue

<!--
Make sure you read through our FAQ before posting.
https://github.com/typescript-eslint/typescript-eslint/blob/issue-template-update/docs/getting-started/linting/FAQ.md
https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md
-->

**Repro**
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/typescript-eslint-utils.md
Expand Up @@ -15,7 +15,7 @@ The more relevant information you can include, the faster we can find the issue

<!--
Make sure you read through our FAQ before posting.
https://github.com/typescript-eslint/typescript-eslint/blob/issue-template-update/docs/getting-started/linting/FAQ.md
https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md
-->

**Repro**
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/typescript-estree.md
Expand Up @@ -15,7 +15,7 @@ The more relevant information you can include, the faster we can find the issue

<!--
Make sure you read through our FAQ before posting.
https://github.com/typescript-eslint/typescript-eslint/blob/issue-template-update/docs/getting-started/linting/FAQ.md
https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md
-->

**Repro**
Expand Down
50 changes: 39 additions & 11 deletions .github/workflows/ci.yml
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
primary_code_validation_and_tests:
name: Primary code validation and tests
name: Typecheck and tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -49,15 +49,6 @@ jobs:
- name: Typecheck all packages
run: yarn typecheck

- name: Check code formatting
run: yarn format-check

- name: Run linting
run: yarn lint

- name: Validate spelling
run: yarn check:spelling

- name: Run unit tests
run: yarn test
env:
Expand All @@ -71,6 +62,43 @@ jobs:
flags: unittest
name: codecov

linting_and_style:
name: Code style and lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.PRIMARY_NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# This also runs a build as part of the postinstall bootstrap
- name: Install dependencies and build
run: |
yarn --ignore-engines --frozen-lockfile
yarn check-clean-workspace-after-install
- name: Check code formatting
run: yarn format-check

- name: Run linting
run: yarn lint

- name: Validate spelling
run: yarn check:spelling

integration_tests:
name: Run integration tests on primary Node.js version
runs-on: ubuntu-latest
Expand Down Expand Up @@ -143,7 +171,7 @@ jobs:
publish_canary_version:
name: Publish the latest code as a canary version
runs-on: ubuntu-latest
needs: [primary_code_validation_and_tests, unit_tests_on_other_node_versions, integration_tests]
needs: [primary_code_validation_and_tests, unit_tests_on_other_node_versions, linting_and_style, integration_tests]
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .prettierrc.json
@@ -1,3 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
66 changes: 66 additions & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,72 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v2.26.0...v2.27.0) (2020-04-06)


### Bug Fixes

* **eslint-plugin:** [no-throw-literal] fix crash caused by getBaseTypes ([#1830](https://github.com/typescript-eslint/typescript-eslint/issues/1830)) ([9d53c76](https://github.com/typescript-eslint/typescript-eslint/commit/9d53c761983dd964109b9f13eb9bfe20caf9defb))
* **eslint-plugin:** [no-unsafe-call] fix incorrect selector ([#1826](https://github.com/typescript-eslint/typescript-eslint/issues/1826)) ([8ec53a3](https://github.com/typescript-eslint/typescript-eslint/commit/8ec53a3579fcb59cdffea0c60fbb755d056f4c8a))
* **eslint-plugin:** [require-await] handle async generators ([#1782](https://github.com/typescript-eslint/typescript-eslint/issues/1782)) ([9642d9d](https://github.com/typescript-eslint/typescript-eslint/commit/9642d9dce693befac89a4e9d8bf8dd18f4361e2a))
* **eslint-plugin:** no-explicit-any constructor functions (& mo… ([#1711](https://github.com/typescript-eslint/typescript-eslint/issues/1711)) ([ab8572e](https://github.com/typescript-eslint/typescript-eslint/commit/ab8572e30e14ebda91c8437be5ee35e7dc9add2e))
* **typescript-estree:** add support for TS3.9 extra file extensions ([#1833](https://github.com/typescript-eslint/typescript-eslint/issues/1833)) ([1f0ff41](https://github.com/typescript-eslint/typescript-eslint/commit/1f0ff41aa1bc3b7c5330b2f5fe22e24bf578a6b2))


### Features

* **eslint-plugin:** new rule method-signature-style ([#1685](https://github.com/typescript-eslint/typescript-eslint/issues/1685)) ([c49d771](https://github.com/typescript-eslint/typescript-eslint/commit/c49d771ba62f1a21d3c1aec106341daddfcd3c9a))
* **eslint-plugin:** sort members alphabetically ([#263](https://github.com/typescript-eslint/typescript-eslint/issues/263)) ([485e902](https://github.com/typescript-eslint/typescript-eslint/commit/485e90213a0f8baac0587f7d56925448883fc5bd))
* **eslint-plugin-internal:** add plugin-test-formatting rule ([#1821](https://github.com/typescript-eslint/typescript-eslint/issues/1821)) ([9b0023a](https://github.com/typescript-eslint/typescript-eslint/commit/9b0023a4996ecdd7dfcb30abd1678091a78f3064))
* **experimental-utils:** add types for suggestions from CLIEngine ([#1844](https://github.com/typescript-eslint/typescript-eslint/issues/1844)) ([7c11bd6](https://github.com/typescript-eslint/typescript-eslint/commit/7c11bd66f2d0e5ea9d3943e6b8c66e6ddff50862))
* **experimental-utils:** update eslint types to match v6.8 ([#1846](https://github.com/typescript-eslint/typescript-eslint/issues/1846)) ([16ce74d](https://github.com/typescript-eslint/typescript-eslint/commit/16ce74d247781ac890dc0baa30c384f97e581b6b))





# [2.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v2.25.0...v2.26.0) (2020-03-30)


### Bug Fixes

* **eslint-plugin:** [no-explicit-any] error with ignoreRestArgs ([#1796](https://github.com/typescript-eslint/typescript-eslint/issues/1796)) ([638d84d](https://github.com/typescript-eslint/typescript-eslint/commit/638d84ddd77d07117b3ec7c5431f3b0e44b1995d))
* **eslint-plugin:** [no-unsafe-call] allow import expressions ([#1800](https://github.com/typescript-eslint/typescript-eslint/issues/1800)) ([4fa7107](https://github.com/typescript-eslint/typescript-eslint/commit/4fa710754ecc412b65ac3864fe0c7857c254ac1b))
* **eslint-plugin:** [no-unsafe-return] error with <TS3.7 ([#1815](https://github.com/typescript-eslint/typescript-eslint/issues/1815)) ([f3160b4](https://github.com/typescript-eslint/typescript-eslint/commit/f3160b471f8247e157555b6cf5b40a1f6ccdc233))


### Features

* **eslint-plugin-tslint:** support tslint 6 ([#1809](https://github.com/typescript-eslint/typescript-eslint/issues/1809)) ([7d963fd](https://github.com/typescript-eslint/typescript-eslint/commit/7d963fd846935acd91b7b0cd31c56a70a2b994d1))
* **typescript-estree:** add option to ignore certain folders from glob resolution ([#1802](https://github.com/typescript-eslint/typescript-eslint/issues/1802)) ([1e29e69](https://github.com/typescript-eslint/typescript-eslint/commit/1e29e69b289d61107a7de67592beae331ba50222))





# [2.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v2.24.0...v2.25.0) (2020-03-23)


### Bug Fixes

* only run publish_canary_version on master ([3814d4e](https://github.com/typescript-eslint/typescript-eslint/commit/3814d4e3b3c1552c7601b5d722b2a37c5a570841))
* **eslint-plugin:** [quotes] false positive with backtick in import equals statement ([#1769](https://github.com/typescript-eslint/typescript-eslint/issues/1769)) ([199863d](https://github.com/typescript-eslint/typescript-eslint/commit/199863d35cb36bdb7178b8116d146258506644c7))
* **eslint-plugin:** fix message of no-base-to-string ([#1755](https://github.com/typescript-eslint/typescript-eslint/issues/1755)) ([6646959](https://github.com/typescript-eslint/typescript-eslint/commit/6646959b255b08afe5175bba6621bad11b9e1d5e))
* **eslint-plugin-tslint:** fix tslintConfig memoization key ([#1719](https://github.com/typescript-eslint/typescript-eslint/issues/1719)) ([abf1a2f](https://github.com/typescript-eslint/typescript-eslint/commit/abf1a2fa5574e41af8070be3d79a886ea2f989cc)), closes [typescript-eslint#1692](https://github.com/typescript-eslint/issues/1692)
* **typescript-estree:** export * regression from 133f622f ([#1751](https://github.com/typescript-eslint/typescript-eslint/issues/1751)) ([09d8afc](https://github.com/typescript-eslint/typescript-eslint/commit/09d8afca684635b5ac604bc1794240484a70ce91))


### Features

* **eslint-plugin:** [no-unnec-type-assertion] allow const assertions ([#1741](https://github.com/typescript-eslint/typescript-eslint/issues/1741)) ([f76a1b3](https://github.com/typescript-eslint/typescript-eslint/commit/f76a1b3e63afda9f239e46f4ad5b36c1d7a6e8da))
* **eslint-plugin:** [no-unnecessary-condition] ignore basic array indexing false positives ([#1534](https://github.com/typescript-eslint/typescript-eslint/issues/1534)) ([2b9603d](https://github.com/typescript-eslint/typescript-eslint/commit/2b9603d868c57556d8cd6087685e798d74cb6f26))
* **eslint-plugin:** add `class-literal-property-style` rule ([#1582](https://github.com/typescript-eslint/typescript-eslint/issues/1582)) ([b2dbd89](https://github.com/typescript-eslint/typescript-eslint/commit/b2dbd890a5bef81aa6978d68c166457838ee04a1))
* **experimental-utils:** expose ast utility functions ([#1670](https://github.com/typescript-eslint/typescript-eslint/issues/1670)) ([3eb5d45](https://github.com/typescript-eslint/typescript-eslint/commit/3eb5d4525e95c8ab990f55588b8d830a02ce5a9c))





# [2.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v2.23.0...v2.24.0) (2020-03-16)


Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -15,7 +15,7 @@

## Table of Contents

- [Getting Started](#getting-started)
- [Getting Started / Installation](#getting-started--installation)
- [What are ESLint and TypeScript, and how do they compare?](#what-are-eslint-and-typescript-and-how-do-they-compare)
- [Why does this project exist?](#why-does-this-project-exist)
- [What about TSLint?](#what-about-tslint)
Expand All @@ -32,7 +32,7 @@
- [Contributors](#contributors)
- [Contributing Guide](#contributing-guide)

## Getting Started
## Getting Started / Installation

- **[You can find our Getting Started docs here](./docs/getting-started/README.md)**
- **[You can find our Linting FAQ / Troubleshooting docs here](./docs/getting-started/linting/FAQ.md)**
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
@@ -1,5 +1,5 @@
{
"version": "2.24.0",
"version": "2.27.0",
"npmClient": "yarn",
"useWorkspaces": true,
"stream": true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -73,7 +73,7 @@
"prettier": "^1.19.1",
"ts-jest": "^25.0.0",
"ts-node": "^8.5.0",
"tslint": "^5.20.1",
"tslint": "^6.1.0",
"typescript": ">=3.2.1 <3.9.0"
},
"resolutions": {
Expand Down
27 changes: 27 additions & 0 deletions packages/eslint-plugin-internal/CHANGELOG.md
Expand Up @@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v2.26.0...v2.27.0) (2020-04-06)


### Features

* **eslint-plugin-internal:** add plugin-test-formatting rule ([#1821](https://github.com/typescript-eslint/typescript-eslint/issues/1821)) ([9b0023a](https://github.com/typescript-eslint/typescript-eslint/commit/9b0023a4996ecdd7dfcb30abd1678091a78f3064))





# [2.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v2.25.0...v2.26.0) (2020-03-30)

**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal





# [2.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v2.24.0...v2.25.0) (2020-03-23)

**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal





# [2.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v2.23.0...v2.24.0) (2020-03-16)

**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal
Expand Down
5 changes: 3 additions & 2 deletions packages/eslint-plugin-internal/package.json
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/eslint-plugin-internal",
"version": "2.24.0",
"version": "2.27.0",
"private": true,
"main": "dist/index.js",
"scripts": {
Expand All @@ -12,6 +12,7 @@
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@typescript-eslint/experimental-utils": "2.24.0"
"@typescript-eslint/experimental-utils": "2.27.0",
"prettier": "*"
}
}
2 changes: 2 additions & 0 deletions packages/eslint-plugin-internal/src/rules/index.ts
@@ -1,9 +1,11 @@
import noTypescriptDefaultImport from './no-typescript-default-import';
import noTypescriptEstreeImport from './no-typescript-estree-import';
import pluginTestFormatting from './plugin-test-formatting';
import preferASTTypesEnum from './prefer-ast-types-enum';

export default {
'no-typescript-default-import': noTypescriptDefaultImport,
'no-typescript-estree-import': noTypescriptEstreeImport,
'plugin-test-formatting': pluginTestFormatting,
'prefer-ast-types-enum': preferASTTypesEnum,
};

0 comments on commit 1cc2310

Please sign in to comment.