Skip to content

Commit cf588c1

Browse files
committed
Add @typescript-eslint to support TypeScript tests
1 parent 52f8e85 commit cf588c1

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

.eslintrc.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,16 @@ module.exports = {
2727
// Uses `require.resolve` to support npm linked eslint-config
2828
extends: require.resolve('eslint-config-ostai'),
2929
root: true,
30-
rules
30+
rules,
31+
overrides: [
32+
{
33+
files: ['*.ts', '*.cts', '*.mts'],
34+
extends: ['plugin:@typescript-eslint/recommended'],
35+
parser: '@typescript-eslint/parser',
36+
plugins: ['@typescript-eslint'],
37+
rules: {
38+
'@typescript-eslint/no-unused-vars': 'off'
39+
}
40+
}
41+
]
3142
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"@babel/cli": "^7.22.9",
6161
"@babel/core": "^7.22.9",
6262
"@babel/preset-env": "^7.22.9",
63+
"@typescript-eslint/eslint-plugin": "^8.19.1",
6364
"codecov": "^3.8.3",
6465
"debug": "^4.3.4",
6566
"eslint": "^8.46.0",

test/ts/simple.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
import ignore from '../../'
2-
import {
3-
Ignore,
4-
isPathValid
5-
} from '../../'
1+
import ignore, {isPathValid} from '../..'
2+
import type {Ignore} from '../..'
63

74
const equal = (actual, expect, message) => {
85
if (actual !== expect) {

0 commit comments

Comments
 (0)