mirror of
https://codeberg.org/emersion/gamja.git
synced 2025-02-16 02:59:44 -05:00
eslint: enable no-implicit-coercion
This commit is contained in:
parent
8ff1cd8317
commit
9c2beac7dd
4 changed files with 4 additions and 3 deletions
|
@ -515,7 +515,7 @@ export default class App extends Component {
|
||||||
this.setState((state) => {
|
this.setState((state) => {
|
||||||
let updated;
|
let updated;
|
||||||
[id, updated] = State.createBuffer(state, name, serverID, client);
|
[id, updated] = State.createBuffer(state, name, serverID, client);
|
||||||
isNew = !!updated;
|
isNew = Boolean(updated);
|
||||||
return updated;
|
return updated;
|
||||||
});
|
});
|
||||||
if (isNew) {
|
if (isNew) {
|
||||||
|
|
|
@ -26,6 +26,7 @@ export default [
|
||||||
"eqeqeq": "error",
|
"eqeqeq": "error",
|
||||||
"no-invalid-this": "error",
|
"no-invalid-this": "error",
|
||||||
"prefer-arrow-callback": "error",
|
"prefer-arrow-callback": "error",
|
||||||
|
"no-implicit-coercion": "warn",
|
||||||
"@stylistic/js/indent": ["warn", "tab"],
|
"@stylistic/js/indent": ["warn", "tab"],
|
||||||
"@stylistic/js/quotes": ["warn", "double"],
|
"@stylistic/js/quotes": ["warn", "double"],
|
||||||
"@stylistic/js/semi": "warn",
|
"@stylistic/js/semi": "warn",
|
||||||
|
|
|
@ -121,7 +121,7 @@ export function setup(app) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
candidates = candidates.filter((binding) => {
|
candidates = candidates.filter((binding) => {
|
||||||
return !!binding.altKey === event.altKey && !!binding.ctrlKey === event.ctrlKey;
|
return Boolean(binding.altKey) === event.altKey && Boolean(binding.ctrlKey) === event.ctrlKey;
|
||||||
});
|
});
|
||||||
if (candidates.length !== 1) {
|
if (candidates.length !== 1) {
|
||||||
return;
|
return;
|
||||||
|
|
2
state.js
2
state.js
|
@ -634,7 +634,7 @@ export const State = {
|
||||||
return updateUser(msg.prefix.name, { account });
|
return updateUser(msg.prefix.name, { account });
|
||||||
case "AWAY":
|
case "AWAY":
|
||||||
let awayMessage = msg.params[0];
|
let awayMessage = msg.params[0];
|
||||||
return updateUser(msg.prefix.name, { away: !!awayMessage });
|
return updateUser(msg.prefix.name, { away: Boolean(awayMessage) });
|
||||||
case "TOPIC":
|
case "TOPIC":
|
||||||
channel = msg.params[0];
|
channel = msg.params[0];
|
||||||
topic = msg.params[1];
|
topic = msg.params[1];
|
||||||
|
|
Loading…
Reference in a new issue