From 15aa4021b637f472253574e7232f64cdd311dbfb Mon Sep 17 00:00:00 2001 From: Brody McKee Date: Sun, 19 Feb 2023 14:46:32 +1100 Subject: [PATCH] fix: correct `additionalData` typo --- README.md | 2 +- src/helpers/__tests__/getDtsSnapshot.test.ts | 4 ++-- src/helpers/getCssExports.ts | 2 +- src/options.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cca61e4..59d0190 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ Please note that no options are required. However, depending on your configurati | Option | Default value | Description | | -------------------------- | ---------------------------------- | ------------------------------------------------------------------------------ | -| `additonalData` | `undefined` | An optional string to append to the top of source files. | +| `additionalData` | `undefined` | An optional string to append to the top of source files. | | `allowUnknownClassnames` | `false` | Disables TypeScript warnings on unknown classnames (for default imports only). | | `classnameTransform` | `"asIs"` | See [`classnameTransform`](#classnameTransform) below. | | `customMatcher` | `"\\.module\\.(c\|le\|sa\|sc)ss$"` | Changes the file extensions that this plugin processes. | diff --git a/src/helpers/__tests__/getDtsSnapshot.test.ts b/src/helpers/__tests__/getDtsSnapshot.test.ts index 99041d4..91f98a8 100644 --- a/src/helpers/__tests__/getDtsSnapshot.test.ts +++ b/src/helpers/__tests__/getDtsSnapshot.test.ts @@ -331,11 +331,11 @@ describe('helpers / cssSnapshots', () => { }); }); - describe('with additonalData enabled', () => { + describe('with additionalData enabled', () => { const fileName = join(__dirname, 'fixtures', 'test.module.scss'); const css = readFileSync(fileName, 'utf8'); const options: Options = { - additonalData: '.my-data {\n color: red;\n}\n\n', + additionalData: '.my-data {\n color: red;\n}\n\n', }; const cssExports = getCssExports({ diff --git a/src/helpers/getCssExports.ts b/src/helpers/getCssExports.ts index 009b416..530245a 100644 --- a/src/helpers/getCssExports.ts +++ b/src/helpers/getCssExports.ts @@ -52,7 +52,7 @@ export const getCssExports = ({ compilerOptions: tsModule.CompilerOptions; directory: string; }): CSSExportsWithSourceMap => { - const rawCss = options.additonalData ? options.additonalData + css : css; + const rawCss = options.additionalData ? options.additionalData + css : css; const fileType = getFileType(fileName); const rendererOptions = options.rendererOptions ?? {}; diff --git a/src/options.ts b/src/options.ts index fcf9a9a..85a2f1c 100644 --- a/src/options.ts +++ b/src/options.ts @@ -20,7 +20,7 @@ export interface RendererOptions { } export interface Options { - additonalData?: string; + additionalData?: string; allowUnknownClassnames?: boolean; classnameTransform?: ClassnameTransformOptions; customMatcher?: string;