-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
let's hope nothing breaks lol changes along the way: - add a lot of new typecheck.ts functions - add TinyError - refactor blockdef/entitydef validate() - use validateProperty to combat duplicated code and eslint complexity - errors have detailed info now - add typechecks to soundList (main.ts)
- Loading branch information
Showing
47 changed files
with
2,847 additions
and
686 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,299 @@ | ||
{ | ||
"env": { | ||
"node": true, | ||
"es2022": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"overrides": [ | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
"constructor-super": "warn", | ||
"for-direction": "warn", | ||
"getter-return": "warn", | ||
"no-async-promise-executor": "error", | ||
"no-await-in-loop": "error", | ||
"no-class-assign": "error", | ||
"no-compare-neg-zero": "off", | ||
"no-cond-assign": ["error", "always"], | ||
"no-const-assign": "error", | ||
"no-constant-binary-expression": "error", | ||
"no-constant-condition": "error", | ||
"no-constructor-return": "error", | ||
"no-control-regex": "warn", | ||
"no-debugger": "error", | ||
"no-dupe-args": "error", | ||
"no-dupe-class-members": "error", | ||
"no-dupe-else-if": "error", | ||
"no-dupe-keys": "error", | ||
"no-duplicate-case": "off", | ||
"no-duplicate-imports": "error", | ||
"no-empty-character-class": "error", | ||
"no-empty-pattern": "error", | ||
"no-ex-assign": "warn", | ||
"no-fallthrough": "off", | ||
"no-func-assign": "warn", | ||
"no-import-assign": "error", | ||
"no-inner-declarations": ["error", "both"], | ||
"no-invalid-regexp": "error", | ||
"no-loss-of-precision": "error", | ||
"no-misleading-character-class": "error", | ||
"no-new-native-nonconstructor": "error", | ||
"no-new-symbol": "error", | ||
"no-obj-calls": "error", | ||
"no-promise-executor-return": "warn", | ||
"no-prototype-builtins": "off", | ||
|
||
"accessor-pairs": "off", | ||
"arrow-body-style": ["warn", "as-needed"], | ||
"block-scoped-var": "error", | ||
"camelcase": "error", | ||
"capitalized-comments": "off", | ||
"class-methods-use-this": "off", | ||
"complexity": ["warn", 24], | ||
"consistent-return": "off", | ||
"consistent-this": ["warn", "that"], | ||
"curly": ["off", "multi-or-nest"], | ||
"default-case": "off", | ||
"default-case-last": "error", | ||
"default-param-last": "off", | ||
"dot-notation": "error", | ||
"eqeqeq": "off", | ||
"func-name-matching": "off", | ||
"func-names": ["warn", "never"], | ||
"grouped-accessor-pairs": "off", | ||
"guard-for-in": "off", | ||
"id-denylist": "off", | ||
"id-length": ["warn", {"min": 1, "max": 32}], | ||
"id-match": "off", | ||
"init-declarations": "off", | ||
"logical-assignment-operators": ["warn", "always"], | ||
"max-classes-per-file": "off", | ||
"max-lines-per-function": "off", | ||
"max-nested-callbacks": "off", | ||
"max-params": "off", | ||
"max-statements": "off", | ||
"multiline-comment-style": "off", | ||
"new-cap": "off", | ||
"no-alert": "error", | ||
"no-array-constructor": "error", | ||
"no-bitwise": "off", | ||
"no-caller": "error", | ||
"no-case-declarations": "error", | ||
"no-confusing-arrow": ["error", {"allowParens": true, "onlyOneSimpleParam": true}], | ||
"no-console": ["error", {"allow": ["table", "group", "groupEnd", "dir", "warn", "debug"]}], | ||
"no-continue": "off", | ||
"no-delete-var": "error", | ||
"no-div-regex": "warn", | ||
"no-else-return": "error", | ||
"no-empty": "warn", | ||
"no-empty-function": "off", | ||
"no-empty-static-block": "warn", | ||
"no-eq-null": "off", | ||
"no-eval": "error", | ||
"no-extend-native": "error", | ||
"no-extra-bind": "warn", | ||
"no-extra-boolean-cast": "error", | ||
"no-extra-label": "error", | ||
"no-extra-semi": "error", | ||
"no-floating-decimal": "off", | ||
"no-global-assign": "error", | ||
"no-implicit-coercion": "off", | ||
"no-implicit-globals": "warn", | ||
"no-implied-eval": "error", | ||
"no-inline-comments": "off", | ||
"no-invalid-this": "error", | ||
"no-iterator": "error", | ||
"no-label-var": "error", | ||
"no-labels": "off", | ||
"no-lone-blocks": "warn", | ||
"no-lonely-if": "warn", | ||
"no-loop-func": "error", | ||
"no-magic-numbers": "off", | ||
"no-mixed-operators": ["warn", { "groups": [ | ||
["&", "|", "^", "~", "<<", ">>", ">>>", "?:"], | ||
["==", "!=", "===", "!==", ">", ">=", "<", "<="], | ||
["&&", "||", "?:"], | ||
["in", "instanceof"] | ||
] }], | ||
"no-multi-assign": "off", | ||
"no-multi-str": "error", | ||
"no-negated-condition": "error", | ||
"no-nested-ternary": "off", | ||
"no-new": "off", | ||
"no-new-func": "error", | ||
"no-new-object": "warn", | ||
"no-new-wrappers": "error", | ||
"no-nonoctal-decimal-escape": "error", | ||
"no-octal": "error", | ||
"no-octal-escape": "error", | ||
"no-param-reassign": "off", | ||
"no-plusplus": "off", | ||
"no-proto": "error", | ||
"no-redeclare": "error", | ||
"no-regex-spaces": "warn", | ||
"no-restricted-exports": "off", | ||
"no-restricted-globals": "off", | ||
"no-restricted-imports": "off", | ||
"no-restricted-properties": "off", | ||
"no-restricted-syntax": "off", | ||
"no-return-assign": "error", | ||
"no-return-await": "warn", | ||
"no-script-url": "error", | ||
"no-sequences": "warn", | ||
"no-shadow": "warn", | ||
"no-shadow-restricted-names": "error", | ||
"no-ternary": "off", | ||
"no-throw-literal": "off", | ||
"no-undef-init": "warn", | ||
"no-undefined": "off", | ||
"no-underscore-dangle": "warn", | ||
"no-unneeded-ternary": "warn", | ||
"no-unused-expressions": "warn", | ||
"no-unused-labels": "error", | ||
"no-useless-call": "error", | ||
"no-useless-catch": "error", | ||
"no-useless-computed-key": "error", | ||
"no-useless-concat": "error", | ||
"no-useless-constructor": "warn", | ||
"no-useless-escape": "error", | ||
"no-useless-rename": "error", | ||
"no-var": "error", | ||
"no-void": "off", | ||
"no-warning-comments": "off", | ||
"no-with": "error", | ||
"object-shorthand": ["warn", "always"], | ||
"one-var": "off", | ||
"one-var-declaration-per-line": "off", | ||
"operator-assignment": ["warn", "always"], | ||
"prefer-arrow-callback": "error", | ||
"prefer-const": "error", | ||
"prefer-destructuring": "warn", | ||
"prefer-exponentiation-operator": "warn", | ||
"prefer-named-capture-group": "off", | ||
"prefer-numeric-literals": "warn", | ||
"prefer-object-has-own": "error", | ||
"prefer-object-spread": "warn", | ||
"prefer-promise-reject-errors": "warn", | ||
"prefer-regex-literals": "off", | ||
"prefer-rest-params": "error", | ||
"prefer-spread": "error", | ||
"prefer-template": "warn", | ||
"quote-props": ["warn", "as-needed"], | ||
"radix": "warn", | ||
"require-await": "warn", | ||
"require-unicode-regexp": "off", | ||
"require-yield": "warn", | ||
"sort-imports": "warn", | ||
"sort-keys": "off", | ||
"sort-vars": "warn", | ||
"spaced-comment": ["warn", "always"], | ||
"strict": "warn", | ||
"symbol-description": "error", | ||
"vars-on-top": "warn", | ||
"yoda": ["warn", "never"], | ||
|
||
"array-bracket-newline": ["error", {"multiline": true}], | ||
"array-bracket-spacing": ["warn", "never"], | ||
"array-element-newline": ["warn", "consistent"], | ||
"arrow-parens": ["warn", "as-needed"], | ||
"arrow-spacing": ["error", {"before": true, "after": true}], | ||
"block-spacing": ["error", "always"], | ||
"brace-style": ["error", "1tbs", {"allowSingleLine": true}], | ||
"comma-dangle": ["warn", "never"], | ||
"comma-spacing": ["error", {"before": false, "after": true}], | ||
"comma-style": ["error", "last"], | ||
"computed-property-spacing": ["error", "never"], | ||
"dot-location": ["error", "property"], | ||
"eol-last": ["error", "always"], | ||
"func-call-spacing": ["error", "never"], | ||
"function-call-argument-newline": ["error", "consistent"], | ||
"function-paren-newline": ["error", "multiline"], | ||
"generator-star-spacing": ["warn", {"before": false, "after": true}], | ||
"implicit-arrow-linebreak": ["error", "beside"], | ||
"indent": ["error", "tab"], | ||
"jsx-quotes": ["warn", "prefer-double"], | ||
"key-spacing": ["warn", { | ||
"beforeColon": false, "afterColon": true, | ||
"mode": "minimum", "align": "value" | ||
}], | ||
"keyword-spacing": ["error", {"before": true, "after": true}], | ||
"line-comment-position": "off", | ||
"linebreak-style": ["error", "unix"], | ||
"lines-around-comment": ["warn", { | ||
"beforeBlockComment": true, | ||
"beforeLineComment": true, | ||
"allowBlockStart": true, | ||
"allowBlockEnd": false, | ||
"allowObjectStart": true, | ||
"allowObjectEnd": false, | ||
"allowArrayStart": true, | ||
"allowArrayEnd": false, | ||
"allowClassStart": false, | ||
"allowClassEnd": false | ||
}], | ||
"lines-between-class-members": ["error", "always", {"exceptAfterSingleLine": true}], | ||
"max-len": ["warn", { | ||
"code": 160, "tabWidth": 2, "comments": 160, "ignoreUrls": true | ||
}], | ||
"max-statements-per-line": ["error", {"max": 1}], | ||
"multiline-ternary": ["warn", "never"], | ||
"new-parens": ["error", "always"], | ||
"newline-per-chained-call": ["error", {"ignoreChainWithDepth": 3}], | ||
"no-extra-parens": "off", | ||
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"], | ||
"no-trailing-spaces": "error", | ||
"no-whitespace-before-property": "error", | ||
"nonblock-statement-body-position": ["error", "beside"], | ||
"object-curly-newline": ["error", {"multiline": true}], | ||
"object-curly-spacing": ["warn", "always"], | ||
"object-property-newline": ["error", {"allowAllPropertiesOnSameLine": true}], | ||
"operator-linebreak": ["error", "after"], | ||
"padded-blocks": ["warn", {"blocks": "never", "classes": "always", "switches": "never"}, {"allowSingleLineBlocks": true}], | ||
"padding-line-between-statements": ["warn", | ||
{ "blankLine": "always", "prev": "*", "next": ["return", "throw", "break"] }, | ||
{ "blankLine": "always", "prev": "*", "next": "case" }, | ||
{ "blankLine": "never", "prev": "case", "next": "*" }, | ||
{ "blankLine": "always", "prev": "*", "next": "default" }, | ||
{ "blankLine": "never", "prev": "default", "next": "*" }, | ||
{ "blankLine": "never", "prev": ["case", "default"], "next": ["case", "default"] }, | ||
{ "blankLine": "always", "prev": ["block", "block-like", "class", "function", "iife", "switch", "try", "while"], "next": ["class", "function", "if", "for", "switch", "while"] }, | ||
{ "blankLine": "always", "prev": ["class", "function", "if", "for", "switch", "while"], "next": "*" }, | ||
{ "blankLine": "any", "prev": "if", "next": "if" }, | ||
{ "blankLine": "always", "prev": ["let", "const"], "next": "*" }, | ||
{ "blankLine": "any", "prev": ["let", "const"], "next": ["let", "const"] }, | ||
{ "blankLine": "any", "prev": "let", "next": ["if", "for", "while"] }, | ||
{ "blankLine": "always", "prev": "import", "next": "*" }, | ||
{ "blankLine": "never", "prev": "import", "next": "import" } | ||
], | ||
"quotes": ["error", "double", {"avoidEscape": true, "allowTemplateLiterals": true}], | ||
"rest-spread-spacing": ["error", "never"], | ||
"semi": ["error", "never"], | ||
"semi-spacing": ["error", {"before": false, "after": true}], | ||
"semi-style": ["error", "first"], | ||
"space-before-blocks": ["error", "always"], | ||
"space-before-function-paren": ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always" }], | ||
"space-in-parens": ["error", "never"], | ||
"space-infix-ops": ["off"], | ||
"space-unary-ops": ["error", {"words": true, "nonwords": false}], | ||
"switch-colon-spacing": ["error", {"before": false, "after": true}], | ||
"template-curly-spacing": ["error", "never"], | ||
"template-tag-spacing": ["error", "never"], | ||
"unicode-bom": "off", | ||
"wrap-iife": ["error", "outside", {"functionPrototypeMethods": true}], | ||
"wrap-regex": "warn", | ||
"yield-star-spacing": ["warn", "after"], | ||
|
||
"@typescript-eslint/no-empty-function": "off" | ||
} | ||
} |
Oops, something went wrong.