Skip to content

Commit b433651

Browse files
committed
wip
1 parent ff739aa commit b433651

File tree

8 files changed

+333
-413
lines changed

8 files changed

+333
-413
lines changed

README.md

+167-210
Large diffs are not rendered by default.

docs/README.md

+24-42
Original file line numberDiff line numberDiff line change
@@ -2,63 +2,45 @@
22
title: 'eslint-plugin-svelte'
33
---
44

5-
# Introduction
5+
## Introduction
66

7-
`eslint-plugin-svelte` is the official [ESLint] plugin for [Svelte].
8-
It provides many unique check rules by using the template AST.
9-
You can check on the [Online DEMO](https://eslint-online-playground.netlify.app/#eslint-plugin-svelte%20with%20typescript).
7+
`eslint-plugin-svelte` is the official [ESLint](https://eslint.org/) plugin for [Svelte](https://svelte.dev/).
8+
It leverages the AST generated by [svelte-eslint-parser](https://github.com/sveltejs/svelte-eslint-parser) to provide custom linting for Svelte.
9+
Note that `eslint-plugin-svelte` and `svelte-eslint-parser` cannot be used alongside [eslint-plugin-svelte3](https://github.com/sveltejs/eslint-plugin-svelte3).
1010

11-
> [!NOTE]
12-
> This document is in development.\
13-
> Please refer to the document for the version you are using.\
14-
> For example, <https://github.com/sveltejs/eslint-plugin-svelte/blob/eslint-plugin-svelte%402.46.0/README.md>
15-
> and <https://github.com/sveltejs/eslint-plugin-svelte/blob/eslint-plugin-svelte%402.46.0/docs>
16-
17-
[![NPM license](https://img.shields.io/npm/l/eslint-plugin-svelte.svg)](https://www.npmjs.com/package/eslint-plugin-svelte)
18-
[![NPM version](https://img.shields.io/npm/v/eslint-plugin-svelte.svg)](https://www.npmjs.com/package/eslint-plugin-svelte)
19-
[![NPM downloads](https://img.shields.io/badge/dynamic/json.svg?label=downloads&colorB=green&suffix=/day&query=$.downloads&uri=https://api.npmjs.org//downloads/point/last-day/eslint-plugin-svelte&maxAge=3600)](http://www.npmtrends.com/eslint-plugin-svelte)
20-
[![NPM downloads](https://img.shields.io/npm/dw/eslint-plugin-svelte.svg)](http://www.npmtrends.com/eslint-plugin-svelte)
21-
[![NPM downloads](https://img.shields.io/npm/dm/eslint-plugin-svelte.svg)](http://www.npmtrends.com/eslint-plugin-svelte)
22-
[![NPM downloads](https://img.shields.io/npm/dy/eslint-plugin-svelte.svg)](http://www.npmtrends.com/eslint-plugin-svelte)
23-
[![NPM downloads](https://img.shields.io/npm/dt/eslint-plugin-svelte.svg)](http://www.npmtrends.com/eslint-plugin-svelte)
24-
[![Build Status](https://github.com/sveltejs/eslint-plugin-svelte/workflows/CI/badge.svg?branch=main)](https://github.com/sveltejs/eslint-plugin-svelte/actions?query=workflow%3ACI)
25-
26-
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fsveltejs%2Feslint-plugin-svelte%2Fmain%2Fpackage.json)](https://github.com/plantain-00/type-coverage)
27-
[![Conventional Commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
28-
[![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
29-
[![changesets](https://img.shields.io/badge/maintained%20with-changesets-176de3.svg)](https://github.com/atlassian/changesets)
30-
31-
## :name_badge: What is this plugin?
11+
## Installation
3212

33-
[ESLint] plugin for [Svelte].
34-
It provides many unique check rules using the AST generated by [svelte-eslint-parser].
13+
```bash
14+
npm install --save-dev svelte eslint eslint-plugin-svelte globals
15+
```
3516

36-
### ❗ Attention
17+
> [!NOTE]
18+
>
19+
> **Requirements:**
20+
>
21+
> - ESLint v8.57.1, v9.0.0, and above
22+
> - Node.js v18.20.4, v20.18.0, v22.10.0, and above
3723
38-
#### Cannot be used with eslint-plugin-svelte3
24+
## Configuration
3925

40-
The [svelte-eslint-parser] and the `eslint-plugin-svelte` can not be used with the [eslint-plugin-svelte3].
26+
See [User Guide](./user-guide.md).
4127

42-
[svelte-eslint-parser]: https://github.com/sveltejs/svelte-eslint-parser
43-
[eslint-plugin-svelte3]: https://github.com/sveltejs/eslint-plugin-svelte3
28+
## Migration Guide
4429

45-
#### Experimental support for Svelte v5
30+
If you’re migrating from `eslint-plugin-svelte` v1 or [`@ota-meshi/eslint-plugin-svelte`](https://www.npmjs.com/package/@ota-meshi/eslint-plugin-svelte), see the [migration guide](./migration.md).
4631

47-
We are working on support for Svelte v5, but it is still an experimental feature. Please note that rules and features related to Svelte v5 may be changed or removed in minor versions without notice.
32+
## Versioning Policy
4833

49-
## :book: Usage
34+
This project follows [Semantic Versioning](https://semver.org/). Unlike [ESLint’s versioning policy](https://github.com/eslint/eslint#semantic-versioning-policy), new rules may be added in minor releases. If these new rules cause unwanted warnings, you can disable them.
5035

51-
See [User Guide](./user-guide.md).
36+
<!--DOCS_IGNORE_END-->
5237

53-
## :white_check_mark: Rules
38+
## Rules
5439

5540
<!-- prettier-ignore-start -->
5641
See [Available Rules](./rules.md).
5742
<!-- prettier-ignore-end -->
5843

59-
## :lock: License
60-
61-
See the [LICENSE](https://github.com/sveltejs/eslint-plugin-svelte/blob/main/LICENSE) file for license rights and limitations (MIT).
44+
## License
6245

63-
[svelte]: https://svelte.dev/
64-
[eslint]: https://eslint.org/
46+
See [LICENSE](https://github.com/sveltejs/eslint-plugin-svelte/blob/main/LICENSE) (MIT).

docs/rules/no-export-load-in-svelte-module-in-kit-pages.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ And the API has changed.
3434

3535
## :wrench: Options
3636

37-
Nothing. But if you are not using the default routes folder, please set configuration according to the [user guide](../user-guide.md#settings-svelte-kit).
37+
Nothing. But if you are not using the default routes folder, please set configuration according to the [user guide](../user-guide.md).
3838

3939
## :books: Further Reading
4040

docs/rules/valid-compile.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default [
5050
];
5151
```
5252

53-
See also [User Guide > Specify `svelte.config.js`](../user-guide.md#specify-svelte-config-js)
53+
See also [User Guide > Configuration](../user-guide.md#configuration)
5454

5555
#### warningFilter
5656

docs/rules/valid-prop-names-in-kit-pages.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ At SvelteKit v1.0.0-next.405, instead of having multiple props corresponding to
4141

4242
## :wrench: Options
4343

44-
Nothing. But if use are using not default routes folder, please set configuration according to the [user guide](../user-guide.md#settings-svelte-kit).
44+
Nothing. But if use are using not default routes folder, please set configuration according to the [user guide](../user-guide.md).
4545

4646
## :books: Further Reading
4747

0 commit comments

Comments
 (0)