Skip to content

fix spelling of SvelteKit #491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ These rules relate to possible syntax or logic errors in Svelte code:
| [svelte/no-dupe-style-properties](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dupe-style-properties/) | disallow duplicate style properties | :star: |
| [svelte/no-dupe-use-directives](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dupe-use-directives/) | disallow duplicate `use:` directives | |
| [svelte/no-dynamic-slot-name](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dynamic-slot-name/) | disallow dynamic slot name | :star::wrench: |
| [svelte/no-export-load-in-svelte-module-in-kit-pages](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-export-load-in-svelte-module-in-kit-pages/) | disallow exporting load functions in `*.svelte` module in Svelte Kit page components. | |
| [svelte/no-export-load-in-svelte-module-in-kit-pages](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-export-load-in-svelte-module-in-kit-pages/) | disallow exporting load functions in `*.svelte` module in SvelteKit page components. | |
| [svelte/no-not-function-handler](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-not-function-handler/) | disallow use of not function in event handler | :star: |
| [svelte/no-object-in-text-mustaches](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-object-in-text-mustaches/) | disallow objects in text mustache interpolation | :star: |
| [svelte/no-reactive-reassign](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-reactive-reassign/) | disallow reassigning reactive values | |
Expand All @@ -320,7 +320,7 @@ These rules relate to possible syntax or logic errors in Svelte code:
| [svelte/require-store-callbacks-use-set-param](https://sveltejs.github.io/eslint-plugin-svelte/rules/require-store-callbacks-use-set-param/) | store callbacks must use `set` param | |
| [svelte/require-store-reactive-access](https://sveltejs.github.io/eslint-plugin-svelte/rules/require-store-reactive-access/) | disallow to use of the store itself as an operand. Need to use $ prefix or get function. | :wrench: |
| [svelte/valid-compile](https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-compile/) | disallow warnings when compiling. | :star: |
| [svelte/valid-prop-names-in-kit-pages](https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-prop-names-in-kit-pages/) | disallow props other than data or errors in Svelte Kit page components. | |
| [svelte/valid-prop-names-in-kit-pages](https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-prop-names-in-kit-pages/) | disallow props other than data or errors in SvelteKit page components. | |

## Security Vulnerability

Expand Down
2 changes: 1 addition & 1 deletion docs-svelte-kit/tools/generate-routes.mts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const dirname = path.dirname(
),
)

/** Generate svelte kit routes files */
/** Generate SvelteKit routes files */
export default function generateRoutes(): void {
const srcRoot = path.join(dirname, "../../docs")
const distRoot = path.join(dirname, "../src/routes")
Expand Down
4 changes: 2 additions & 2 deletions docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ These rules relate to possible syntax or logic errors in Svelte code:
| [svelte/no-dupe-style-properties](./rules/no-dupe-style-properties.md) | disallow duplicate style properties | :star: |
| [svelte/no-dupe-use-directives](./rules/no-dupe-use-directives.md) | disallow duplicate `use:` directives | |
| [svelte/no-dynamic-slot-name](./rules/no-dynamic-slot-name.md) | disallow dynamic slot name | :star::wrench: |
| [svelte/no-export-load-in-svelte-module-in-kit-pages](./rules/no-export-load-in-svelte-module-in-kit-pages.md) | disallow exporting load functions in `*.svelte` module in Svelte Kit page components. | |
| [svelte/no-export-load-in-svelte-module-in-kit-pages](./rules/no-export-load-in-svelte-module-in-kit-pages.md) | disallow exporting load functions in `*.svelte` module in SvelteKit page components. | |
| [svelte/no-not-function-handler](./rules/no-not-function-handler.md) | disallow use of not function in event handler | :star: |
| [svelte/no-object-in-text-mustaches](./rules/no-object-in-text-mustaches.md) | disallow objects in text mustache interpolation | :star: |
| [svelte/no-reactive-reassign](./rules/no-reactive-reassign.md) | disallow reassigning reactive values | |
Expand All @@ -33,7 +33,7 @@ These rules relate to possible syntax or logic errors in Svelte code:
| [svelte/require-store-callbacks-use-set-param](./rules/require-store-callbacks-use-set-param.md) | store callbacks must use `set` param | |
| [svelte/require-store-reactive-access](./rules/require-store-reactive-access.md) | disallow to use of the store itself as an operand. Need to use $ prefix or get function. | :wrench: |
| [svelte/valid-compile](./rules/valid-compile.md) | disallow warnings when compiling. | :star: |
| [svelte/valid-prop-names-in-kit-pages](./rules/valid-prop-names-in-kit-pages.md) | disallow props other than data or errors in Svelte Kit page components. | |
| [svelte/valid-prop-names-in-kit-pages](./rules/valid-prop-names-in-kit-pages.md) | disallow props other than data or errors in SvelteKit page components. | |

## Security Vulnerability

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/no-export-load-in-svelte-module-in-kit-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
pageClass: "rule-details"
sidebarDepth: 0
title: "svelte/no-export-load-in-svelte-module-in-kit-pages"
description: "disallow exporting load functions in `*.svelte` module in Svelte Kit page components."
description: "disallow exporting load functions in `*.svelte` module in SvelteKit page components."
since: "v2.12.0"
---

# svelte/no-export-load-in-svelte-module-in-kit-pages

> disallow exporting load functions in `*.svelte` module in Svelte Kit page components.
> disallow exporting load functions in `*.svelte` module in SvelteKit page components.

## :book: Rule Details

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/valid-prop-names-in-kit-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
pageClass: "rule-details"
sidebarDepth: 0
title: "svelte/valid-prop-names-in-kit-pages"
description: "disallow props other than data or errors in Svelte Kit page components."
description: "disallow props other than data or errors in SvelteKit page components."
since: "v2.12.0"
---

# svelte/valid-prop-names-in-kit-pages

> disallow props other than data or errors in Svelte Kit page components.
> disallow props other than data or errors in SvelteKit page components.

## :book: Rule Details

Expand Down
4 changes: 2 additions & 2 deletions src/rules/no-export-load-in-svelte-module-in-kit-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ export default createRule("no-export-load-in-svelte-module-in-kit-pages", {
meta: {
docs: {
description:
"disallow exporting load functions in `*.svelte` module in Svelte Kit page components.",
"disallow exporting load functions in `*.svelte` module in SvelteKit page components.",
category: "Possible Errors",
// TODO Switch to recommended in the major version.
recommended: false,
},
schema: [],
messages: {
unexpected:
"disallow exporting load functions in `*.svelte` module in Svelte Kit page components.",
"disallow exporting load functions in `*.svelte` module in SvelteKit page components.",
},
type: "problem",
},
Expand Down
4 changes: 2 additions & 2 deletions src/rules/valid-prop-names-in-kit-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ export default createRule("valid-prop-names-in-kit-pages", {
meta: {
docs: {
description:
"disallow props other than data or errors in Svelte Kit page components.",
"disallow props other than data or errors in SvelteKit page components.",
category: "Possible Errors",
// TODO Switch to recommended in the major version.
recommended: false,
},
schema: [],
messages: {
unexpected:
"disallow props other than data or errors in Svelte Kit page components.",
"disallow props other than data or errors in SvelteKit page components.",
},
type: "problem",
},
Expand Down
6 changes: 3 additions & 3 deletions src/utils/svelte-kit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import { getPackageJson } from "./get-package-json"
const isRunOnBrowser = !fs.readFileSync

/**
* return true if it's a Svelte Kit page component.
* return true if it's a SvelteKit page component.
* @param context
* @returns
*/
export function isKitPageComponent(context: RuleContext): boolean {
// Hack: if it runs on browser, it regards as Svelte Kit project.
// Hack: if it runs on browser, it regards as SvelteKit project.
if (isRunOnBrowser) return true
if (!hasSvelteKit(context.getFilename())) return false
const routes =
Expand All @@ -40,7 +40,7 @@ export function isKitPageComponent(context: RuleContext): boolean {
* @returns
*/
function hasSvelteKit(filePath: string): boolean {
// Hack: if it runs on browser, it regards as Svelte Kit project.
// Hack: if it runs on browser, it regards as SvelteKit project.
if (isRunOnBrowser) return true
try {
const packageJson = getPackageJson(filePath)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- message: "disallow exporting load functions in `*.svelte` module in Svelte Kit page components."
- message: "disallow exporting load functions in `*.svelte` module in SvelteKit page components."
line: 2
column: 19
suggestions: null
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- message: "disallow exporting load functions in `*.svelte` module in Svelte Kit page components."
- message: "disallow exporting load functions in `*.svelte` module in SvelteKit page components."
line: 2
column: 16
suggestions: null
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
- message: disallow props other than data or errors in Svelte Kit page components.
- message: disallow props other than data or errors in SvelteKit page components.
line: 2
column: 14
suggestions: null
- message: disallow props other than data or errors in Svelte Kit page components.
- message: disallow props other than data or errors in SvelteKit page components.
line: 3
column: 14
suggestions: null
- message: disallow props other than data or errors in Svelte Kit page components.
- message: disallow props other than data or errors in SvelteKit page components.
line: 4
column: 16
suggestions: null
- message: disallow props other than data or errors in Svelte Kit page components.
- message: disallow props other than data or errors in SvelteKit page components.
line: 4
column: 21
suggestions: null
- message: disallow props other than data or errors in Svelte Kit page components.
- message: disallow props other than data or errors in SvelteKit page components.
line: 5
column: 22
suggestions: null
- message: disallow props other than data or errors in Svelte Kit page components.
- message: disallow props other than data or errors in SvelteKit page components.
line: 5
column: 37
suggestions: null