Skip to content

Commit 7304842

Browse files
authored
chore: run typechecking on js files (#1782)
1 parent a0fdf44 commit 7304842

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

.eslint-doc-generatorrc.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ const config = {
2626
],
2727
ruleListSplit: 'meta.docs.requiresTypeChecking',
2828
urlConfigs: `https://github.com/jest-community/eslint-plugin-jest/blob/main/README.md#shareable-configurations`,
29-
postprocess: doc => format(doc, { ...prettierRC, parser: 'markdown' }),
29+
postprocess: doc =>
30+
format(doc, {
31+
.../** @type {import('prettier').ResolveConfigOptions} */ (prettierRC),
32+
parser: 'markdown',
33+
}),
3034
};
3135

3236
module.exports = config;

.eslintrc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
const globals = require('./src/globals.json');
44

5-
module.exports = {
5+
/** @type {import('eslint').Linter.LegacyConfig} */
6+
const config = {
67
ignorePatterns: ['!.eslint-doc-generatorrc.js', '!.eslintrc.js'],
78
parser: require.resolve('@typescript-eslint/parser'),
89
extends: [
@@ -126,3 +127,5 @@ module.exports = {
126127
},
127128
],
128129
};
130+
131+
module.exports = config;

babel.config.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
const semver = require('semver');
44
const pkg = require('./package.json');
55

6-
const supportedNodeVersion = semver.minVersion(pkg.engines.node).version;
6+
const supportedNodeVersion = semver.minVersion(pkg.engines.node)?.version;
77

88
// todo: https://github.com/babel/babel/issues/8529 :'(
9-
module.exports = {
9+
/** @type {import('@babel/core').TransformOptions} */
10+
const config = {
1011
plugins: ['replace-ts-export-assignment'],
1112
presets: [
1213
'@babel/preset-typescript',
1314
['@babel/preset-env', { targets: { node: supportedNodeVersion } }],
1415
],
1516
ignore: ['src/**/__tests__/fixtures/**'],
1617
};
18+
19+
module.exports = config;

tsconfig.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,17 @@
1414
"strict": true,
1515
"resolveJsonModule": true,
1616
"isolatedModules": true,
17-
"skipLibCheck": false
17+
"skipLibCheck": false,
18+
"allowJs": true,
19+
"checkJs": true
1820
},
19-
"files": ["eslint-remote-tester.config.ts"],
21+
"files": [
22+
".eslint-doc-generatorrc.js",
23+
".eslintrc.js",
24+
"babel.config.js",
25+
"eslint-remote-tester.config.ts",
26+
"jest.config.ts"
27+
],
2028
"include": ["src/**/*"],
2129
"exclude": ["src/rules/__tests__/fixtures/**/*"]
2230
}

0 commit comments

Comments
 (0)