immosquare-cleaner 0.1.37 → 0.1.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/immosquare-cleaner/version.rb +1 -1
- data/lib/immosquare-cleaner.rb +1 -2
- data/linters/jscodeshift/arrow-function-transform.js +19 -12
- data/linters/rubocop-2.7.6.yml +88 -0
- data/node_modules/@eslint/config-array/LICENSE +201 -0
- data/node_modules/@eslint/config-array/README.md +340 -0
- data/node_modules/@eslint/config-array/dist/cjs/index.cjs +1260 -0
- data/node_modules/@eslint/config-array/dist/cjs/index.d.cts +146 -0
- data/node_modules/@eslint/config-array/dist/cjs/types.ts +24 -0
- data/node_modules/@eslint/config-array/dist/esm/index.d.ts +146 -0
- data/node_modules/@eslint/config-array/dist/esm/index.js +1258 -0
- data/node_modules/@eslint/config-array/dist/esm/types.d.ts +19 -0
- data/node_modules/@eslint/config-array/dist/esm/types.ts +24 -0
- data/node_modules/@eslint/config-array/node_modules/minimatch/LICENSE +15 -0
- data/node_modules/@eslint/config-array/node_modules/minimatch/README.md +230 -0
- data/node_modules/@eslint/config-array/node_modules/minimatch/minimatch.js +947 -0
- data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/LICENSE +21 -0
- data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/README.md +129 -0
- data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/index.js +201 -0
- data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/package.json +47 -0
- data/node_modules/@eslint/config-array/node_modules/minimatch/package.json +33 -0
- data/node_modules/@eslint/config-array/package.json +60 -0
- data/node_modules/@eslint/js/package.json +1 -1
- data/node_modules/@eslint/object-schema/LICENSE +201 -0
- data/node_modules/@eslint/object-schema/README.md +224 -0
- data/node_modules/@eslint/object-schema/dist/cjs/index.cjs +455 -0
- data/node_modules/@eslint/object-schema/dist/cjs/index.d.cts +123 -0
- data/node_modules/@eslint/object-schema/dist/cjs/types.ts +55 -0
- data/node_modules/@eslint/object-schema/dist/esm/index.d.ts +123 -0
- data/node_modules/@eslint/object-schema/dist/esm/index.js +452 -0
- data/node_modules/@eslint/object-schema/dist/esm/types.d.ts +40 -0
- data/node_modules/@eslint/object-schema/dist/esm/types.ts +55 -0
- data/node_modules/@eslint/object-schema/package.json +56 -0
- data/node_modules/eslint/lib/cli.js +2 -2
- data/node_modules/eslint/lib/config/flat-config-array.js +1 -1
- data/node_modules/eslint/lib/eslint/eslint-helpers.js +7 -7
- data/node_modules/eslint/lib/eslint/eslint.js +1 -10
- data/node_modules/eslint/lib/rule-tester/rule-tester.js +1 -1
- data/node_modules/eslint/lib/rules/func-style.js +4 -4
- data/node_modules/eslint/lib/rules/no-constructor-return.js +1 -1
- data/node_modules/eslint/lib/rules/no-loop-func.js +161 -129
- data/node_modules/eslint/package.json +3 -3
- data/node_modules/prettier/LICENSE +56 -535
- data/node_modules/prettier/bin/prettier.cjs +4 -8
- data/node_modules/prettier/doc.js +20 -29
- data/node_modules/prettier/doc.mjs +20 -29
- data/node_modules/prettier/index.cjs +1 -1
- data/node_modules/prettier/index.d.ts +4 -2
- data/node_modules/prettier/index.mjs +3109 -4509
- data/node_modules/prettier/internal/cli.mjs +339 -3544
- data/node_modules/prettier/package.json +1 -1
- data/node_modules/prettier/plugins/acorn.js +11 -11
- data/node_modules/prettier/plugins/acorn.mjs +11 -11
- data/node_modules/prettier/plugins/angular.js +1 -1
- data/node_modules/prettier/plugins/angular.mjs +1 -1
- data/node_modules/prettier/plugins/babel.js +11 -11
- data/node_modules/prettier/plugins/babel.mjs +11 -11
- data/node_modules/prettier/plugins/estree.js +28 -28
- data/node_modules/prettier/plugins/estree.mjs +28 -28
- data/node_modules/prettier/plugins/flow.js +16 -17
- data/node_modules/prettier/plugins/flow.mjs +16 -17
- data/node_modules/prettier/plugins/glimmer.js +22 -22
- data/node_modules/prettier/plugins/glimmer.mjs +22 -22
- data/node_modules/prettier/plugins/graphql.js +4 -4
- data/node_modules/prettier/plugins/graphql.mjs +4 -4
- data/node_modules/prettier/plugins/html.js +15 -15
- data/node_modules/prettier/plugins/html.mjs +15 -15
- data/node_modules/prettier/plugins/markdown.js +42 -42
- data/node_modules/prettier/plugins/markdown.mjs +42 -42
- data/node_modules/prettier/plugins/meriyah.js +5 -5
- data/node_modules/prettier/plugins/meriyah.mjs +5 -5
- data/node_modules/prettier/plugins/postcss.js +26 -26
- data/node_modules/prettier/plugins/postcss.mjs +26 -26
- data/node_modules/prettier/plugins/typescript.js +20 -20
- data/node_modules/prettier/plugins/typescript.mjs +20 -20
- data/node_modules/prettier/plugins/yaml.js +32 -32
- data/node_modules/prettier/plugins/yaml.mjs +32 -32
- data/node_modules/prettier/standalone.js +26 -26
- data/node_modules/prettier/standalone.mjs +26 -26
- data/package.json +3 -3
- metadata +31 -2
@@ -16,14 +16,10 @@ var require_semver_compare = __commonJS({
|
|
16
16
|
for (var i = 0; i < 3; i++) {
|
17
17
|
var na = Number(pa[i]);
|
18
18
|
var nb = Number(pb[i]);
|
19
|
-
if (na > nb)
|
20
|
-
|
21
|
-
if (nb
|
22
|
-
|
23
|
-
if (!isNaN(na) && isNaN(nb))
|
24
|
-
return 1;
|
25
|
-
if (isNaN(na) && !isNaN(nb))
|
26
|
-
return -1;
|
19
|
+
if (na > nb) return 1;
|
20
|
+
if (nb > na) return -1;
|
21
|
+
if (!isNaN(na) && isNaN(nb)) return 1;
|
22
|
+
if (isNaN(na) && !isNaN(nb)) return -1;
|
27
23
|
}
|
28
24
|
return 0;
|
29
25
|
};
|
@@ -403,15 +403,6 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
|
|
403
403
|
var get_string_width_default = getStringWidth;
|
404
404
|
|
405
405
|
// src/document/utils.js
|
406
|
-
var getDocParts = (doc) => {
|
407
|
-
if (Array.isArray(doc)) {
|
408
|
-
return doc;
|
409
|
-
}
|
410
|
-
if (doc.type !== DOC_TYPE_FILL) {
|
411
|
-
throw new Error(`Expect doc to be 'array' or '${DOC_TYPE_FILL}'.`);
|
412
|
-
}
|
413
|
-
return doc.parts;
|
414
|
-
};
|
415
406
|
function mapDoc(doc, cb) {
|
416
407
|
if (typeof doc === "string") {
|
417
408
|
return cb(doc);
|
@@ -830,26 +821,25 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
|
|
830
821
|
let trimCount = 0;
|
831
822
|
let cursorCount = 0;
|
832
823
|
let outIndex = out.length;
|
833
|
-
outer:
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
break outer;
|
850
|
-
}
|
824
|
+
outer: while (outIndex--) {
|
825
|
+
const last = out[outIndex];
|
826
|
+
if (last === CURSOR_PLACEHOLDER) {
|
827
|
+
cursorCount++;
|
828
|
+
continue;
|
829
|
+
}
|
830
|
+
if (false) {
|
831
|
+
throw new Error(`Unexpected value in trim: '${typeof last}'`);
|
832
|
+
}
|
833
|
+
for (let charIndex = last.length - 1; charIndex >= 0; charIndex--) {
|
834
|
+
const char = last[charIndex];
|
835
|
+
if (char === " " || char === " ") {
|
836
|
+
trimCount++;
|
837
|
+
} else {
|
838
|
+
out[outIndex] = last.slice(0, charIndex + 1);
|
839
|
+
break outer;
|
851
840
|
}
|
852
841
|
}
|
842
|
+
}
|
853
843
|
if (trimCount > 0 || cursorCount > 0) {
|
854
844
|
out.length = outIndex + 1;
|
855
845
|
while (cursorCount-- > 0) {
|
@@ -877,14 +867,15 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
|
|
877
867
|
mode,
|
878
868
|
doc
|
879
869
|
} = cmds.pop();
|
880
|
-
|
870
|
+
const docType = get_doc_type_default(doc);
|
871
|
+
switch (docType) {
|
881
872
|
case DOC_TYPE_STRING:
|
882
873
|
out.push(doc);
|
883
874
|
width -= get_string_width_default(doc);
|
884
875
|
break;
|
885
876
|
case DOC_TYPE_ARRAY:
|
886
877
|
case DOC_TYPE_FILL: {
|
887
|
-
const parts =
|
878
|
+
const parts = docType === DOC_TYPE_ARRAY ? doc : doc.parts;
|
888
879
|
for (let i = parts.length - 1; i >= 0; i--) {
|
889
880
|
cmds.push({
|
890
881
|
mode,
|
@@ -368,15 +368,6 @@ function getStringWidth(text) {
|
|
368
368
|
var get_string_width_default = getStringWidth;
|
369
369
|
|
370
370
|
// src/document/utils.js
|
371
|
-
var getDocParts = (doc) => {
|
372
|
-
if (Array.isArray(doc)) {
|
373
|
-
return doc;
|
374
|
-
}
|
375
|
-
if (doc.type !== DOC_TYPE_FILL) {
|
376
|
-
throw new Error(`Expect doc to be 'array' or '${DOC_TYPE_FILL}'.`);
|
377
|
-
}
|
378
|
-
return doc.parts;
|
379
|
-
};
|
380
371
|
function mapDoc(doc, cb) {
|
381
372
|
if (typeof doc === "string") {
|
382
373
|
return cb(doc);
|
@@ -795,26 +786,25 @@ function trim2(out) {
|
|
795
786
|
let trimCount = 0;
|
796
787
|
let cursorCount = 0;
|
797
788
|
let outIndex = out.length;
|
798
|
-
outer:
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
break outer;
|
815
|
-
}
|
789
|
+
outer: while (outIndex--) {
|
790
|
+
const last = out[outIndex];
|
791
|
+
if (last === CURSOR_PLACEHOLDER) {
|
792
|
+
cursorCount++;
|
793
|
+
continue;
|
794
|
+
}
|
795
|
+
if (false) {
|
796
|
+
throw new Error(`Unexpected value in trim: '${typeof last}'`);
|
797
|
+
}
|
798
|
+
for (let charIndex = last.length - 1; charIndex >= 0; charIndex--) {
|
799
|
+
const char = last[charIndex];
|
800
|
+
if (char === " " || char === " ") {
|
801
|
+
trimCount++;
|
802
|
+
} else {
|
803
|
+
out[outIndex] = last.slice(0, charIndex + 1);
|
804
|
+
break outer;
|
816
805
|
}
|
817
806
|
}
|
807
|
+
}
|
818
808
|
if (trimCount > 0 || cursorCount > 0) {
|
819
809
|
out.length = outIndex + 1;
|
820
810
|
while (cursorCount-- > 0) {
|
@@ -842,14 +832,15 @@ function fits(next, restCommands, width, hasLineSuffix, groupModeMap, mustBeFlat
|
|
842
832
|
mode,
|
843
833
|
doc
|
844
834
|
} = cmds.pop();
|
845
|
-
|
835
|
+
const docType = get_doc_type_default(doc);
|
836
|
+
switch (docType) {
|
846
837
|
case DOC_TYPE_STRING:
|
847
838
|
out.push(doc);
|
848
839
|
width -= get_string_width_default(doc);
|
849
840
|
break;
|
850
841
|
case DOC_TYPE_ARRAY:
|
851
842
|
case DOC_TYPE_FILL: {
|
852
|
-
const parts =
|
843
|
+
const parts = docType === DOC_TYPE_ARRAY ? doc : doc.parts;
|
853
844
|
for (let i = parts.length - 1; i >= 0; i--) {
|
854
845
|
cmds.push({
|
855
846
|
mode,
|
@@ -496,10 +496,12 @@ export interface Printer<T = any> {
|
|
496
496
|
insertPragma?: (text: string) => string;
|
497
497
|
/**
|
498
498
|
* @returns `null` if you want to remove this node
|
499
|
-
* @returns `void` if you want to use modified
|
499
|
+
* @returns `void` if you want to use modified `cloned`
|
500
500
|
* @returns anything if you want to replace the node with it
|
501
501
|
*/
|
502
|
-
massageAstNode?:
|
502
|
+
massageAstNode?:
|
503
|
+
| ((original: any, cloned: any, parent: any) => any)
|
504
|
+
| undefined;
|
503
505
|
hasPrettierIgnore?: ((path: AstPath<T>) => boolean) | undefined;
|
504
506
|
canAttachComment?: ((node: T) => boolean) | undefined;
|
505
507
|
isBlockComment?: ((node: T) => boolean) | undefined;
|