Skip to content

Commit 5cdbabb

Browse files
authored
chore(release): prepare 25.5.0 release
2 parents 8d46feb + 45502b6 commit 5cdbabb

79 files changed

Lines changed: 4752 additions & 1182 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ dist/
22
node_modules/
33
e2e/__cases__/
44
e2e/__workdir_synlink__/
5+
e2e/__external-repos__/
56
coverage/
67
docs/
8+
*.config.js

.eslintrc.js

Lines changed: 220 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,239 @@
11
module.exports = {
22
env: {
33
node: true,
4+
es6: true,
5+
'jest/globals': true,
46
},
5-
extends: 'eslint:recommended',
7+
extends: [
8+
'eslint:recommended',
9+
'plugin:@typescript-eslint/recommended',
10+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
11+
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
12+
'plugin:jest/recommended',
13+
'plugin:prettier/recommended'
14+
],
15+
parser: '@typescript-eslint/parser',
616
parserOptions: {
17+
project: 'tsconfig.json',
718
ecmaVersion: 2020,
819
sourceType: 'module',
920
impliedStrict: true,
1021
ecmaFeatures: {
1122
jsx: true,
1223
},
1324
},
25+
plugins: ['@typescript-eslint', 'jest', 'jsdoc'],
1426
rules: {
15-
'no-console': ['error', { allow: ['warn', 'error', 'log'] }],
16-
indent: ['error', 2],
17-
'linebreak-style': ['error', 'unix'],
18-
quotes: ['error', 'single'],
19-
semi: ['error', 'never'],
20-
'comma-dangle': [
27+
'prettier/prettier': 'error',
28+
'no-unused-vars': 'off', // let typescript-eslint handle this
29+
'no-console': 'error',
30+
'linebreak-style': 'off',
31+
'comma-dangle': 'off',
32+
'constructor-super': 'error',
33+
'for-direction': ['error'],
34+
'getter-return': 'warn',
35+
'no-async-promise-executor': ['error'],
36+
'no-case-declarations': ['error'],
37+
'no-class-assign': ['error'],
38+
'no-compare-neg-zero': ['error'],
39+
'no-cond-assign': 'error',
40+
'no-const-assign': ['error'],
41+
'no-constant-condition': ['warn'],
42+
'no-control-regex': ['warn'],
43+
'no-debugger': 'error',
44+
'no-delete-var': ['error'],
45+
'no-dupe-args': ['error'],
46+
'no-dupe-class-members': 'warn',
47+
'no-dupe-keys': ['error'],
48+
'no-duplicate-case': ['error'],
49+
'no-empty': [
2150
'error',
2251
{
23-
arrays: 'always-multiline',
24-
objects: 'always-multiline',
25-
imports: 'always-multiline',
26-
exports: 'always-multiline',
27-
functions: 'never',
52+
allowEmptyCatch: true,
53+
},
54+
],
55+
'no-empty-character-class': ['error'],
56+
'no-empty-pattern': ['error'],
57+
'no-ex-assign': ['error'],
58+
'no-extra-boolean-cast': ['error'],
59+
'no-extra-semi': 'off',
60+
'no-fallthrough': 'off',
61+
'no-func-assign': ['error'],
62+
'no-global-assign': ['error'],
63+
'no-inner-declarations': ['error'],
64+
'no-invalid-regexp': ['error'],
65+
'no-irregular-whitespace': 'off',
66+
'no-misleading-character-class': ['error'],
67+
'no-mixed-spaces-and-tabs': ['error'],
68+
'no-new-symbol': ['error'],
69+
'no-obj-calls': ['error'],
70+
'no-octal': ['error'],
71+
'no-prototype-builtins': ['error'],
72+
'no-redeclare': 'warn',
73+
'no-regex-spaces': ['error'],
74+
'no-self-assign': ['error'],
75+
'no-shadow-restricted-names': ['error'],
76+
'no-sparse-arrays': ['error'],
77+
'no-this-before-super': ['error'],
78+
'no-undef': ['error'],
79+
'no-unexpected-multiline': ['error'],
80+
'no-unreachable': ['error'],
81+
'no-unsafe-finally': 'error',
82+
'no-unsafe-negation': ['error'],
83+
'no-unused-labels': 'error',
84+
'no-useless-catch': ['error'],
85+
'no-useless-escape': 'warn',
86+
'no-with': ['error'],
87+
'require-yield': ['error'],
88+
'use-isnan': 'error',
89+
'valid-typeof': 'off',
90+
'@typescript-eslint/no-unused-vars': ["error", { "argsIgnorePattern": "^_" }],
91+
'@typescript-eslint/adjacent-overload-signatures': 'error',
92+
'@typescript-eslint/array-type': [
93+
'warn',
94+
{
95+
default: 'array',
96+
},
97+
],
98+
'@typescript-eslint/ban-types': [
99+
'error',
100+
{
101+
types: {
102+
Object: {
103+
message: 'Avoid using the `Object` type. Did you mean `object`?',
104+
},
105+
Function: {
106+
message: 'Avoid using the `Function` type. Prefer a specific function type, like `() => void`.',
107+
},
108+
Boolean: {
109+
message: 'Avoid using the `Boolean` type. Did you mean `boolean`?',
110+
},
111+
Number: {
112+
message: 'Avoid using the `Number` type. Did you mean `number`?',
113+
},
114+
String: {
115+
message: 'Avoid using the `String` type. Did you mean `string`?',
116+
},
117+
Symbol: {
118+
message: 'Avoid using the `Symbol` type. Did you mean `symbol`?',
119+
},
120+
},
121+
},
122+
],
123+
'@typescript-eslint/class-name-casing': 'error',
124+
'@typescript-eslint/prefer-regexp-exec': 'warn',
125+
'@typescript-eslint/prefer-string-starts-ends-with': 'warn',
126+
'@typescript-eslint/unbound-method': 'off',
127+
'@typescript-eslint/prefer-includes': 'warn',
128+
'@typescript-eslint/consistent-type-assertions': 'error',
129+
'@typescript-eslint/consistent-type-definitions': 'error',
130+
'@typescript-eslint/explicit-member-accessibility': [
131+
'error',
132+
{
133+
accessibility: 'no-public',
134+
},
135+
],
136+
'@typescript-eslint/interface-name-prefix': 'off',
137+
'@typescript-eslint/member-delimiter-style': [
138+
'error',
139+
{
140+
multiline: {
141+
delimiter: 'none',
142+
requireLast: true,
143+
},
144+
singleline: {
145+
delimiter: 'semi',
146+
requireLast: false,
147+
},
148+
},
149+
],
150+
'@typescript-eslint/require-await': 'off',
151+
'@typescript-eslint/ban-ts-ignore': 'off',
152+
'@typescript-eslint/no-empty-function': ['error', { 'allow': ['arrowFunctions']}],
153+
'@typescript-eslint/no-empty-interface': 'off',
154+
'@typescript-eslint/explicit-function-return-type': 'off',
155+
'@typescript-eslint/no-explicit-any': 'off',
156+
'@typescript-eslint/no-for-in-array': 'error',
157+
'@typescript-eslint/no-inferrable-types': 'error',
158+
'@typescript-eslint/no-misused-new': 'error',
159+
'@typescript-eslint/no-namespace': 'warn',
160+
'@typescript-eslint/no-non-null-assertion': 'off',
161+
'@typescript-eslint/no-parameter-properties': 'off',
162+
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
163+
'@typescript-eslint/no-use-before-define': 'off',
164+
'@typescript-eslint/no-var-requires': 'off',
165+
'@typescript-eslint/prefer-for-of': 'off',
166+
'@typescript-eslint/prefer-function-type': 'error',
167+
'@typescript-eslint/prefer-namespace-keyword': 'error',
168+
'@typescript-eslint/prefer-readonly': 'error',
169+
'@typescript-eslint/triple-slash-reference': [
170+
'error',
171+
{
172+
path: 'always',
173+
types: 'prefer-import',
174+
lib: 'always',
175+
},
176+
],
177+
'@typescript-eslint/type-annotation-spacing': 'off',
178+
'@typescript-eslint/unified-signatures': 'error',
179+
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
180+
'arrow-body-style': 'warn',
181+
'arrow-parens': ['off', 'always'],
182+
'brace-style': ['off', 'off'],
183+
camelcase: 'warn',
184+
'class-methods-use-this': 'warn',
185+
complexity: 'off',
186+
curly: ['warn', 'multi-line'],
187+
'default-case': 'error',
188+
'dot-notation': 'error',
189+
'eol-last': 'off',
190+
eqeqeq: ['error', 'smart'],
191+
'guard-for-in': 'error',
192+
'id-match': 'error',
193+
'jsdoc/check-alignment': 'error',
194+
'jsdoc/check-indentation': 'error',
195+
'jsdoc/newline-after-description': 'warn',
196+
'max-classes-per-file': 'off',
197+
'max-len': 'off',
198+
'new-parens': 'off',
199+
'newline-per-chained-call': 'off',
200+
'no-bitwise': 'off',
201+
'no-caller': 'error',
202+
'no-duplicate-imports': 'error',
203+
'no-eval': 'error',
204+
'no-invalid-this': 'off',
205+
'no-multiple-empty-lines': 'off',
206+
'no-new-wrappers': 'error',
207+
'no-return-await': 'error',
208+
'no-shadow': [
209+
'off',
210+
{
211+
hoist: 'all',
212+
},
213+
],
214+
'no-template-curly-in-string': 'error',
215+
'no-throw-literal': 'error',
216+
'no-trailing-spaces': 'off',
217+
'no-undef-init': 'error',
218+
'no-underscore-dangle': 'off',
219+
'no-unused-expressions': 'error',
220+
'no-var': 'error',
221+
'object-shorthand': 'error',
222+
'one-var': ['error', 'never'],
223+
'prefer-const': 'warn',
224+
'prefer-object-spread': 'error',
225+
'prefer-template': 'error',
226+
'quote-props': 'off',
227+
radix: 'error',
228+
'space-before-function-paren': 'off',
229+
'space-in-parens': ['off', 'never'],
230+
'spaced-comment': [
231+
'warn',
232+
'always',
233+
{
234+
markers: ['/'],
28235
},
29236
],
30237
},
238+
settings: {},
31239
}

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ tsconfig.json
6666
.prettierrc
6767
.travis.yml
6868
tsconfig.build.json
69-
tslint.json
7069
.npmrc
7170
.markdownlint.yaml
7271
.cache

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
<a name="25.5.0"></a>
2+
# [25.5.0](https://github.com/kulshekhar/ts-jest/compare/v25.4.0...v25.5.0) (2020-05-05)
3+
4+
5+
### Bug Fixes
6+
7+
* **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))
8+
* **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))
9+
* **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))
10+
11+
12+
### Features
13+
14+
* **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))
15+
* **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))
16+
17+
18+
### Performance Improvements
19+
20+
* **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))
21+
* **compiler:** improve performance for `isolatedModules: false` ([#1558](https://github.com/kulshekhar/ts-jest/issues/1558)) ([85c09e3](https://github.com/kulshekhar/ts-jest/commit/85c09e3))
22+
23+
24+
### BREAKING CHANGES
25+
26+
* 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`.
27+
28+
For example:
29+
```
30+
// tsconfig.json
31+
{
32+
// ...other configs
33+
"files": [
34+
"my-custom-typings.d.ts".
35+
"my-global-module.ts"
36+
]
37+
}
38+
```
39+
* **compiler:** `incremental` and `compilerHost` options are no longer available. Please remove it from your `ts-jest` config.
40+
41+
42+
143
<a name="25.5.0-beta.0"></a>
244
# [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)
345

appveyor.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

docs/user/config/index.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,23 @@ module.exports = {
181181

182182
</div></div>
183183

184+
#### IDE `ts-jest` config suggestion
185+
186+
To ultilize IDE suggestion, you can use `JSDOC` to provide suggested `ts-jest` configs for your Jest config:
187+
188+
```js
189+
/** @type {import('@jest/types').Config.InitialOptions} */
190+
/** @typedef {import('ts-jest')} */
191+
module.exports = {
192+
// [...]
193+
globals: {
194+
'ts-jest': {
195+
// ts-jest configuration goes here and your IDE will suggest which configs when typing
196+
}
197+
}
198+
};
199+
```
200+
184201
### Options
185202

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

0 commit comments

Comments
 (0)