Skip to content

Commit 8ae9ef6

Browse files
authored
Convert ESLint config to TypeScript (#777)
1 parent 212f64b commit 8ae9ef6

20 files changed

+47
-21
lines changed
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// @ts-check
2-
31
import eslintJs from '@eslint/js';
42
import eslintConfigPackageJson from 'eslint-plugin-package-json/configs/recommended';
53
import eslintConfigPrettier from 'eslint-config-prettier';

package-lock.json

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@
4646
},
4747
"devDependencies": {
4848
"@eslint/js": "^9.18.0",
49+
"@types/eslint-config-prettier": "^6.11.3",
4950
"@vitest/eslint-plugin": "^1.1.25",
5051
"eslint": "^9.18.0",
5152
"eslint-config-prettier": "^10.0.1",
5253
"eslint-plugin-package-json": "^0.19.0",
5354
"eslint-plugin-unicorn": "^56.0.1",
55+
"jiti": "^2.4.2",
5456
"lefthook": "^1.10.4",
5557
"markdownlint-cli": "^0.43.0",
5658
"prettier": "3.4.2",

tsconfig.build.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,12 @@
33
"compilerOptions": {
44
"rootDir": "./src"
55
},
6-
"exclude": ["vitest.config.ts", "tests", "type-tests", "node_modules", "dist"]
6+
"exclude": [
7+
"eslint.config.mts",
8+
"vitest.config.ts",
9+
"tests",
10+
"type-tests",
11+
"node_modules",
12+
"dist"
13+
]
714
}

tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"compilerOptions": {
33
"target": "es2019",
4-
"module": "commonjs",
5-
"moduleResolution": "node",
4+
"module": "NodeNext",
5+
"moduleResolution": "NodeNext",
66
"declaration": true,
77
"outDir": "./dist/",
88
"esModuleInterop": true,
99
"forceConsistentCasingInFileNames": true,
1010
"strict": true,
1111
"skipLibCheck": true
1212
},
13-
"include": ["**/*.ts"]
13+
"include": ["**/*.ts", "eslint.config.mts"]
1414
}

type-tests/prop-types/any.type.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect, test } from 'tstyche';
22
import type * as Vue2_6 from 'vue2-6/types/options';
33
import type * as Vue2_7 from 'vue2-7/types/options';
4-
import type * as Vue3 from '@vue/runtime-core/dist/runtime-core';
4+
import type * as Vue3 from '@vue/runtime-core';
55
import { anyProp } from '../../src/prop-types/any';
66
import { createVue2Component } from '../utils';
77
import type { Vue2ComponentWithProp } from '../utils';

type-tests/prop-types/array.type.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect, test } from 'tstyche';
22
import type * as Vue2_6 from 'vue2-6/types/options';
33
import type * as Vue2_7 from 'vue2-7/types/options';
4-
import type * as Vue3 from '@vue/runtime-core/dist/runtime-core';
4+
import type * as Vue3 from '@vue/runtime-core';
55
import { arrayProp } from '../../src/prop-types/array';
66
import { createVue2Component } from '../utils';
77
import type { Vue2ComponentWithProp } from '../utils';

type-tests/prop-types/boolean.type.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect, test } from 'tstyche';
22
import type * as Vue2_6 from 'vue2-6/types/options';
33
import type * as Vue2_7 from 'vue2-7/types/options';
4-
import type * as Vue3 from '@vue/runtime-core/dist/runtime-core';
4+
import type * as Vue3 from '@vue/runtime-core';
55
import { booleanProp } from '../../src/prop-types/boolean';
66
import { createVue2Component } from '../utils';
77
import type { Vue2ComponentWithProp } from '../utils';

type-tests/prop-types/date.type.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect, test } from 'tstyche';
22
import type * as Vue2_6 from 'vue2-6/types/options';
33
import type * as Vue2_7 from 'vue2-7/types/options';
4-
import type * as Vue3 from '@vue/runtime-core/dist/runtime-core';
4+
import type * as Vue3 from '@vue/runtime-core';
55
import { dateProp } from '../../src/prop-types/date';
66
import { createVue2Component } from '../utils';
77
import type { Vue2ComponentWithProp } from '../utils';

type-tests/prop-types/function.type.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect, test } from 'tstyche';
22
import type * as Vue2_6 from 'vue2-6/types/options';
33
import type * as Vue2_7 from 'vue2-7/types/options';
4-
import type * as Vue3 from '@vue/runtime-core/dist/runtime-core';
4+
import type * as Vue3 from '@vue/runtime-core';
55
import { functionProp } from '../../src/prop-types/function';
66
import { createVue2Component } from '../utils';
77
import type { Vue2ComponentWithProp } from '../utils';

0 commit comments

Comments
 (0)