Skip to content

Commit

Permalink
add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed May 11, 2023
1 parent ce16b00 commit aaf3908
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"use strict";

module.exports = {
root: true,
parser: require.resolve("../../../../src/index.ts"),
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
parser: "@typescript-eslint/parser",
project: require.resolve("./tsconfig.test.json"),
extraFileExtensions: ['.vue']
},
plugins: ["@typescript-eslint"],
};

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"devDependencies": {
"eslint": "^8.8.0",
"@typescript-eslint/parser": "^5.10.2",
"@typescript-eslint/eslint-plugin": "^5.10.2"
"@typescript-eslint/parser": "^5.57.0",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"vue": "^3.2.47",
"typescript": "^5.0.2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rules": {
"@typescript-eslint/no-unsafe-assignment": "error"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts" generic="AType">
interface Props {
a: AType;
b: string;
}
const props = defineProps<Props>()
const x = props.a
const y = props.b
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts" generic="AType extends string">
interface Props {
a: AType;
b: string;
}
const props = defineProps<Props>()
const x = props.a
const y = props.b
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"module": "ESNext",
"moduleResolution": "Node",
"strict": true,
"jsx": "preserve",
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
"lib": ["ESNext", "DOM"],
"skipLibCheck": true,
"noEmit": true,
"checkJs": true,
"allowJs": true
},
"include": ["./vue.d.ts", "**/*.ts", "**/*.vue"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vue/macros-global" />

0 comments on commit aaf3908

Please sign in to comment.