Skip to content

Commit 012452d

Browse files
committed
fix
1 parent f2cdfb3 commit 012452d

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,19 @@ You can use `parserOptions.parser` property to specify a custom parser to parse
118118
Other properties than parser would be given to the specified parser.
119119
For example:
120120

121-
```json
122-
{
123-
"parserOptions": {
124-
"parser": "@typescript-eslint/parser"
125-
}
126-
}
121+
```js
122+
import tsParser from "@typescript-eslint/parser";
123+
export default [
124+
{
125+
files: ["**/*.svelte", "*.svelte"],
126+
languageOptions: {
127+
parser: svelteParser,
128+
parserOptions: {
129+
parser: tsParser,
130+
},
131+
},
132+
},
133+
];
127134
```
128135

129136
For example, if you are using the `"@typescript-eslint/parser"`, and if you want to use TypeScript in `<script>` of `.svelte`, you need to add more `parserOptions` configuration.

0 commit comments

Comments
 (0)