Update project with latest eslint rules

This commit is contained in:
Debajyoti Halder
2021-01-29 11:55:12 +05:30
parent da661f836e
commit 6106345e6d
49 changed files with 173 additions and 157 deletions
+2 -2
View File
@@ -63,8 +63,8 @@ function serializeConfigData(
}
const sanitizedConfigs = schema.process(appConfigs, {
valueTransform: (value, { visibility }) =>
visibility === 'secret' ? '<secret>' : value,
valueTransform: (value, context) =>
context.visibility === 'secret' ? '<secret>' : value,
});
return ConfigReader.fromConfigs(sanitizedConfigs).get();
@@ -108,7 +108,7 @@ describe('bump', () => {
paths.targetDir = '/';
jest
.spyOn(paths, 'resolveTargetRoot')
.mockImplementation((...paths) => resolvePath('/', ...paths));
.mockImplementation((...path) => resolvePath('/', ...path));
jest.spyOn(runObj, 'runPlain').mockImplementation(async (...[, , , name]) =>
JSON.stringify({
type: 'inspect',
@@ -204,7 +204,7 @@ describe('bump', () => {
paths.targetDir = '/';
jest
.spyOn(paths, 'resolveTargetRoot')
.mockImplementation((...paths) => resolvePath('/', ...paths));
.mockImplementation((...path) => resolvePath('/', ...path));
jest.spyOn(runObj, 'runPlain').mockImplementation(async () => '');
jest.spyOn(runObj, 'run').mockResolvedValue(undefined);
@@ -41,7 +41,7 @@ export class LinkedPackageResolvePlugin implements ResolvePlugin {
callback: () => void,
) => {
const pkg = this.packages.find(
pkg => data.path && isChildPath(pkg.location, data.path),
pkge => data.path && isChildPath(pkge.location, data.path),
);
if (!pkg) {
callback();
+3 -3
View File
@@ -42,14 +42,14 @@ export type BundlingPathsOptions = {
export function resolveBundlingPaths(options: BundlingPathsOptions) {
const { entry } = options;
const resolveTargetModule = (path: string) => {
const resolveTargetModule = (pathString: string) => {
for (const ext of ['mjs', 'js', 'ts', 'tsx', 'jsx']) {
const filePath = paths.resolveTarget(`${path}.${ext}`);
const filePath = paths.resolveTarget(`${pathString}.${ext}`);
if (fs.pathExistsSync(filePath)) {
return filePath;
}
}
return paths.resolveTarget(`${path}.js`);
return paths.resolveTarget(`${pathString}.js`);
};
let targetPublic = undefined;