Skip to content

Commit fc290d6

Browse files
authored
Port RecentListens to Typescript (metabrainz#791)
* Fix all errors * Add spotify types * Add "quiet" flag to lint command
1 parent bc2134d commit fc290d6

8 files changed

Lines changed: 613 additions & 501 deletions

File tree

.eslintrc.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ module.exports = {
2424
},
2525
plugins: ["react", "@typescript-eslint", "prettier"],
2626
rules: {
27-
"prettier/prettier": "error",
27+
"react/prop-tyes": "off",
2828
"react/jsx-filename-extension": "off",
29+
"react/jsx-props-no-spreading": "off",
2930
"import/extensions": "off",
30-
camelcase: "warn",
3131
"no-unused-vars": "off",
32+
camelcase: "warn",
33+
"prettier/prettier": "error",
3234
"lines-between-class-members": [
3335
"error",
3436
"always",
@@ -51,7 +53,6 @@ module.exports = {
5153
plugins: ["jest"],
5254
rules: {
5355
"import/no-extraneous-dependencies": "off",
54-
"react/jsx-props-no-spreading": "off",
5556
"jest/no-disabled-tests": "warn",
5657
"jest/no-focused-tests": "error",
5758
"jest/no-identical-title": "error",

listenbrainz/webserver/static/js/src/Importer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default class Importer {
4646
this.lastfmKey = props.lastfmApiKey;
4747

4848
this.userName = props.user.name;
49-
this.userToken = props.user.auth_token;
49+
this.userToken = props.user.auth_token || "";
5050
}
5151

5252
async startImport() {

0 commit comments

Comments
 (0)