Skip to content

Commit

Permalink
chore(release): prepare 25.5.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnpnl committed May 5, 2020
2 parents 8d46feb + 45502b6 commit 5cdbabb
Show file tree
Hide file tree
Showing 79 changed files with 4,752 additions and 1,182 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Expand Up @@ -2,5 +2,7 @@ dist/
node_modules/
e2e/__cases__/
e2e/__workdir_synlink__/
e2e/__external-repos__/
coverage/
docs/
*.config.js
232 changes: 220 additions & 12 deletions .eslintrc.js
@@ -1,31 +1,239 @@
module.exports = {
env: {
node: true,
es6: true,
'jest/globals': true,
},
extends: 'eslint:recommended',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:jest/recommended',
'plugin:prettier/recommended'
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
ecmaVersion: 2020,
sourceType: 'module',
impliedStrict: true,
ecmaFeatures: {
jsx: true,
},
},
plugins: ['@typescript-eslint', 'jest', 'jsdoc'],
rules: {
'no-console': ['error', { allow: ['warn', 'error', 'log'] }],
indent: ['error', 2],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
semi: ['error', 'never'],
'comma-dangle': [
'prettier/prettier': 'error',
'no-unused-vars': 'off', // let typescript-eslint handle this
'no-console': 'error',
'linebreak-style': 'off',
'comma-dangle': 'off',
'constructor-super': 'error',
'for-direction': ['error'],
'getter-return': 'warn',
'no-async-promise-executor': ['error'],
'no-case-declarations': ['error'],
'no-class-assign': ['error'],
'no-compare-neg-zero': ['error'],
'no-cond-assign': 'error',
'no-const-assign': ['error'],
'no-constant-condition': ['warn'],
'no-control-regex': ['warn'],
'no-debugger': 'error',
'no-delete-var': ['error'],
'no-dupe-args': ['error'],
'no-dupe-class-members': 'warn',
'no-dupe-keys': ['error'],
'no-duplicate-case': ['error'],
'no-empty': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'never',
allowEmptyCatch: true,
},
],
'no-empty-character-class': ['error'],
'no-empty-pattern': ['error'],
'no-ex-assign': ['error'],
'no-extra-boolean-cast': ['error'],
'no-extra-semi': 'off',
'no-fallthrough': 'off',
'no-func-assign': ['error'],
'no-global-assign': ['error'],
'no-inner-declarations': ['error'],
'no-invalid-regexp': ['error'],
'no-irregular-whitespace': 'off',
'no-misleading-character-class': ['error'],
'no-mixed-spaces-and-tabs': ['error'],
'no-new-symbol': ['error'],
'no-obj-calls': ['error'],
'no-octal': ['error'],
'no-prototype-builtins': ['error'],
'no-redeclare': 'warn',
'no-regex-spaces': ['error'],
'no-self-assign': ['error'],
'no-shadow-restricted-names': ['error'],
'no-sparse-arrays': ['error'],
'no-this-before-super': ['error'],
'no-undef': ['error'],
'no-unexpected-multiline': ['error'],
'no-unreachable': ['error'],
'no-unsafe-finally': 'error',
'no-unsafe-negation': ['error'],
'no-unused-labels': 'error',
'no-useless-catch': ['error'],
'no-useless-escape': 'warn',
'no-with': ['error'],
'require-yield': ['error'],
'use-isnan': 'error',
'valid-typeof': 'off',
'@typescript-eslint/no-unused-vars': ["error", { "argsIgnorePattern": "^_" }],
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': [
'warn',
{
default: 'array',
},
],
'@typescript-eslint/ban-types': [
'error',
{
types: {
Object: {
message: 'Avoid using the `Object` type. Did you mean `object`?',
},
Function: {
message: 'Avoid using the `Function` type. Prefer a specific function type, like `() => void`.',
},
Boolean: {
message: 'Avoid using the `Boolean` type. Did you mean `boolean`?',
},
Number: {
message: 'Avoid using the `Number` type. Did you mean `number`?',
},
String: {
message: 'Avoid using the `String` type. Did you mean `string`?',
},
Symbol: {
message: 'Avoid using the `Symbol` type. Did you mean `symbol`?',
},
},
},
],
'@typescript-eslint/class-name-casing': 'error',
'@typescript-eslint/prefer-regexp-exec': 'warn',
'@typescript-eslint/prefer-string-starts-ends-with': 'warn',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/prefer-includes': 'warn',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/consistent-type-definitions': 'error',
'@typescript-eslint/explicit-member-accessibility': [
'error',
{
accessibility: 'no-public',
},
],
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'none',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
},
],
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/no-empty-function': ['error', { 'allow': ['arrowFunctions']}],
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'warn',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/prefer-for-of': 'off',
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/prefer-readonly': 'error',
'@typescript-eslint/triple-slash-reference': [
'error',
{
path: 'always',
types: 'prefer-import',
lib: 'always',
},
],
'@typescript-eslint/type-annotation-spacing': 'off',
'@typescript-eslint/unified-signatures': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
'arrow-body-style': 'warn',
'arrow-parens': ['off', 'always'],
'brace-style': ['off', 'off'],
camelcase: 'warn',
'class-methods-use-this': 'warn',
complexity: 'off',
curly: ['warn', 'multi-line'],
'default-case': 'error',
'dot-notation': 'error',
'eol-last': 'off',
eqeqeq: ['error', 'smart'],
'guard-for-in': 'error',
'id-match': 'error',
'jsdoc/check-alignment': 'error',
'jsdoc/check-indentation': 'error',
'jsdoc/newline-after-description': 'warn',
'max-classes-per-file': 'off',
'max-len': 'off',
'new-parens': 'off',
'newline-per-chained-call': 'off',
'no-bitwise': 'off',
'no-caller': 'error',
'no-duplicate-imports': 'error',
'no-eval': 'error',
'no-invalid-this': 'off',
'no-multiple-empty-lines': 'off',
'no-new-wrappers': 'error',
'no-return-await': 'error',
'no-shadow': [
'off',
{
hoist: 'all',
},
],
'no-template-curly-in-string': 'error',
'no-throw-literal': 'error',
'no-trailing-spaces': 'off',
'no-undef-init': 'error',
'no-underscore-dangle': 'off',
'no-unused-expressions': 'error',
'no-var': 'error',
'object-shorthand': 'error',
'one-var': ['error', 'never'],
'prefer-const': 'warn',
'prefer-object-spread': 'error',
'prefer-template': 'error',
'quote-props': 'off',
radix: 'error',
'space-before-function-paren': 'off',
'space-in-parens': ['off', 'never'],
'spaced-comment': [
'warn',
'always',
{
markers: ['/'],
},
],
},
settings: {},
}
1 change: 0 additions & 1 deletion .npmignore
Expand Up @@ -66,7 +66,6 @@ tsconfig.json
.prettierrc
.travis.yml
tsconfig.build.json
tslint.json
.npmrc
.markdownlint.yaml
.cache
Expand Down
42 changes: 42 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,45 @@
<a name="25.5.0"></a>
# [25.5.0](https://github.com/kulshekhar/ts-jest/compare/v25.4.0...v25.5.0) (2020-05-05)


