Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pa11y-lint-config

Package Overview
Dependencies
Maintainers
7
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pa11y-lint-config

Linter configurations for Pa11y projects

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

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.

NPM version Build status LGPL-3.0 licensed

Table Of Contents

Requirements

This library requires Node.js 14+.

Usage

Pa11y Lint Config provides some linter config files which can be included in your project.

ESLint

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 .eslintrc.js and .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 eslint/2015:

printf "'use strict';\n\nmodule.exports = require('pa11y-lint-config/eslint/legacy');\n" > .eslintrc.js

If your project uses more modern syntax (including async/await), then you'll need to include eslint/2017 instead of eslint/2015:

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.

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:

make ci

Licence

Licensed under the Lesser General Public License (LGPL-3.0).
Copyright © 2020, Team Pa11y

FAQs

Package last updated on 26 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc