Skip to content

Commit

Permalink
(types): enforce stricter typings (#475)
Browse files Browse the repository at this point in the history
- noUnusedParameters, noImplicitReturns, and noFallthroughCasesInSwitch
  - improve typings for 1 unused parameter and 1 implicit return

- also remove noImplicitAny as that's redundant with strict: true
  • Loading branch information
agilgur5 committed Feb 2, 2020
1 parent 40ba936 commit 4e5e48a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/babelPluginTsdx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const createConfigItems = (type: any, items: any[]) => {
});
};

export const babelPluginTsdx = babelPlugin.custom((babelCore: any) => ({
export const babelPluginTsdx = babelPlugin.custom(() => ({
// Passed the plugin options.
options({ custom: customOptions, ...pluginOptions }: any) {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/createEslintConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function createEslintConfig({
pkg,
rootDir,
writeFile,
}: CreateEslintConfigArgs): Promise<CLIEngine.Options['baseConfig']> {
}: CreateEslintConfigArgs): Promise<CLIEngine.Options['baseConfig'] | void> {
const isReactLibrary = Boolean(getReactVersion(pkg));

const config = {
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
"module": "commonjs",
"rootDir": "src",
"strict": true,
"noImplicitAny": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true,
"target": "es2017"
}
Expand Down

0 comments on commit 4e5e48a

Please sign in to comment.