Skip to content

Commit dcd5718

Browse files
committed
style: sorted some keys
Signed-off-by: prisis <[email protected]>
1 parent fb6b8d2 commit dcd5718

File tree

4 files changed

+23
-21
lines changed

4 files changed

+23
-21
lines changed

packages/babel-preset/src/index.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,29 @@ import { declare } from "@babel/helper-plugin-utils";
44

55
type BabelAPI = {
66
assertVersion: (version: string) => void;
7-
env: (environment: string) => boolean;
87
cache: {
98
using: (function_: () => boolean) => boolean;
109
};
10+
env: (environment: string) => boolean;
1111
};
1212

1313
type Options = {
14-
modules?: "auto" | false | true;
15-
targets?: any;
16-
removePropTypes?: boolean | object;
14+
corejs?: boolean | { method?: string; version?: number };
15+
debug?: boolean;
16+
development?: boolean;
1717
loose?: boolean;
1818
looseClasses?: boolean;
19-
looseObjectRestSpread?: boolean;
2019
looseComputedProperties?: boolean;
20+
looseObjectRestSpread?: boolean;
2121
looseParameters?: boolean;
2222
looseTemplateLiterals?: boolean;
23-
typescript?: boolean;
24-
react?: boolean | object;
23+
modules?: "auto" | false | true;
2524
polyfillRegenerator?: boolean;
25+
react?: boolean | object;
26+
removePropTypes?: boolean | object;
27+
targets?: any;
28+
typescript?: boolean;
2629
useBuiltIns?: boolean;
27-
corejs?: boolean | { method?: string; version?: number };
28-
debug?: boolean;
29-
development?: boolean;
3030
};
3131

3232
const babelPresetTypescript = "@babel/preset-typescript";

packages/lint-staged-config/src/config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import typescriptConfig from "./groups/typescript";
1111
import anolilabLintStagedConfig from "./utils/lint-staged-config";
1212

1313
type Groups = {
14-
configName: string;
1514
config: Config;
15+
configName: string;
1616
dependencies: string[];
1717
}[];
1818

packages/lint-staged-config/src/groups/eslint/create-eslint-commands.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import removeIgnoredFiles from "./remove-ignored-files";
66
type ESLintSettings = {
77
settings: {
88
eslint?: {
9-
"max-warnings"?: number | string | false;
10-
rules?: string[];
11-
"fix-type": string[];
129
cache?: boolean;
1310
config?: string;
11+
"fix-type": string[];
12+
"max-warnings"?: number | string | false;
13+
rules?: string[];
1414
};
1515
};
1616
};

packages/package-json-utils/src/index.ts

+9-7
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const getPackageProperty = <T = unknown>(property: string): T | undefined
2323
}
2424

2525
return getByPath(packageJson, property) as T | undefined;
26-
}
26+
};
2727

2828
export const getPackageSubProperty = <T = unknown>(packageProperty: string) => (property: string): T | undefined => getPackageProperty<T>(`${packageProperty}.${property}`);
2929

@@ -39,8 +39,10 @@ export const hasPackageProperties = (properties: string[], strict?: boolean): bo
3939
return properties.some((property: string) => hasPackageProperty(property));
4040
};
4141

42-
export const hasPackageSubProperties = (packageProperty: string) => (properties: string[], strict?: boolean): boolean => hasPackageProperties(properties.map((p) => `${packageProperty}.${p}`),
43-
strict,);
42+
export const hasPackageSubProperties = (packageProperty: string) => (properties: string[], strict?: boolean): boolean => hasPackageProperties(
43+
properties.map((p) => `${packageProperty}.${p}`),
44+
strict,
45+
);
4446

4547
export const environmentIsSet = (name: string): boolean => Boolean(process.env[name] && process.env[name] !== "undefined");
4648

@@ -80,8 +82,8 @@ export const hasDevelopmentDep = hasDevDependencies;
8082

8183
// eslint-disable-next-line max-len
8284
export const hasAnyDep = (arguments_: string[], options?: { peerDeps?: boolean; strict?: boolean }): boolean => [hasDependencies, hasDevDependencies, options?.peerDeps === false ? () => false : hasPeerDependencies].some(
83-
(function_: (arguments_: string[], strict?: boolean) => boolean) => function_(arguments_, options?.strict),
84-
);
85+
(function_: (arguments_: string[], strict?: boolean) => boolean) => function_(arguments_, options?.strict),
86+
);
8587

8688
export const hasTypescript: boolean = (hasDependency("typescript") || hasDevDependency("typescript")) && hasFile("tsconfig.json");
8789

@@ -129,10 +131,10 @@ export const showMissingPackages = (
129131
packageName: string,
130132
packages: string[],
131133
options: {
132-
exit?: boolean;
133134
consoleType?: "error" | "info" | "log" | "warn";
134-
preMessage?: string;
135+
exit?: boolean;
135136
postMessage?: string;
137+
preMessage?: string;
136138
} = {},
137139
): void => {
138140
const s = packages.length === 1 ? "" : "s";

0 commit comments

Comments
 (0)