diff --git a/client/eslint.config.js b/client/eslint.config.js new file mode 100644 index 0000000..4202920 --- /dev/null +++ b/client/eslint.config.js @@ -0,0 +1,31 @@ +import tsParser from '@typescript-eslint/parser'; +import tsPlugin from '@typescript-eslint/eslint-plugin'; + +export default [ + { + ignores: ['dist/**', 'node_modules/**'], + }, + { + files: ['src/**/*.ts'], + languageOptions: { + parser: tsParser, + ecmaVersion: 'latest', + sourceType: 'module', + }, + plugins: { + '@typescript-eslint': tsPlugin, + }, + rules: { + 'no-undef': 'off', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + }, + ], + }, + }, +]; diff --git a/client/src/main.ts b/client/src/main.ts index d4fbd20..1dd9015 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -21,7 +21,6 @@ import { getDirection, getNearestItem, getNearestPeer, - type GameState, type ItemType, type WorldItem, } from './state/gameState';