Skip to content

Commit

Permalink
chore(eslint): upgrade www to eslint v9
Browse files Browse the repository at this point in the history
  • Loading branch information
hougesen committed Sep 3, 2024
1 parent 4b1f8e4 commit dc0a338
Show file tree
Hide file tree
Showing 8 changed files with 410 additions and 430 deletions.
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ export default [
},
},
{
ignores: ['dist', './dist/*'],
ignores: ['dist', './dist/*', 'www'],
},
];
30 changes: 30 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
},
"devDependencies": {
"@eslint/js": "^9.9.1",
"@types/eslint": "~9.6.1",
"@types/eslint__js": "~8.42.3",
"eslint": "^9.9.1",
"globals": "^15.9.0",
"prettier": "^3.3.1",
Expand Down
13 changes: 0 additions & 13 deletions www/.eslintignore

This file was deleted.

26 changes: 0 additions & 26 deletions www/.eslintrc.cjs

This file was deleted.

48 changes: 48 additions & 0 deletions www/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// @ts-check

import pluginJs from '@eslint/js';
import eslintPluginSvelte from 'eslint-plugin-svelte';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default [
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{ languageOptions: { globals: globals.node } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
...eslintPluginSvelte.configs['flat/recommended'],
{
rules: {
'object-shorthand': 'error',
'@typescript-eslint/array-type': [
'error',
{
default: 'array-simple',
},
],
'@typescript-eslint/consistent-indexed-object-style': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
'no-duplicate-imports': 'error',
'@typescript-eslint/no-empty-object-type': [
'error',
{
allowInterfaces: 'with-single-extends',
},
],
},
},
{
ignores: ['dist', './dist/*', '.svelte-kit'],
},
];
Loading

0 comments on commit dc0a338

Please sign in to comment.