Pa11y Lint Config
Linter configurations for Pa11y projects. This module should be used to ensure that the Pa11y coding style is consistent across all of our repositories.
Table Of Contents
This library requires Node.js 4+.
Pa11y Lint Config provides some linter config files which can be included in your project.
To use the ESLint config files, first install this module and ESLint, saving them to development dependencies:
npm install --save-dev eslint pa11y-lint-config
Now you should create
.eslintignore files in your project root. The command below provides some defaults which should be enough for most new Pa11y projects:
printf "coverage\n" > .eslintignore printf "'use strict';\n\nmodule.exports = require('pa11y-lint-config/eslint/2015');\n" > .eslintrc.js
If your project uses ES5 syntax (should mostly be browser or legacy projects), then you'll need to include
eslint/legacy instead of
printf "'use strict';\n\nmodule.exports = require('pa11y-lint-config/eslint/legacy');\n" > .eslintrc.js
If your project uses more modern syntax (including
await), then you'll need to include
eslint/2017 instead of
printf "'use strict';\n\nmodule.exports = require('pa11y-lint-config/eslint/2017');\n" > .eslintrc.js
If your project contains a mix of ES6 and ES5 (e.g. Node.js and browser) then you can include different config files in each directory.
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:
Licensed under the Lesser General Public License (LGPL-3.0).
Copyright © 2017, Team Pa11y