-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lint(v6): fix eslint error #8726
Conversation
UT fail in deepEquals F it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this
Please double check changes and run the test suite
|
||
const onComplete = callbacks.onComplete || empty | ||
const onChange = callbacks.onChange || empty | ||
const _this = this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
turn the functions into arrow functions and remove this line
https://github.com/fabricjs/fabric.js/pull/8726/files#diff-6db3fd5f9757a949bf2ea70c6ea366ecb5c1e3478306a26992b4e7f490c9c4c9R36-R45
@@ -6,7 +6,7 @@ | |||
* @return {Object} CSS rules of this document | |||
*/ | |||
export function getCSSRules(doc) { | |||
let styles = doc.getElementsByTagName('style'), | |||
const styles = doc.getElementsByTagName('style'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is surely an error
you can move the definition of i
to the loop and remove len
if is used only once
@@ -4,7 +4,7 @@ import { parseUnit } from '../util/misc/svgParsing'; | |||
import { parseTransformAttribute } from './parseTransformAttribute'; | |||
|
|||
export function normalizeValue(attr, value, parentAttributes, fontSize) { | |||
let isArray = Array.isArray(value), | |||
const isArray = Array.isArray(value), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so is this, let parsed
@@ -45,7 +45,7 @@ export function normalizeValue(attr, value, parentAttributes, fontSize) { | |||
} else if (attr === 'paintFirst') { | |||
const fillIndex = value.indexOf('fill'); | |||
const strokeIndex = value.indexOf('stroke'); | |||
var value = 'fill'; | |||
const value = 'fill'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so is this
@@ -17,7 +17,7 @@ export function parsePointsAttribute(points) { | |||
points = points.replace(/,/g, ' ').trim(); | |||
|
|||
points = points.split(/\s+/); | |||
let parsedPoints = [], | |||
const parsedPoints = [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
@@ -13,7 +13,7 @@ import type { ValueAnimation } from '../../util/animation/ValueAnimation'; | |||
import { TextStyleDeclaration } from '../Text/StyledText'; | |||
|
|||
// extend this regex to support non english languages | |||
const reNonWord = /[ \n\.,;!\?\-]/; | |||
const reNonWord = /[ \n\\.,;!?-]/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is wrong I think.
\.
=== '.'
\\.
=== '' + any char?
src/mixins/eraser_brush.mixin.ts | ||
src/util/lang_class.ts | ||
src/filters/Resize.ts | ||
src/parkinglot/canvas_animation.mixin.ts | ||
src/parser/applyViewboxTransform.ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/mixins/eraser_brush.mixin.ts | |
src/util/lang_class.ts | |
src/filters/Resize.ts | |
src/parkinglot/canvas_animation.mixin.ts | |
src/parser/applyViewboxTransform.ts | |
src/mixins/eraser_brush.mixin.ts | |
src/util/lang_class.ts | |
src/parkinglot/canvas_animation.mixin.ts |
And I prefer you rebase to master so tests can run |
Motivation
Description
fix eslint error,
#8476
Changes
Gist
In Action