Skip to content

Commit

Permalink
- updates for review
Browse files Browse the repository at this point in the history
  • Loading branch information
ezolenko committed Sep 26, 2023
1 parent 6f0146d commit 6a464e8
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.cjs
Expand Up @@ -4,5 +4,8 @@ module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
root: true,
ignorePatterns: ['__tests__/**', 'dist/**', 'node_modules/**', 'build-self/**', '*.js'],
ignorePatterns: ['dist/**', 'node_modules/**', 'build-self/**', '*.js', "__tests__/integration/fixtures/errors/**"],
rules: {
"@typescript-eslint/no-explicit-any": "off",
}
};
2 changes: 1 addition & 1 deletion __tests__/fixtures/context.ts
Expand Up @@ -18,4 +18,4 @@ export function makeContext(): PluginContext & RollupContext {
info: jest.fn(returnText),
debug: jest.fn(returnText),
} as unknown as PluginContext & RollupContext;
};
}
1 change: 1 addition & 0 deletions __tests__/tslib.spec.ts
Expand Up @@ -14,6 +14,7 @@ test("tslib", async () => {
jest.unmock("tslib/package.json");

const { tslibVersion, tslibSource } = await import("../src/tslib");
// eslint-disable-next-line @typescript-eslint/no-var-requires
expect(tslibVersion).toEqual(require("tslib/package.json").version);

const tslibES6 = await fs.readFile(require.resolve("tslib/tslib.es6.js"), "utf8");
Expand Down
3 changes: 0 additions & 3 deletions src/index.ts
Expand Up @@ -17,11 +17,8 @@ import { TSLIB, TSLIB_VIRTUAL, tslibSource, tslibVersion } from "./tslib";
import { createFilter } from "./get-options-overrides";

// these use globals during testing and are substituted by rollup-plugin-re during builds
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const TS_VERSION_RANGE = (global as any)?.rpt2__TS_VERSION_RANGE || "$TS_VERSION_RANGE";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const ROLLUP_VERSION_RANGE = (global as any)?.rpt2__ROLLUP_VERSION_RANGE || "$ROLLUP_VERSION_RANGE";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const RPT2_VERSION = (global as any)?.rpt2__ROLLUP_VERSION_RANGE || "$RPT2_VERSION";

type RPT2Options = Partial<IOptions>;
Expand Down
2 changes: 0 additions & 2 deletions src/ioptions.ts
Expand Up @@ -25,10 +25,8 @@ export interface IOptions
tsconfig?: string;
useTsconfigDeclarationDir: boolean;
typescript: typeof tsModule;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
tsconfigOverride: any;
transformers: TransformerFactoryCreator[];
// eslint-disable-next-line @typescript-eslint/no-explicit-any
tsconfigDefaults: any;
sourceMapCallback: (id: string, map: string) => void;
objectHashIgnoreUnknownHack: boolean;
Expand Down
1 change: 0 additions & 1 deletion src/parse-tsconfig.ts
Expand Up @@ -15,7 +15,6 @@ export function parseTsConfig(context: RollupContext, pluginOptions: IOptions)
if (pluginOptions.tsconfig !== undefined && !fileName)
context.error(`failed to open '${pluginOptions.tsconfig}'`);

// eslint-disable-next-line @typescript-eslint/no-explicit-any
let loadedConfig: any = {};
let baseDir = pluginOptions.cwd;
let configFileName;
Expand Down
1 change: 0 additions & 1 deletion src/tscache.ts
Expand Up @@ -78,7 +78,6 @@ export class TsCache
private syntacticDiagnosticsCache!: ICache<IDiagnostics[]>;
private hashOptions = { algorithm: "sha1", ignoreUnknown: false };

// eslint-disable-next-line @typescript-eslint/no-explicit-any
constructor(private noCache: boolean, runClean: boolean, hashIgnoreUnknown: boolean, private host: tsTypes.LanguageServiceHost, private cacheRoot: string, private options: tsTypes.CompilerOptions, private rollupConfig: any, rootFilenames: string[], private context: RollupContext)
{
this.dependencyTree = new Graph({ directed: true });
Expand Down

0 comments on commit 6a464e8

Please sign in to comment.