Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for .cjs extension #240

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add support for .cjs extension #240

wants to merge 1 commit into from

Conversation

na2axl
Copy link

@na2axl na2axl commented May 16, 2024

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.

Signed-off-by: Axel Nana <axel.nana@workbud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant