Skip to content
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: 3 additions & 1 deletion .github/workflows/lint-svelte-kit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ jobs:
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "20"
cache: npm
cache-dependency-path: kit/package-lock.json

- name: Install dependencies
run: npm install ci
run: npm ci
working-directory: kit

- name: Checking lint/format errors
Expand Down
13 changes: 0 additions & 13 deletions kit/.eslintignore

This file was deleted.

43 changes: 0 additions & 43 deletions kit/.eslintrc.cjs

This file was deleted.

1 change: 0 additions & 1 deletion kit/.npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
engine-strict=true
resolution-mode=highest
57 changes: 57 additions & 0 deletions kit/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import js from "@eslint/js";
import prettier from "eslint-config-prettier";
import svelte from "eslint-plugin-svelte";
import globals from "globals";
import ts from "typescript-eslint";

export default ts.config(
{
ignores: ["**/*.cjs", "build/", ".svelte-kit/", "package/", "static/"],
},
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs.recommended,
prettier,
...svelte.configs.prettier,
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
// Injected at build time via Vite `define` (see vite.config.ts)
__DOCS_LIBRARY__: "readonly",
__DOCS_VERSION__: "readonly",
__DOCS_LANGUAGE__: "readonly",
},
},
},
{
files: ["**/*.svelte"],
languageOptions: {
parserOptions: {
parser: ts.parser,
},
},
},
{
rules: {
"no-shadow": ["error"],
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-unused-vars": [
// prevent variables with a _ prefix from being marked as unused
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
// The whole point of doc-builder is rendering generated (trusted) HTML
"svelte/no-at-html-tags": "off",
// Doc links are plain prerendered hrefs by design
"svelte/no-navigation-without-resolve": "off",
// Pre-existing unkeyed each blocks; keying them changes update semantics
"svelte/require-each-key": "off",
},
}
);
Loading