Skip to content

Commit

Permalink
chore: update various JS dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMakesGames committed Nov 5, 2024
1 parent db23a5c commit 0cca3a0
Show file tree
Hide file tree
Showing 23 changed files with 3,259 additions and 5,035 deletions.
28 changes: 0 additions & 28 deletions .eslintignore

This file was deleted.

41 changes: 0 additions & 41 deletions .eslintrc.cjs

This file was deleted.

82 changes: 82 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import globals from 'globals';
import pluginJs from '@eslint/js';
import tsEslint from 'typescript-eslint';
import eslintPluginSvelte from 'eslint-plugin-svelte';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import eslintConfigPrettier from 'eslint-config-prettier';

import svelteConfig from './svelte.config.mjs';

const extraFileExtensions = ['.svelte'];

/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ['**/*.{ts}'] },
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
pluginJs.configs.recommended,
// ts
...tsEslint.configs.recommended,
{
languageOptions: {
parserOptions: {
extraFileExtensions,
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
// svelte
...eslintPluginSvelte.configs['flat/recommended'],
{
files: ['**/*.svelte'],
languageOptions: {
parserOptions: {
extraFileExtensions,
parser: tsEslint.parser,
svelteConfig: svelteConfig,
},
},
},
// prettier
eslintConfigPrettier,
...eslintPluginSvelte.configs['flat/prettier'],
// other
{
plugins: {
'simple-import-sort': simpleImportSort,
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/strict-boolean-expressions': ['error', { allowNullableBoolean: true }],
'@typescript-eslint/no-unnecessary-condition': 'error',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
},
},
{
ignores: [
'.git/',
'.DS_Store/',
'node_modules/',
'src-tauri/',
'out/',
'dist/',
'build/',
'scripts/',
'resources/',
'examples/',
'patches/',
'package-lock.json',
// config files
'tailwind.config.ts',
'eslint.config.js',
'vite.config.ts',
'postcss.config.cjs',
'electron.vite.config.ts',
'svelte.config.mjs',
'commitlint.config.cjs',
],
},
];
5 changes: 4 additions & 1 deletion knip.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"entry": ["src/main/index.ts", "src/preload/index.ts", "src/renderer/src/main.ts"],
"project": ["*/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}", "src/**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}"],
"project": [
"*/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}",
"src/**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,svelte}"
],
"ignore": ["electron.vite.config.ts", "svelte.config.mjs"]
}
Loading

0 comments on commit 0cca3a0

Please sign in to comment.