mirror of
https://github.com/jwetzell/psn-js.git
synced 2026-08-20 14:39:11 +00:00
add new eslint
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import pluginJs from '@eslint/js';
|
||||
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
||||
import globals from 'globals';
|
||||
import tseslint from 'typescript-eslint';
|
||||
|
||||
/** @type {import('eslint').Linter.Config[]} */
|
||||
export default [
|
||||
{ files: ['**/*.{js,mjs,cjs,ts}'] },
|
||||
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
|
||||
pluginJs.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
eslintPluginPrettierRecommended,
|
||||
];
|
||||
Generated
+1486
-4
File diff suppressed because it is too large
Load Diff
+8
-2
@@ -21,7 +21,7 @@
|
||||
"example:client": "node examples/psn_client.js",
|
||||
"example:server": "node examples/psn_server.js",
|
||||
"prepublishOnly": "npm run build",
|
||||
"lint:check": "eslint ./",
|
||||
"lint:check": "eslint ./src",
|
||||
"format:check": "prettier ./ --check",
|
||||
"format:write": "prettier ./ --write"
|
||||
},
|
||||
@@ -36,9 +36,15 @@
|
||||
"repository": "https://github.com/jwetzell/psn-js",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.18.0",
|
||||
"@types/node": "22.10.2",
|
||||
"eslint": "^9.18.0",
|
||||
"eslint-config-prettier": "^10.0.1",
|
||||
"eslint-plugin-prettier": "^5.2.3",
|
||||
"globals": "^15.14.0",
|
||||
"prettier": "3.4.2",
|
||||
"rimraf": "6.0.1",
|
||||
"typescript": "5.7.2"
|
||||
"typescript": "5.7.2",
|
||||
"typescript-eslint": "^8.20.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ export default (buffer: Uint8Array): InfoTrackerChunk => {
|
||||
const view = new DataView(chunk.chunkData.buffer, chunk.chunkData.byteOffset, chunk.chunkData.byteLength);
|
||||
const chunkId = view.getUint16(offset, true);
|
||||
switch (chunkId) {
|
||||
case 0x0000:
|
||||
case 0x0000: {
|
||||
const data: InfoTrackerChunkData = {
|
||||
trackerName: Decoders.InfoTrackerNameChunk(chunk.chunkData.subarray(offset)),
|
||||
};
|
||||
@@ -23,7 +23,7 @@ export default (buffer: Uint8Array): InfoTrackerChunk => {
|
||||
chunk,
|
||||
data,
|
||||
};
|
||||
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user