Skip to content

Commit 5359dd0

Browse files
committed
wip
1 parent 38a963b commit 5359dd0

File tree

3 files changed

+23
-62
lines changed

3 files changed

+23
-62
lines changed

README.md

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
1-
# Introduction
2-
3-
`eslint-plugin-svelte` is the official [ESLint] plugin for [Svelte].
4-
It provides many unique check rules by using the template AST.
5-
You can check on the [Online DEMO](https://eslint-online-playground.netlify.app/#eslint-plugin-svelte%20with%20typescript).
6-
7-
> [!NOTE]
8-
> This document is in development.\
9-
> Please refer to the document for the version you are using.\
10-
> For example, <https://github.com/sveltejs/eslint-plugin-svelte/blob/eslint-plugin-svelte%402.46.0/README.md>
11-
> and <https://github.com/sveltejs/eslint-plugin-svelte/blob/eslint-plugin-svelte%402.46.0/docs>
1+
<!--DOCS_IGNORE_START-->
122

133
[![NPM license](https://img.shields.io/npm/l/eslint-plugin-svelte.svg)](https://www.npmjs.com/package/eslint-plugin-svelte)
144
[![NPM version](https://img.shields.io/npm/v/eslint-plugin-svelte.svg)](https://www.npmjs.com/package/eslint-plugin-svelte)
@@ -24,23 +14,28 @@ You can check on the [Online DEMO](https://eslint-online-playground.netlify.app/
2414
[![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
2515
[![changesets](https://img.shields.io/badge/maintained%20with-changesets-176de3.svg)](https://github.com/atlassian/changesets)
2616

27-
## :name_badge: What is this plugin?
17+
<div align="center">
2818

29-
[ESLint] plugin for [Svelte].
30-
It provides many unique check rules using the AST generated by [svelte-eslint-parser].
19+
# eslint-plugin-svelte
3120

32-
### ❗ Attention
21+
### ESLint plugin for Svelte using AST
3322

34-
#### Cannot be used with eslint-plugin-svelte3
23+
[Live Demo](https://eslint-online-playground.netlify.app/#eslint-plugin-svelte%20with%20typescript)
24+
[Documentation](https://sveltejs.github.io/eslint-plugin-svelte/)
25+
[Discord](https://svelte.dev/chat)
3526

36-
The [svelte-eslint-parser] and the `eslint-plugin-svelte` can not be used with the [eslint-plugin-svelte3].
27+
</div>
3728

38-
[svelte-eslint-parser]: https://github.com/sveltejs/svelte-eslint-parser
39-
[eslint-plugin-svelte3]: https://github.com/sveltejs/eslint-plugin-svelte3
29+
<!--DOCS_IGNORE_END-->
30+
31+
# Introduction
4032

41-
#### Experimental support for Svelte v5
33+
`eslint-plugin-svelte` is the official [ESLint](https://eslint.org/) plugin for [Svelte](https://svelte.dev/).
34+
It offers a variety of unique linting rules by leveraging the AST generated by [svelte-eslint-parser](https://github.com/sveltejs/svelte-eslint-parser).
35+
It provides a variety of unique linting rules by utilizing the template AST.
4236

43-
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.
37+
> [!WARNING]
38+
> The [svelte-eslint-parser](https://github.com/sveltejs/svelte-eslint-parser) and `eslint-plugin-svelte` cannot be used alongside [eslint-plugin-svelte3](https://github.com/sveltejs/eslint-plugin-svelte3).
4439
4540
<!--DOCS_IGNORE_START-->
4641

docs/README.md

Lines changed: 5 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,12 @@ title: 'eslint-plugin-svelte'
44

55
# 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 offers a variety of unique linting rules by leveraging the AST generated by [svelte-eslint-parser](https://github.com/sveltejs/svelte-eslint-parser).
9+
It provides a variety of unique linting rules by utilizing the template AST.
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?
32-
33-
[ESLint] plugin for [Svelte].
34-
It provides many unique check rules using the AST generated by [svelte-eslint-parser].
35-
36-
### ❗ Attention
37-
38-
#### Cannot be used with eslint-plugin-svelte3
39-
40-
The [svelte-eslint-parser] and the `eslint-plugin-svelte` can not be used with the [eslint-plugin-svelte3].
41-
42-
[svelte-eslint-parser]: https://github.com/sveltejs/svelte-eslint-parser
43-
[eslint-plugin-svelte3]: https://github.com/sveltejs/eslint-plugin-svelte3
44-
45-
#### Experimental support for Svelte v5
46-
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.
11+
> [!WARNING]
12+
> The [svelte-eslint-parser](https://github.com/sveltejs/svelte-eslint-parser) and `eslint-plugin-svelte` cannot be used alongside [eslint-plugin-svelte3](https://github.com/sveltejs/eslint-plugin-svelte3).
4813
4914
## :book: Usage
5015

packages/eslint-plugin-svelte/tools/update-readme.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ ${newReadme
3838
)
3939
.replace(/<!--DOCS_IGNORE_START-->[\s\S]*?<!--DOCS_IGNORE_END-->/gu, '')
4040
.replace(
41-
/\(https:\/\/sveltejs.github.io\/eslint-plugin-svelte(.*?)\)/gu,
41+
/\(https:\/\/sveltejs.github.io\/eslint-plugin-svelte\/(.+)\)/gu,
4242
(_ptn, filepath: string) => {
4343
const [hash] = /(?:#.*)?$/u.exec(filepath)!;
4444
const pathWithoutHash = hash ? filepath.slice(0, -hash.length) : filepath;
4545
const normalizePathWithoutHash = pathWithoutHash.replace(/\/$/u, '');
46+
4647
const [file] = /[^/]+$/u.exec(normalizePathWithoutHash)!;
4748
const pathWithoutFile = file
4849
? normalizePathWithoutHash.slice(0, -file.length)

0 commit comments

Comments
 (0)