Skip to content

Commit

Permalink
fix: correct additionalData typo (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmckeb committed Feb 19, 2023
1 parent 161b626 commit da7b048
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/__tests__/getDtsSnapshot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/getCssExports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? {};
Expand Down
2 changes: 1 addition & 1 deletion src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface RendererOptions {
}

export interface Options {
additonalData?: string;
additionalData?: string;
allowUnknownClassnames?: boolean;
classnameTransform?: ClassnameTransformOptions;
customMatcher?: string;
Expand Down

0 comments on commit da7b048

Please sign in to comment.