-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
61 additions
and
12 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
test/fixtures/integrations/script-setup-with-typescript-eslint/.eslintrc.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"], | ||
}; |
10 changes: 0 additions & 10 deletions
10
test/fixtures/integrations/script-setup-with-typescript-eslint/.eslintrc.json
This file was deleted.
Oops, something went wrong.
6 changes: 4 additions & 2 deletions
6
test/fixtures/integrations/script-setup-with-typescript-eslint/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...s/integrations/script-setup-with-typescript-eslint/ts-no-unsafe-assignment/.eslintrc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"rules": { | ||
"@typescript-eslint/no-unsafe-assignment": "error" | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...tegrations/script-setup-with-typescript-eslint/ts-no-unsafe-assignment/valid-generic1.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
9 changes: 9 additions & 0 deletions
9
...tegrations/script-setup-with-typescript-eslint/ts-no-unsafe-assignment/valid-generic2.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
19 changes: 19 additions & 0 deletions
19
test/fixtures/integrations/script-setup-with-typescript-eslint/tsconfig.test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] | ||
} |
1 change: 1 addition & 0 deletions
1
test/fixtures/integrations/script-setup-with-typescript-eslint/vue.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference types="vue/macros-global" /> |