Skip to content

Commit da7b048

Browse files
authored
fix: correct additionalData typo (#204)
1 parent 161b626 commit da7b048

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Please note that no options are required. However, depending on your configurati
9999

100100
| Option | Default value | Description |
101101
| -------------------------- | ---------------------------------- | ------------------------------------------------------------------------------ |
102-
| `additonalData` | `undefined` | An optional string to append to the top of source files. |
102+
| `additionalData` | `undefined` | An optional string to append to the top of source files. |
103103
| `allowUnknownClassnames` | `false` | Disables TypeScript warnings on unknown classnames (for default imports only). |
104104
| `classnameTransform` | `"asIs"` | See [`classnameTransform`](#classnameTransform) below. |
105105
| `customMatcher` | `"\\.module\\.(c\|le\|sa\|sc)ss$"` | Changes the file extensions that this plugin processes. |

src/helpers/__tests__/getDtsSnapshot.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,11 @@ describe('helpers / cssSnapshots', () => {
331331
});
332332
});
333333

334-
describe('with additonalData enabled', () => {
334+
describe('with additionalData enabled', () => {
335335
const fileName = join(__dirname, 'fixtures', 'test.module.scss');
336336
const css = readFileSync(fileName, 'utf8');
337337
const options: Options = {
338-
additonalData: '.my-data {\n color: red;\n}\n\n',
338+
additionalData: '.my-data {\n color: red;\n}\n\n',
339339
};
340340

341341
const cssExports = getCssExports({

src/helpers/getCssExports.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const getCssExports = ({
5252
compilerOptions: tsModule.CompilerOptions;
5353
directory: string;
5454
}): CSSExportsWithSourceMap => {
55-
const rawCss = options.additonalData ? options.additonalData + css : css;
55+
const rawCss = options.additionalData ? options.additionalData + css : css;
5656

5757
const fileType = getFileType(fileName);
5858
const rendererOptions = options.rendererOptions ?? {};

src/options.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface RendererOptions {
2020
}
2121

2222
export interface Options {
23-
additonalData?: string;
23+
additionalData?: string;
2424
allowUnknownClassnames?: boolean;
2525
classnameTransform?: ClassnameTransformOptions;
2626
customMatcher?: string;

0 commit comments

Comments
 (0)