fix deps, configure eslint, prettier, typescript

This commit is contained in:
Elijah Duffy
2025-06-30 20:08:35 -07:00
parent e04c5f3274
commit f571b51c44
8 changed files with 1285 additions and 5 deletions

18
.gitignore vendored Normal file
View File

@@ -0,0 +1,18 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
node_modules
.pnp
.pnp.js
# testing
coverage
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
auto-install-peers = true

14
.prettierignore Normal file
View File

@@ -0,0 +1,14 @@
.DS_Store
node_modules
/build
/package
.env
.env.*
!.env.example
vite.config.js*
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
pnpm-workspace.yaml
package-lock.json
yarn.lock

6
.prettierrc Normal file
View File

@@ -0,0 +1,6 @@
{
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"useTabs": true
}

View File

@@ -1,3 +1,37 @@
import { config } from '@repo/eslint-config/index.js'; import prettier from 'eslint-config-prettier';
import js from '@eslint/js';
import { includeIgnoreFile } from '@eslint/compat';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
const gitignorePath = fileURLToPath(new URL('.gitignore', import.meta.url));
export default config; export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
prettier,
{
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
{
files: ['**/*.svelte'],
languageOptions: {
parserOptions: {
parser: ts.parser
}
}
},
{
rules: {
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-undef': 'off'
}
}
);

View File

@@ -22,9 +22,14 @@
"lint": "eslint ." "lint": "eslint ."
}, },
"devDependencies": { "devDependencies": {
"@repo/eslint-config": "workspace:*", "@eslint/compat": "^1.3.1",
"@repo/typescript-config": "workspace:*", "@eslint/js": "^9.30.0",
"eslint": "^9.24.0", "eslint": "^9.24.0",
"svelte": "^5.25.3" "eslint-config-prettier": "^10.1.5",
"globals": "^16.2.0",
"typescript-eslint": "^8.35.1"
},
"peerDependencies": {
"svelte": "^5.0.0"
} }
} }

1190
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

12
tsconfig.json Normal file
View File

@@ -0,0 +1,12 @@
{
"compilerOptions": {
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"module": "NodeNext",
"moduleResolution": "NodeNext"
}
}