eslint-config-eventbrite-react
Advanced tools
Comparing version 4.0.0 to 5.0.0
{ | ||
"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 |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
18927
202
58
+ Added@babel/runtime@7.24.6(transitive)
+ Addedaria-query@5.3.0(transitive)
+ Addedast-types-flow@0.0.8(transitive)
+ Addedaxobject-query@3.2.1(transitive)
+ Addeddequal@2.0.3(transitive)
+ Addedemoji-regex@9.2.2(transitive)
+ Addedes-iterator-helpers@1.0.19(transitive)
+ Addedeslint-plugin-jsx-a11y@6.8.0(transitive)
+ Addedis-async-function@2.0.0(transitive)
+ Addedis-finalizationregistry@1.0.2(transitive)
+ Addedis-generator-function@1.0.10(transitive)
+ Addedis-map@2.0.3(transitive)
+ Addedis-set@2.0.3(transitive)
+ Addedis-weakmap@2.0.2(transitive)
+ Addedis-weakset@2.0.3(transitive)
+ Addediterator.prototype@1.1.2(transitive)
+ Addedjsx-ast-utils@3.3.5(transitive)
+ Addedlanguage-subtag-registry@0.3.23(transitive)
+ Addedlanguage-tags@1.0.9(transitive)
+ Addedobject.entries@1.1.8(transitive)
+ Addedreflect.getprototypeof@1.0.6(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
+ Addedwhich-builtin-type@1.1.3(transitive)
+ Addedwhich-collection@1.0.2(transitive)
- Removedeslint-plugin-jsx-a11y@3.0.2(transitive)