address review and fix random linting issues

This commit is contained in:
Paweł Grabarz 2024-08-14 19:43:31 +02:00
parent b4b4bbe4e3
commit 7bb636db1e
5 changed files with 11 additions and 5 deletions

View File

@ -196,7 +196,13 @@ export default [
eslintJs.configs.recommended,
{
// Playwright build cache and Vite build directory.
ignores: ['**/.cache/**', '**/playwright-report', '**/dist', '**/build.mjs'],
ignores: [
'**/.cache/**',
'**/playwright-report',
'**/dist',
'**/build.mjs',
'**/*.timestamp-*.mjs',
],
},
{
settings: {

View File

@ -11,12 +11,11 @@ const conf = [
{
ignores: [
'dist',
'shared/ast/generated',
'templates',
'.histoire',
'playwright-report',
'test-results',
'vite.ydoc-server-polyglot.config.ts',
'**/*.timestamp-*.mjs',
],
},
...compat.extends('plugin:vue/vue3-recommended'),

View File

@ -53,7 +53,7 @@ import { colorFromString } from '@/util/colors'
import { partition } from '@/util/data/array'
import { every, filterDefined } from '@/util/data/iterable'
import { Rect } from '@/util/data/rect'
import { Err, Ok, unwrapOr, type Result } from '@/util/data/result'
import { Err, Ok, unwrapOr } from '@/util/data/result'
import { Vec2 } from '@/util/data/vec2'
import { computedFallback } from '@/util/reactivity'
import { until } from '@vueuse/core'

View File

@ -413,6 +413,7 @@ fn try_parse_doc_comment<'s>(
else {
unreachable!()
};
debug_assert_eq!(documented.expression, None);
documented.documentation.open.left_offset += span.left_offset;
Some(documented.documentation)
} else {

View File

@ -210,7 +210,7 @@ fn to_operator_block_expression<'s>(
match &items[..] {
[Item::Token(a), b, ..]
if b.left_visible_offset().width_in_spaces != 0
&& a.operator_properties().map_or(false, |p| p.can_form_section()) =>
&& a.operator_properties().is_some_and(|p| p.can_form_section()) =>
{
let expression = precedence.resolve_offset(1, &mut items).unwrap();
let Some(Item::Token(operator)) = items.pop() else { unreachable!() };