### Bug Fixes

* **compiler:** make `projectReferences` work with `isolatedModules: false` ([#1541](https://github.com/kulshekhar/ts-jest/issues/1541)) ([3e8efbe](https://github.com/kulshekhar/ts-jest/commit/3e8efbe))
* **compiler:** allow using `files` provided by `tsconfig` ([#1562](https://github.com/kulshekhar/ts-jest/issues/1562)) ([a9f02bd](https://github.com/kulshekhar/ts-jest/commit/a9f02bd))
* **config:** verify `testMatchPatterns` contain RegExp instance or string type values ([#1569](https://github.com/kulshekhar/ts-jest/issues/1569)) ([7f85bab](https://github.com/kulshekhar/ts-jest/commit/7f85bab))


### Features

* **config:** add `tsconfig` alias to `tsConfig` option ([#1565](https://github.com/kulshekhar/ts-jest/issues/1565)) ([c10eb6d](https://github.com/kulshekhar/ts-jest/commit/c10eb6d))
* **config:** define 'ts-jest' on `ConfigGlobals` interface of `@jest/types` ([#1592](https://github.com/kulshekhar/ts-jest/issues/1592)) ([4526392](https://github.com/kulshekhar/ts-jest/commit/4526392))


### Performance Improvements

* **compiler:** don’t write compile output to file system but rely on jest cache ([#1561](https://github.com/kulshekhar/ts-jest/issues/1561)) ([d11a4ea](https://github.com/kulshekhar/ts-jest/commit/d11a4ea))
* **compiler:** improve performance for `isolatedModules: false` ([#1558](https://github.com/kulshekhar/ts-jest/issues/1558)) ([85c09e3](https://github.com/kulshekhar/ts-jest/commit/85c09e3))


### BREAKING CHANGES

* Any custom typing files or files which are needed to be compiled and intended to use with `jest` need to be defined in `files` option of `tsconfig`.

For example:
```
// tsconfig.json
{
// ...other configs
"files": [
"my-custom-typings.d.ts".
"my-global-module.ts"
]
}
```
* **compiler:** `incremental` and `compilerHost` options are no longer available. Please remove it from your `ts-jest` config.



<a name="25.5.0-beta.0"></a>
# [25.5.0-beta.0](https://github.com/kulshekhar/ts-jest/compare/v25.5.0-alpha.0...v25.5.0-beta.0) (2020-04-29)

Expand Down
48 changes: 0 additions & 48 deletions appveyor.yml

This file was deleted.

17 changes: 17 additions & 0 deletions docs/user/config/index.md
Expand Up @@ -181,6 +181,23 @@ module.exports = {

</div></div>

#### IDE `ts-jest` config suggestion

To ultilize IDE suggestion, you can use `JSDOC` to provide suggested `ts-jest` configs for your Jest config:

```js
/** @type {import('@jest/types').Config.InitialOptions} */
/** @typedef {import('ts-jest')} */
module.exports = {
// [...]
globals: {
'ts-jest': {
// ts-jest configuration goes here and your IDE will suggest which configs when typing
}
}
};
```

### Options

All options have default values which should fit most of the projects. Click on the option's name to see details and example(s).
Expand Down

0 comments on commit 5cdbabb

Please sign in to comment.