├── .editorconfig ├── .eslintrc ├── .github ├── CODE_OF_CONDUCT.md ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── images │ └── example.gif └── workflows │ └── ci.yml ├── .gitignore ├── .husky └── pre-commit ├── .nvmrc ├── .prettierignore ├── LICENSE ├── README.md ├── jest.config.js ├── package.json ├── pnpm-lock.yaml ├── src ├── @types │ └── postcss-import-sync2.d.ts ├── helpers │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ ├── classTransforms.test.ts.snap │ │ │ └── getDtsSnapshot.test.ts.snap │ │ ├── classTransforms.test.ts │ │ ├── createMatchers.test.ts │ │ ├── cssExtensions.test.ts │ │ ├── external │ │ │ └── package │ │ │ │ ├── _external.module.scss │ │ │ │ ├── _external.module.styl │ │ │ │ └── public.module.scss │ │ ├── filterPlugins.test.ts │ │ ├── fixtures │ │ │ ├── _composed.css │ │ │ ├── _mixin.scss │ │ │ ├── _partial.scss │ │ │ ├── bootstrap.module.scss │ │ │ ├── customRenderer.js │ │ │ ├── customTemplate.js │ │ │ ├── empty.module.less │ │ │ ├── empty.module.sass │ │ │ ├── empty.module.scss │ │ │ ├── empty.module.styl │ │ │ ├── import.module.css │ │ │ ├── import.module.less │ │ │ ├── import.module.styl │ │ │ ├── include-path.module.scss │ │ │ ├── include-path.module.styl │ │ │ ├── my-folder │ │ │ │ └── _index.scss │ │ │ ├── partial.module.scss │ │ │ ├── postcss.module.css │ │ │ ├── test.module.css │ │ │ ├── test.module.less │ │ │ ├── test.module.sass │ │ │ ├── test.module.scss │ │ │ ├── test.module.styl │ │ │ └── tsconfig-paths.module.scss │ │ └── getDtsSnapshot.test.ts │ ├── classTransforms.ts │ ├── createDtsExports.ts │ ├── createMatchers.ts │ ├── cssExtensions.ts │ ├── filterPlugins.ts │ ├── getCssExports.ts │ ├── getDtsSnapshot.ts │ ├── getProcessor.ts │ ├── logger.ts │ └── validVarRegexp.ts ├── importers │ ├── __tests__ │ │ └── sassTildeImporter.ts │ └── sassTildeImporter.ts ├── index.ts ├── options.ts └── setup-tests.ts ├── tsconfig.build.json └── tsconfig.json /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/.editorconfig -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/.eslintrc -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/.github/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/.github/ISSUE_TEMPLATE/bug_report.md -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/.github/ISSUE_TEMPLATE/feature_request.md -------------------------------------------------------------------------------- /.github/images/example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/.github/images/example.gif -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/.gitignore -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | pnpm lint-staged 5 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 18.x 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | pnpm-lock.yaml 2 | /dist/ 3 | *.snap 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/README.md -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/jest.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/package.json -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/pnpm-lock.yaml -------------------------------------------------------------------------------- /src/@types/postcss-import-sync2.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/@types/postcss-import-sync2.d.ts -------------------------------------------------------------------------------- /src/helpers/__tests__/__snapshots__/classTransforms.test.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/__snapshots__/classTransforms.test.ts.snap -------------------------------------------------------------------------------- /src/helpers/__tests__/__snapshots__/getDtsSnapshot.test.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/__snapshots__/getDtsSnapshot.test.ts.snap -------------------------------------------------------------------------------- /src/helpers/__tests__/classTransforms.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/classTransforms.test.ts -------------------------------------------------------------------------------- /src/helpers/__tests__/createMatchers.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/createMatchers.test.ts -------------------------------------------------------------------------------- /src/helpers/__tests__/cssExtensions.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/cssExtensions.test.ts -------------------------------------------------------------------------------- /src/helpers/__tests__/external/package/_external.module.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/external/package/_external.module.scss -------------------------------------------------------------------------------- /src/helpers/__tests__/external/package/_external.module.styl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/external/package/_external.module.styl -------------------------------------------------------------------------------- /src/helpers/__tests__/external/package/public.module.scss: -------------------------------------------------------------------------------- 1 | .public-module { 2 | color: green; 3 | } 4 | -------------------------------------------------------------------------------- /src/helpers/__tests__/filterPlugins.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/filterPlugins.test.ts -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/_composed.css: -------------------------------------------------------------------------------- 1 | .className { 2 | width: 100%; 3 | } 4 | -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/_mixin.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/fixtures/_mixin.scss -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/_partial.scss: -------------------------------------------------------------------------------- 1 | $primary-color: rebeccapurple; 2 | -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/bootstrap.module.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/fixtures/bootstrap.module.scss -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/customRenderer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/fixtures/customRenderer.js -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/customTemplate.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/fixtures/customTemplate.js -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/empty.module.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/empty.module.sass: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/empty.module.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/empty.module.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/import.module.css: -------------------------------------------------------------------------------- 1 | @import 'test.module.css'; 2 | -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/import.module.less: -------------------------------------------------------------------------------- 1 | @import 'test.module.less'; 2 | -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/import.module.styl: -------------------------------------------------------------------------------- 1 | @import 'test.module.styl'; 2 | -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/include-path.module.scss: -------------------------------------------------------------------------------- 1 | @import 'package/external.module.scss'; 2 | -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/include-path.module.styl: -------------------------------------------------------------------------------- 1 | @import 'package/_external.module.styl'; 2 | -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/my-folder/_index.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/fixtures/my-folder/_index.scss -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/partial.module.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/fixtures/partial.module.scss -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/postcss.module.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/fixtures/postcss.module.css -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/test.module.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/fixtures/test.module.css -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/test.module.less: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/fixtures/test.module.less -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/test.module.sass: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/fixtures/test.module.sass -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/test.module.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/fixtures/test.module.scss -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/test.module.styl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/fixtures/test.module.styl -------------------------------------------------------------------------------- /src/helpers/__tests__/fixtures/tsconfig-paths.module.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/fixtures/tsconfig-paths.module.scss -------------------------------------------------------------------------------- /src/helpers/__tests__/getDtsSnapshot.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/__tests__/getDtsSnapshot.test.ts -------------------------------------------------------------------------------- /src/helpers/classTransforms.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/classTransforms.ts -------------------------------------------------------------------------------- /src/helpers/createDtsExports.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/createDtsExports.ts -------------------------------------------------------------------------------- /src/helpers/createMatchers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/createMatchers.ts -------------------------------------------------------------------------------- /src/helpers/cssExtensions.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/cssExtensions.ts -------------------------------------------------------------------------------- /src/helpers/filterPlugins.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/filterPlugins.ts -------------------------------------------------------------------------------- /src/helpers/getCssExports.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/getCssExports.ts -------------------------------------------------------------------------------- /src/helpers/getDtsSnapshot.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/getDtsSnapshot.ts -------------------------------------------------------------------------------- /src/helpers/getProcessor.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/getProcessor.ts -------------------------------------------------------------------------------- /src/helpers/logger.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/logger.ts -------------------------------------------------------------------------------- /src/helpers/validVarRegexp.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/helpers/validVarRegexp.ts -------------------------------------------------------------------------------- /src/importers/__tests__/sassTildeImporter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/importers/__tests__/sassTildeImporter.ts -------------------------------------------------------------------------------- /src/importers/sassTildeImporter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/importers/sassTildeImporter.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/options.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/options.ts -------------------------------------------------------------------------------- /src/setup-tests.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/src/setup-tests.ts -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/tsconfig.build.json -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrmckeb/typescript-plugin-css-modules/HEAD/tsconfig.json --------------------------------------------------------------------------------