Socket
Socket
Sign inDemoInstall

eslint-config-eventbrite-react

Package Overview
Dependencies
306
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0 to 5.0.0

8

package.json
{
"name": "eslint-config-eventbrite-react",
"version": "4.0.0",
"version": "5.0.0",
"description": "Eventbrites's ESLint config that lints React & JSX, adhering to the Eventbrite JavaScript Coding Style Guide",

@@ -36,3 +36,3 @@ "main": "index.js",

"dependencies": {
"eslint-config-eventbrite": "^4.0.0"
"eslint-config-eventbrite": "^4.1.0"
},

@@ -44,3 +44,3 @@ "devDependencies": {

"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^3.0.1",
"eslint-plugin-jsx-a11y": "^6.0.0",
"eslint-plugin-react": "^6.7.1",

@@ -53,3 +53,3 @@ "pre-commit": "^1.1.2"

"eslint-plugin-import": "^2.0.0",
"eslint-plugin-jsx-a11y": "^3.0.0",
"eslint-plugin-jsx-a11y": "^6.0.0",
"eslint-plugin-react": "^6.0.0"

@@ -56,0 +56,0 @@ },

@@ -14,10 +14,23 @@ # eslint-config-eventbrite-react

Install `eslint`, `eslint-plugin-import`, `eslint-plugin-react`, `eslint-plugin-jsx-a11y`, `babel-eslint` & `eslint-config-eventbrite-react` dependencies:
#### Install peer dependencies if they are not installed already
- Using npm
```sh
npm install --save-dev eslint eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11y babel-eslint eslint-config-eventbrite-react
```
```npm install --save-dev eslint@^3.0.0 eslint-plugin-import@^2.0.0 eslint-plugin-react@^6.0.0 eslint-plugin-jsx-a11y@^6.0.0 babel-eslint@^7.0.0```
Extend `eslint-config-eventbrite-react` in your [`.eslintrc.json`](http://eslint.org/docs/user-guide/configuring#extending-configuration-files):
- Using yarn
```yarn add -D eslint@^3.0.0 eslint-plugin-import@^2.0.0 eslint-plugin-react@^6.0.0 eslint-plugin-jsx-a11y@^6.0.0 babel-eslint@^7.0.0```
#### Install eslint-config-eventbrite-react
- Using npm
```npm install --save-dev eslint-config-eventbrite-react```
- Using yarn
```yarn add -D eslint-config-eventbrite-react```
#### Extend `eslint-config-eventbrite-react` in your [`.eslintrc.json`](http://eslint.org/docs/user-guide/configuring#extending-configuration-files):
```json

@@ -24,0 +37,0 @@ {

@@ -0,1 +1,2 @@

//NOTE: When adding new rules or modifying existing ones, make sure your changes are compatible with the existing version of the current `eslint-plugin-jsx-a11y` package. Also, don't forget to alphabetize below :)
module.exports = {

@@ -7,2 +8,5 @@ plugins: ['jsx-a11y'],

rules: {
// Enforce that `<img> <area> <input type="image"> <object>` JSX elements use the `alt` prop
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md
'jsx-a11y/alt-text': 'error',

@@ -13,30 +17,6 @@ // Enforce all anchors to contain accessible content.

// Enforce a clickable non-interactive element has at least one keyboard event listener.
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/click-events-have-key-events.md
'jsx-a11y/click-events-have-key-events': 'error',
// Enforce an anchor element contains a valid `href` attribute and if it can be replaced by a button
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md
'jsx-a11y/anchor-is-valid': ['error', {components: ['Link']}],
// Enforce heading (h1, h2, etc) elements contain accessible content.
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md
'jsx-a11y/heading-has-content': 'error',
// Enforce lang attribute has a valid value.
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/lang.md
'jsx-a11y/lang': 'error',
// Enforce distracting elements are not used.
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-distracting-elements.md
'jsx-a11y/no-distracting-elements': 'error',
// Enforce explicit role property is not the same as implicit/default role property on element.
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-redundant-roles.md
'jsx-a11y/no-redundant-roles': 'error',
// Enforce non-interactive elements have no interactive handlers.
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
'jsx-a11y/no-static-element-interactions': 'error',
// Enforce scope prop is only used on <th> elements.
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/scope.md
'jsx-a11y/scope': 'error',
// Enforce all `aria-*` props are valid

@@ -59,9 +39,9 @@ // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md

// Enforce an anchor element's `href` prop value is not just `#`
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/href-no-hash.md
'jsx-a11y/href-no-hash': 'error',
// Enforce a clickable non-interactive element has at least one keyboard event listener.
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/click-events-have-key-events.md
'jsx-a11y/click-events-have-key-events': 'error',
// Enforce that `<img>` JSX elements use the `alt` prop
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/img-has-alt.md
'jsx-a11y/img-has-alt': 'error',
// Enforce heading (h1, h2, etc) elements contain accessible content.
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md
'jsx-a11y/heading-has-content': 'error',

@@ -72,2 +52,6 @@ // Enforce `<img>` alt prop does not contain the word "image", "picture", or "photo"

// Enforce that elements with `onClick` handlers must be focusable
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/interactive-supports-focus.md
'jsx-a11y/interactive-supports-focus': 'error',
// Enforce that `<label>` & (custom) <Label> elements have the `htmlFor` prop

@@ -77,2 +61,6 @@ // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md

// Enforce lang attribute has a valid value.
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/lang.md
'jsx-a11y/lang': 'error',
// Enforce that onMouseOver/onMouseOut are accompanied by onFocus/onBlur

@@ -88,2 +76,6 @@ // for keyboard-only users

// Enforce distracting elements are not used.
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-distracting-elements.md
'jsx-a11y/no-distracting-elements': 'error',
// Don't enforce that `onBlur` is used instead of (or more likely in parallel with) `onChange`

@@ -94,11 +86,15 @@ // NOTE: We may want to consider this later, but this has UX implications

// Enforce that elements with `onClick` handlers must be focusable
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/onclick-has-focus.md
'jsx-a11y/onclick-has-focus': 'error',
// Enforce that non-interactive, visible elements (such as `<div>`)
// that have click handlers use the role attribute
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/onclick-has-role.md
'jsx-a11y/onclick-has-role': 'error',
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-interactions.md
'jsx-a11y/no-noninteractive-element-interactions': 'error',
// Enforce explicit role property is not the same as implicit/default role property on element.
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-redundant-roles.md
'jsx-a11y/no-redundant-roles': 'error',
// Enforce non-interactive elements have no interactive handlers.
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
'jsx-a11y/no-static-element-interactions': 'error',
// Enforce that elements with ARIA roles must have all required attributes for that role

@@ -113,2 +109,6 @@ // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md

// Enforce scope prop is only used on <th> elements.
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/scope.md
'jsx-a11y/scope': 'error',
// Enforce `tabIndex` value is not greater than zero

@@ -115,0 +115,0 @@ // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/tabindex-no-positive.md

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc