pa11y-lint-config
v3.0.0
Published
Linter configurations for Pa11y projects
Downloads
9,128
Maintainers
Keywords
Readme
Pa11y Lint Config
Linter configurations for Pa11y projects. We use these configurations to ensure Pa11y's coding style remains consistent across our repositories.
Table Of Contents
Requirements
This library requires Node.js 18 or above.
Usage
To include these config files in your project, first install ESLint and this module, saving them to development dependencies. For example, using npm:
npm install --save-dev eslint pa11y-lint-config
Now create the files .eslintrc.js
and .eslintignore
in your project root. The following command will create both files and populate them with sensible settings for a new Pa11y project:
printf "coverage\n" > .eslintignore
printf "'use strict';\n\nmodule.exports = require('pa11y-lint-config/eslint/es2017');\n" > .eslintrc.js
Two other standards can replace es2017
above:
es2015
, for an ES2015/ES6 project, forgoing the use of more recent syntax additions such asasync
es2009
, for an ES2009/ES5 project, such as an older client-side codebase
A project which contains more than one standard, for example ES2017 for the server and ES2015 for the browser, can support each required standard by including a different config file in each relevant subdirectory.
Contributing
There are many ways to contribute to Pa11y Lint Config, we cover these in the contributing guide for this repo.
If you're ready to contribute some code, clone this repo locally and commit your code on a new branch.
Please check that everything works by running the following before opening a PR:
npm test
Support
When we release a new major version we will continue to support the previous major version for 6 months. This support will be limited to fixes for critical bugs and security issues.
Licence
Licensed under the Lesser General Public License (LGPL-3.0). Copyright © 2023, Team Pa11y