Skip to content

Commit

Permalink
Merge pull request #4718 from JoergAtGithub/hid-parser-update
Browse files Browse the repository at this point in the history
Modernize and document common-hid-packet-parser.js
  • Loading branch information
Swiftb0y authored Nov 20, 2022
2 parents e231c56 + f0f184a commit 8affbbb
Show file tree
Hide file tree
Showing 2 changed files with 2,217 additions and 1,424 deletions.
92 changes: 65 additions & 27 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,80 +1,118 @@
{
"extends": ["eslint:recommended", "plugin:jsdoc/recommended"],
"extends": [ "eslint:recommended", "plugin:jsdoc/recommended" ],
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "script"
},
"env": {
"es6": true
},
"plugins": ["jsdoc"],
"plugins": [ "jsdoc" ],
"settings": {
"jsdoc": {
"preferredTypes": {
"object": "Object"
}
}
},
"rules": {
"array-bracket-spacing" : "warn",
"array-bracket-spacing": "warn",
"block-spacing": "warn",
"brace-style": ["warn", "1tbs", {
"brace-style": [
"warn",
"1tbs",
{
"allowSingleLine": true
}],
}
],
"curly": "warn",
"camelcase": "warn",
"comma-spacing": "warn",
"computed-property-spacing" : ["warn", "never", {
"computed-property-spacing": [
"warn",
"never",
{
"enforceForClassMembers": true
}],
"dot-location": ["warn", "property"],
}
],
"dot-location": [ "warn", "property" ],
"dot-notation": "warn",
"eqeqeq": ["error", "always"],
"eqeqeq": [ "error", "always" ],
"func-call-spacing": "warn",
"func-style": ["error", "expression", {
"func-style": [
"error",
"expression",
{
"allowArrowFunctions": true
}],
"indent": ["warn", 4],
}
],
"indent": [ "warn", 4 ],
"key-spacing": "warn",
"keyword-spacing": "warn",
"linebreak-style": ["warn", "unix"],
"linebreak-style": [ "warn", "unix" ],
"newline-per-chained-call": "warn",
"no-constructor-return": "warn",
"no-extra-bind": "warn",
"no-sequences": "warn",
"no-useless-call": "warn",
"no-useless-return": "warn",
"no-trailing-spaces": "warn",
"no-unneeded-ternary": ["warn", {
"no-unneeded-ternary": [
"warn",
{
"defaultAssignment": false
}],
"no-unused-vars": ["error", {
}
],
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_"
}],
}
],
"no-var": "warn",
"object-curly-newline" : ["warn", {
"object-curly-newline": [
"warn",
{
"consistent": true,
"multiline": true
}],
"object-curly-spacing" : "warn",
}
],
"object-curly-spacing": "warn",
"prefer-const": "warn",
"prefer-regex-literals": "warn",
"quotes": ["warn", "double"],
"quotes": [ "warn", "double" ],
"require-atomic-updates": "error",
"semi": "warn",
"semi-spacing": "warn",
"space-before-blocks": ["warn", "always"],
"space-before-function-paren": ["warn", "never"],
"space-before-blocks": [ "warn", "always" ],
"space-before-function-paren": [ "warn", "never" ],
"space-in-parens": "warn",
"yoda": "warn"
},
"globals": {
"console": "readable"
"console": "readonly"
},
"overrides": [
{
"files": ["**/*.mjs"],
"files": [ "**/*.mjs" ],
"parserOptions": {
"sourceType": "module"
}
},
{
"files": ["res/controllers/*.js"],
"files": [ "res/controllers/common-hid-packet-parser.js" ],
"globals": {
"console": "readonly"
},
"rules": {
"camelcase": "off"
}
},
{
"files": [ "res/controllers/*.js" ],
"excludedFiles": "res/controllers/common-hid-packet-parser.js",
"globals": {
"console": "readable",
"console": "readonly",
"svg": "writable",
"HIDController": "writable",
"HIDDebug": "writable",
Expand Down
Loading

0 comments on commit 8affbbb

Please sign in to comment.