add eslint and format scripts

This commit is contained in:
2024-11-04 19:25:19 -06:00
parent ca2848f92a
commit 4f846ccbd6
3 changed files with 3464 additions and 2 deletions
+12
View File
@@ -0,0 +1,12 @@
module.exports = {
env: {
node: true,
commonjs: true,
es2021: true,
},
extends: ['airbnb', 'prettier'],
parserOptions: {
ecmaVersion: 'latest',
},
ignorePatterns: ['**/node_modules', '**/dist'],
};
+3444
View File
File diff suppressed because it is too large Load Diff
+8 -2
View File
@@ -20,7 +20,10 @@
"build:types": "tsc -p tsconfig.types.json",
"example:client": "node examples/psn_client.js",
"example:server": "node examples/psn_server.js",
"prepublishOnly": "npm run build"
"prepublishOnly": "npm run build",
"lint:check": "eslint ./",
"format:check": "prettier ./ --check",
"format:write": "prettier ./ --write"
},
"files": [
"dist"
@@ -36,6 +39,9 @@
"@types/node": "22.8.7",
"prettier": "3.3.3",
"rimraf": "6.0.1",
"typescript": "5.6.3"
"typescript": "5.6.3",
"eslint": "8.48.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-prettier": "9.0.0"
}
}