Skip to content

Commit

Permalink
Merge pull request #213 from matrix-org/hs/port-bridge
Browse files Browse the repository at this point in the history
Port Bridge to Typescript
  • Loading branch information
Half-Shot authored Sep 1, 2020
2 parents 0402cf4 + fd335d1 commit c603707
Show file tree
Hide file tree
Showing 26 changed files with 1,734 additions and 1,604 deletions.
147 changes: 77 additions & 70 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,78 +1,85 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"parserOptions": {
"ecmaVersion": 2018
"ecmaVersion": 9,
"ecmaFeatures": {
"jsx": false
}
},
"env": {
"node": true,
"jasmine": true,
"es6": true
"jasmine": true
},
"extends": ["plugin:@typescript-eslint/recommended"],
"rules": {
// 0: off, 1: warn, 2: error
"consistent-return": 2,
"curly": 1,
"default-case": 2,
"guard-for-in": 2,

"no-alert": 2,
"no-caller": 2,
"no-cond-assign": 2,
"no-constant-condition": 2,
"no-debugger": 2,
"no-dupe-args": 2,
"no-dupe-keys": 2,
"no-duplicate-case": 2,
"no-else-return": 2,
"no-empty": 2,
"no-empty-character-class": 2,
"no-eq-null": 2,
"no-ex-assign": 2,
"no-extend-native": 2,
"no-extra-boolean-cast": 2,
"no-extra-semi": 1,
"no-fallthrough": 2,
"no-func-assign": 2,
"no-invalid-regexp": 2,
"no-invalid-this": 2,
"no-irregular-whitespace": 1,
"no-lone-blocks": 2,
"no-loop-func": 2,
"no-multi-spaces": 1,
"no-new-wrappers": 2,
"no-new": 2,
"no-octal": 2,
"no-negated-in-lhs": 2,
"no-obj-calls": 2,
"no-redeclare": 2,
"no-regex-spaces": 2,
"no-return-assign": 2,
"no-self-compare": 2,
"no-shadow": 2,
"no-unreachable": 2,
"no-unexpected-multiline": 2,
"no-unused-expressions": 2,
"no-unused-vars": [2, {"vars": "all", "args": "none"}],
"no-use-before-define": [1, "nofunc"],
"use-isnan": 2,
"valid-typeof": 2,

"array-bracket-spacing": [1, "never"],
"max-len": [1, 120],
"brace-style": [1, "stroustrup", { "allowSingleLine": true }],
"comma-spacing": [1, {"before": false, "after": true}],
"comma-style": [1, "last"],
"computed-property-spacing": [1, "never"],
"consistent-this": [1, "self"],
"eol-last": 1,
"linebreak-style": [1, "unix"],
"new-cap": 0,
"new-parens": 1,
"no-mixed-spaces-and-tabs": 1,
"no-nested-ternary": 1,
"no-spaced-func": 1,
"no-trailing-spaces": 1,
"keyword-spacing": [1, {"after": true}],
"space-before-blocks": [1, "always"],
"camelcase": [1, {"properties": "never", "ignoreDestructuring": true}]
"consistent-return": "error",
"curly": "error",
"default-case": "error",
"guard-for-in": "error",
"no-alert": "error",
"no-caller": "error",
"no-cond-assign": "error",
"no-constant-condition": "error",
"no-debugger": "error",
"no-dupe-args": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-else-return": "error",
"no-empty": "error",
"no-empty-character-class": "error",
"no-eq-null": "error",
"no-ex-assign": "error",
"no-extend-native": "error",
"no-extra-boolean-cast": "error",
"no-extra-semi": "error",
"no-fallthrough": "error",
"no-func-assign": "error",
"no-invalid-regexp": "error",
"no-invalid-this": "error",
"no-irregular-whitespace": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
"no-multi-spaces": "error",
"no-new-wrappers": "error",
"no-new": "error",
"no-octal": "error",
"no-negated-in-lhs": "error",
"no-obj-calls": "error",
"no-redeclare": "error",
"no-regex-spaces": "error",
"no-return-assign": "error",
"no-self-compare": "error",
"no-shadow": "error",
"no-unreachable": "error",
"no-unexpected-multiline": "error",
"no-unused-expressions": "error",
"no-use-before-define": "off",
"use-isnan": "error",
"valid-typeof": "error",
"array-bracket-spacing": ["error", "never"],
"max-len": ["error", 120],
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
"comma-spacing": ["error", {"before": false, "after": true}],
"comma-style": ["error", "last"],
"computed-property-spacing": ["error", "never"],
"consistent-this": ["error", "self"],
"eol-last": "error",
"new-cap": "error",
"new-parens": "error",
"no-mixed-spaces-and-tabs": "error",
"no-nested-ternary": "error",
"no-spaced-func": "error",
"no-trailing-spaces": "error",
"keyword-spacing": ["error", {"before": true, "after": true}],
"space-before-blocks": ["error", "always"],
"@typescript-eslint/explicit-function-return-type": "off",
"camelcase": ["error", { "properties": "never" }],
"@typescript-eslint/ban-ts-ignore": "off",
"no-unused-vars": "off",
"strict": ["error", "never" ],
"no-var": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "warn"
}
}
}
85 changes: 0 additions & 85 deletions .eslintrcts.json

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/213.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Port the `Bridge` object to Typescript and remove javascript linting
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
"build": "tsc --project tsconfig.json",
"prepare": "npm run build",
"gendoc": "jsdoc -r lib -R README.md -P package.json -d .jsdoc",
"lint": "npm run lint:js && npm run lint:ts",
"lint:js": "eslint -c .eslintrc.json src/**/*.js spec/**/*.js",
"lint:ts": "eslint -c .eslintrcts.json src/**/*.ts",
"lint": "npm run lint:ts",
"lint:ts": "eslint -c .eslintrc.json src/**/*.ts",
"test": "BLUEBIRD_DEBUG=1 jasmine --stop-on-failure=true",
"check": "npm run lint && npm test",
"ci-test": "BLUEBIRD_DEBUG=1 nyc -x \"**/spec/**\" --report text jasmine"
Expand Down
Loading

0 comments on commit c603707

Please sign in to comment.