Skip to content

Commit 4e5e48a

Browse files
authored
(types): enforce stricter typings (#475)
- noUnusedParameters, noImplicitReturns, and noFallthroughCasesInSwitch - improve typings for 1 unused parameter and 1 implicit return - also remove noImplicitAny as that's redundant with strict: true
1 parent 40ba936 commit 4e5e48a

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/babelPluginTsdx.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const createConfigItems = (type: any, items: any[]) => {
4747
});
4848
};
4949

50-
export const babelPluginTsdx = babelPlugin.custom((babelCore: any) => ({
50+
export const babelPluginTsdx = babelPlugin.custom(() => ({
5151
// Passed the plugin options.
5252
options({ custom: customOptions, ...pluginOptions }: any) {
5353
return {

src/createEslintConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export async function createEslintConfig({
1414
pkg,
1515
rootDir,
1616
writeFile,
17-
}: CreateEslintConfigArgs): Promise<CLIEngine.Options['baseConfig']> {
17+
}: CreateEslintConfigArgs): Promise<CLIEngine.Options['baseConfig'] | void> {
1818
const isReactLibrary = Boolean(getReactVersion(pkg));
1919

2020
const config = {

tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
"module": "commonjs",
1212
"rootDir": "src",
1313
"strict": true,
14-
"noImplicitAny": true,
1514
"noUnusedLocals": true,
15+
"noUnusedParameters": true,
16+
"noImplicitReturns": true,
17+
"noFallthroughCasesInSwitch": true,
1618
"skipLibCheck": true,
1719
"target": "es2017"
1820
}

0 commit comments

Comments
 (0)