Skip to content

Commit 951110a

Browse files
committed
Add .svelte to default shouldLint regex [publish]
1 parent 9306001 commit 951110a

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 1.5.0
4+
5+
- Support async formatters ([#17](https://github.com/nabla/vite-plugin-eslint/pull/17))
6+
- Add `.svelte` to default shouldLint regex
7+
38
## 1.4.2
49

510
Add vite@4 to peer dependency range

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ Note: the `fix` option is only supported from `1.3.4`
3838
### shouldLint
3939

4040
- Type: `(path: string) => boolean`
41-
- Default: `(path) => path.match(/\/src\/[^?]*\.(vue|m?[jt]sx?)$/)`
41+
- Default: `(path) => path.match(/\/src\/[^?]*\.(vue|svelte|m?[jt]sx?)$/)`
4242

4343
You can use `DEBUG=eslint node_modules/.bin/vite` to debug this option (available in `1.4.0`)
4444

4545
### formatter
4646

4747
- Type: `string`
4848

49-
If provided, the value is passed to `eslint.loadFormatter`. Default to a custom format with one line per warning/error. Use `stylish` to get a CRA like output.
49+
If provided, the value is passed to `eslint.loadFormatter`. Default to a custom format with one line per warning/error. Use `stylish` to get a CRA like output. Async formatters are supported in `1.5.0`.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@nabla/vite-plugin-eslint",
33
"description": "Plugs ESLint into Vite dev server",
4-
"version": "1.4.2",
4+
"version": "1.5.0",
55
"license": "MIT",
66
"author": "Arnaud Barré (https://github.com/ArnaudBarre)",
77
"main": "src/index.js",

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const { normalizePath } = require("vite");
66
module.exports = function eslintPlugin(options = {}) {
77
const {
88
eslintOptions = {},
9-
shouldLint = (path) => path.match(/\/src\/[^?]*\.(vue|m?[jt]sx?)$/),
9+
shouldLint = (path) => path.match(/\/src\/[^?]*\.(vue|svelte|m?[jt]sx?)$/),
1010
formatter,
1111
} = options;
1212

0 commit comments

Comments
 (0)