Skip to content

Commit

Permalink
[New] Support ESLint 7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey authored and ljharb committed May 9, 2020
1 parent e9087e9 commit 3000cca
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 24 deletions.
21 changes: 8 additions & 13 deletions .travis.yml
@@ -1,12 +1,10 @@
language: node_js
node_js:
- "14"
- "12"
- "10"
- "9"
- "8"
- "7"
- "6"
- "5"
- "4"
cache:
yarn: true
Expand All @@ -29,6 +27,7 @@ env:
global:
- TEST=true
matrix:
- ESLINT=7
- ESLINT=6
- ESLINT=5
- ESLINT=4
Expand All @@ -45,19 +44,15 @@ matrix:
env: ESLINT=5
- node_js: "4"
env: ESLINT=6
- node_js: "5"
env: ESLINT=5
- node_js: "4"
env: ESLINT=7
- node_js: "6"
env: ESLINT=6
- node_js: "6"
env: ESLINT=7
- node_js: "8"
env: ESLINT=7
allow_failures:
- node_js: "7"
env: ESLINT=6
- node_js: "5"
env: ESLINT=6
- node_js: "5"
env: ESLINT=4
- node_js: "5"
env: ESLINT=3
- node_js: "4"
env: ESLINT=4
- node_js: "4"
Expand Down
1 change: 0 additions & 1 deletion __tests__/src/rules/alt-text-test.js
Expand Up @@ -50,7 +50,6 @@ const array = [{
'input[type="image"]': ['InputImage'],
}];


ruleTester.run('alt-text', rule, {
valid: [
// DEFAULT ELEMENT 'img' TESTS
Expand Down
1 change: 0 additions & 1 deletion __tests__/src/rules/label-has-for-test.js
Expand Up @@ -34,7 +34,6 @@ const expectedEveryError = {
type: 'JSXOpeningElement',
};


const optionsComponents = [{
components: ['Label', 'Descriptor'],
}];
Expand Down
1 change: 0 additions & 1 deletion __tests__/src/rules/no-onchange-test.js
Expand Up @@ -4,7 +4,6 @@
* @author Ethan Cohen
*/


// -----------------------------------------------------------------------------
// Requirements
// -----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion __tests__/src/rules/role-has-required-aria-props-test.js
Expand Up @@ -29,7 +29,6 @@ const errorMessage = (role) => {
};
};


// Create basic test cases using all valid role types.
const basicValidityTests = [...roles.keys()].map((role) => {
const {
Expand Down
1 change: 0 additions & 1 deletion __tests__/src/util/hasAccessibleChild-test.js
Expand Up @@ -11,7 +11,6 @@ describe('hasAccessibleChild', () => {
});
});


describe('has no children and sets dangerouslySetInnerHTML', () => {
it('Returns true', () => {
const prop = JSXAttributeMock('dangerouslySetInnerHTML', true);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -37,7 +37,7 @@
"babel-jest": "^24.9.0",
"babel-preset-airbnb": "^5.0.0",
"coveralls": "^3.1.0",
"eslint": "^3 || ^4 || ^5 || ^6",
"eslint": "^3 || ^4 || ^5 || ^6 || ^7",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-plugin-flowtype": "^5.1.3",
"eslint-plugin-import": "^2.21.2",
Expand Down Expand Up @@ -70,7 +70,7 @@
"jsx-ast-utils": "^2.2.1"
},
"peerDependencies": {
"eslint": "^3 || ^4 || ^5 || ^6"
"eslint": "^3 || ^4 || ^5 || ^6 || ^7"
},
"jest": {
"coverageReporters": [
Expand Down
1 change: 0 additions & 1 deletion src/rules/alt-text.js
Expand Up @@ -218,7 +218,6 @@ module.exports = {
return type;
}));


return {
JSXOpeningElement: (node) => {
const nodeType = elementType(node);
Expand Down
1 change: 0 additions & 1 deletion src/rules/anchor-has-content.js
Expand Up @@ -11,7 +11,6 @@ import { elementType } from 'jsx-ast-utils';
import { arraySchema, generateObjSchema } from '../util/schemas';
import hasAccessibleChild from '../util/hasAccessibleChild';


const errorMessage = 'Anchors must have content and the content must be accessible by a screen reader.';

const schema = generateObjSchema({ components: arraySchema });
Expand Down
1 change: 0 additions & 1 deletion src/rules/no-distracting-elements.js
Expand Up @@ -14,7 +14,6 @@ const errorMessage = (element) => (
`Do not use <${element}> elements as they can create visual accessibility issues and are deprecated.`
);


const DEFAULT_ELEMENTS = [
'marquee',
'blink',
Expand Down
1 change: 0 additions & 1 deletion src/rules/no-noninteractive-tabindex.js
Expand Up @@ -58,7 +58,6 @@ module.exports = {
}
const role = getLiteralPropValue(getProp(node.attributes, 'role'));


if (!dom.has(type)) {
// Do not test higher level JSX components, as we do not know what
// low-level DOM element this maps to.
Expand Down

0 comments on commit 3000cca

Please sign in to comment.