pa11y-ci icon indicating copy to clipboard operation
pa11y-ci copied to clipboard

Add support for `.cjs` extension

Open na2axl opened this issue 9 months ago • 0 comments

Hey there,

I just added a small change to add support for .cjs extensions. I think for most modern Javascript projects we use ES6 modules instead for CommonJS, so even for frameworks such as SvelteKit (what we use in our company) or Next.js the default setting for .js files is module (defined in package.json). In such cases, we usually use .cjs extension for CommonJS files.

I was unable to run pa11y-ci with a custom config other than a JSON file because it was not allowing me to use a .js file and the .cjs extension was not recognized.

With the provided change, I can run pa11y in our project.

na2axl avatar May 16 '24 14:05 na2axl