-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4690b79
commit 835849f
Showing
15 changed files
with
920 additions
and
404 deletions.
There are no files selected for viewing
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,30 +1,23 @@ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:svelte/recommended', | ||
'prettier' | ||
], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], | ||
plugins: ['svelte3', '@typescript-eslint'], | ||
ignorePatterns: ['*.cjs'], | ||
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], | ||
settings: { | ||
'svelte3/typescript': () => require('typescript'), | ||
}, | ||
parserOptions: { | ||
sourceType: 'module', | ||
ecmaVersion: 2020, | ||
extraFileExtensions: ['.svelte'] | ||
}, | ||
env: { | ||
browser: true, | ||
es2017: true, | ||
node: true | ||
node: true, | ||
}, | ||
globals: { | ||
svelte: true, | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.svelte'], | ||
parser: 'svelte-eslint-parser', | ||
parserOptions: { | ||
parser: '@typescript-eslint/parser' | ||
} | ||
} | ||
] | ||
}; | ||
} |
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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: 'weekly' |
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,38 @@ | ||
name: Check | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 7 | ||
|
||
- name: Install npm deps | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Check the build | ||
run: pnpm run check | ||
|
||
- name: Code linting | ||
run: pnpm run lint | ||
|
||
- name: Check dependencies, unused code | ||
run: pnpm run knip |
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,9 +1,9 @@ | ||
{ | ||
"useTabs": true, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"semi": false, | ||
"trailingComma": "all", | ||
"printWidth": 100, | ||
"plugins": ["prettier-plugin-svelte"], | ||
"pluginSearchDirs": ["."], | ||
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] | ||
} |
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,35 @@ | ||
import sveltePreprocess from 'svelte-preprocess' | ||
import { preprocess, compile } from 'svelte/compiler' | ||
import type { KnipConfig } from 'knip' | ||
|
||
const sveltePreprocessor = sveltePreprocess() | ||
|
||
const config: KnipConfig = { | ||
ignore: [ | ||
'**/*.d.ts', | ||
'**/schemas.ts', | ||
'src/lib/objects/hello-world/index.ts', | ||
'src/lib/objects/external/iframe.svelte', | ||
'src/lib/objects/split/types.ts', | ||
'src/lib/objects/split/contracts/**/*', | ||
], | ||
paths: { | ||
// This ain't pretty, but Svelte basically does the same | ||
'$app/*': ['node_modules/@sveltejs/kit/src/runtime/app/*'], | ||
'$env/*': ['.svelte-kit/ambient.d.ts'], | ||
'$lib/*': ['src/lib/*'], | ||
}, | ||
compilers: { | ||
svelte: async (text: string) => { | ||
const processed = await preprocess(text, sveltePreprocessor, { filename: 'dummy.ts' }) | ||
const compiled = compile(processed.code) | ||
return compiled.js.code | ||
}, | ||
css: (text: string) => [...text.matchAll(/(?<=@)import[^;]+/g)].join('\n'), | ||
}, | ||
ignoreExportsUsedInFile: true, | ||
ignoreBinaries: ['docker'], | ||
ignoreDependencies: ['@typechain/ethers-v6'], | ||
} | ||
|
||
export default config |
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import type { PlaywrightTestConfig } from '@playwright/test'; | ||
import type { PlaywrightTestConfig } from '@playwright/test' | ||
|
||
const config: PlaywrightTestConfig = { | ||
webServer: { | ||
command: 'npm run build && npm run preview', | ||
port: 4173 | ||
port: 4173, | ||
}, | ||
testDir: 'tests', | ||
testMatch: /(.+\.)?(test|spec)\.[jt]s/ | ||
}; | ||
testMatch: /(.+\.)?(test|spec)\.[jt]s/, | ||
} | ||
|
||
export default config; | ||
export default config |
Oops, something went wrong.