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

pa11y-lint-config

Package Overview
Dependencies
Maintainers
8
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pa11y-lint-config - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

eslint/es2009.js

20

package.json
{
"name": "pa11y-lint-config",
"version": "2.0.0",
"version": "3.0.0",
"description": "Linter configurations for Pa11y projects",
"keywords": [],
"author": "Team Pa11y",

@@ -11,18 +10,15 @@ "contributors": [

],
"repository": {
"type": "git",
"url": "https://github.com/pa11y/lint-config.git"
},
"homepage": "https://github.com/pa11y/lint-config",
"bugs": "https://github.com/pa11y/lint-config/issues",
"repository": "github:pa11y/pa11y-lint-config",
"homepage": "https://github.com/pa11y/pa11y-lint-config",
"bugs": "https://github.com/pa11y/pa11y-lint-config/issues",
"license": "LGPL-3.0",
"engines": {
"node": ">=12"
"node": ">=18"
},
"devDependencies": {
"eslint": "^7.27.0"
"eslint": "^8.51.0"
},
"main": "./index.js",
"main": "./.eslintrc.js",
"scripts": {
"test": "make ci"
"test": "eslint ."
},

@@ -29,0 +25,0 @@ "files": [

60

README.md

@@ -1,11 +0,11 @@

# 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.
Linter configurations for Pa11y projects. We use these configurations to ensure Pa11y's coding style remains consistent across our repositories.
[![NPM version][shield-npm]][info-npm]
[![Latest version published to npm][shield-npm]][info-npm]
[![Node.js version support][shield-node]][info-node]
[![ESLint version target][shield-eslint]][eslint]
[![Build status][shield-build]][info-build]
[![LGPL-3.0 licensed][shield-license]][info-license]
## Table Of Contents

@@ -15,20 +15,13 @@

- [Usage](#usage)
- [ESLint](#eslint)
- [Contributing](#contributing)
- [License](#license)
## Requirements
This library requires [Node.js] 14+.
This library requires [Node.js] 18 or above.
## Usage
Pa11y Lint Config provides some linter config files which can be included in your project.
To include these config files in your project, first install [ESLint] and this module, saving them to development dependencies. For example, using npm:
### ESLint
To use the [ESLint] config files, first install this module and ESLint, saving them to development dependencies:
```sh

@@ -38,24 +31,16 @@ 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:
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:
```sh
printf "coverage\n" > .eslintignore
printf "'use strict';\n\nmodule.exports = require('pa11y-lint-config/eslint/2015');\n" > .eslintrc.js
printf "'use strict';\n\nmodule.exports = require('pa11y-lint-config/eslint/es2017');\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`:
Two other standards can replace `es2017` above:
```sh
printf "'use strict';\n\nmodule.exports = require('pa11y-lint-config/eslint/legacy');\n" > .eslintrc.js
```
1. `es2015`, for an ES2015/ES6 project, forgoing the use of more recent syntax additions such as `async`
1. `es2009`, for an ES2009/ES5 project, such as an older client-side codebase
If your project uses more modern syntax (including `async`/`await`), then you'll need to include `eslint/2017` instead of `eslint/2015`:
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.
```sh
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

@@ -70,10 +55,13 @@

```sh
make ci
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)](LICENSE).<br/>
Copyright &copy; 2020, Team Pa11y
Copyright &copy; 2023, Team Pa11y

@@ -85,9 +73,11 @@

[node.js]: https://nodejs.org/
[twitter]: https://twitter.com/pa11yorg
[info-build]: https://github.com/pa11y/pa11y-lint-config/actions/workflows/tests.yml
[info-license]: LICENSE
[info-npm]: https://www.npmjs.com/package/pa11y-ci
[info-build]: https://travis-ci.org/pa11y/pa11y-lint-config
[shield-license]: https://img.shields.io/badge/license-LGPL%203.0-blue.svg
[shield-npm]: https://img.shields.io/npm/v/pa11y-lint-config.svg
[shield-build]: https://img.shields.io/travis/pa11y/pa11y-lint-config/master.svg
[info-node]: package.json
[info-npm]: https://www.npmjs.com/package/pa11y-lint-config
[shield-build]: https://github.com/pa11y/pa11y-lint-config/actions/workflows/tests.yml/badge.svg
[shield-eslint]: https://img.shields.io/npm/dependency-version/pa11y-lint-config/dev/eslint
[shield-license]: https://img.shields.io/badge/license-LGPL%203.0-blue
[shield-node]: https://img.shields.io/node/v/pa11y-lint-config
[shield-npm]: https://img.shields.io/npm/v/pa11y-lint-config
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