-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: move the project to sveltekit 2 - has no impact on the generat…
…ed component
- Loading branch information
Showing
18 changed files
with
1,880 additions
and
1,997 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
#pnpm test | ||
# pnpm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import js from '@eslint/js'; | ||
import ts from 'typescript-eslint'; | ||
import svelte from 'eslint-plugin-svelte'; | ||
import prettier from 'eslint-config-prettier'; | ||
import globals from 'globals'; | ||
|
||
const __dirname = import.meta.dirname; | ||
// import { readGitignoreFiles } from './scripts/read-gitignore-files.js'; | ||
// import { readGitignoreFiles } from 'eslint-ignore'; | ||
import pkg from 'eslint-gitignore'; | ||
const { readGitignoreFiles } = pkg; | ||
|
||
function removeDuplicates(arr) { | ||
return arr.filter((value, index, self) => self.indexOf(value) === index); | ||
} | ||
|
||
/** @type {import('eslint').Linter.FlatConfig[]} */ | ||
export default [ | ||
js.configs.recommended, | ||
...ts.configs.recommended, | ||
...svelte.configs['flat/recommended'], | ||
prettier, | ||
...svelte.configs['flat/prettier'], | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
NodeJS: true | ||
} | ||
} | ||
}, | ||
{ | ||
files: ['**/*.svelte'], | ||
languageOptions: { | ||
parserOptions: { | ||
parser: ts.parser | ||
} | ||
} | ||
}, | ||
{ | ||
ignores: removeDuplicates([ | ||
...readGitignoreFiles({ cwd: __dirname }), | ||
'build/', | ||
'**/.svelte-kit/', | ||
'dist/', | ||
'package/', | ||
'**/_app/' | ||
]) | ||
}, | ||
{ | ||
rules: { | ||
// eqeqeq: 'error', | ||
'prefer-const': ['error', { ignoreReadBeforeAssign: true }], | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
// const _a = 'unused, with underscore, no warning' | ||
// const b = 'unused, no underscore, warning' | ||
// note you must disable the base rule | ||
// as it can report incorrect errors | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'warn', // or "error" | ||
{ | ||
argsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
caughtErrorsIgnorePattern: '^_' | ||
} | ||
], | ||
// We need to use {@html} in the demo site for code highlight | ||
'svelte/no-at-html-tags': 'off', | ||
// css is global and incorrectly reported as unused by the linter | ||
'svelte/valid-compile': 'off' | ||
} | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.