Shows how to get repo export and walk it in TypeScript walktherepo.wisp.place
at main 1.5 kB view raw
1import { fileURLToPath } from 'node:url'; 2import { includeIgnoreFile } from '@eslint/compat'; 3import js from '@eslint/js'; 4import svelte from 'eslint-plugin-svelte'; 5import { defineConfig } from 'eslint/config'; 6import globals from 'globals'; 7import ts from 'typescript-eslint'; 8import svelteConfig from './svelte.config.js'; 9 10const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url)); 11 12export default defineConfig( 13 includeIgnoreFile(gitignorePath), 14 js.configs.recommended, 15 ...ts.configs.recommended, 16 ...svelte.configs.recommended, 17 { 18 languageOptions: { 19 globals: { ...globals.browser, ...globals.node } 20 }, 21 rules: { // typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects. 22 // see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors 23 'no-undef': 'off', 24 'quotes': ['error', 'single'], 25 'semi': ['error', 'always'], 26 'object-curly-spacing': ['error', 'always'] 27 } 28 }, 29 { 30 files: [ 31 '**/*.svelte', 32 '**/*.svelte.ts', 33 '**/*.svelte.js' 34 ], 35 languageOptions: { 36 parserOptions: { 37 projectService: true, 38 extraFileExtensions: ['.svelte'], 39 parser: ts.parser, 40 svelteConfig 41 } 42 } 43 } 44); 45