diff --git a/.travis.yml b/.travis.yml index b5a99d3b2..94b84fabe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,10 @@ language: node_js node_js: + - "14" - "12" - "10" - - "9" - "8" - - "7" - "6" - - "5" - "4" cache: yarn: true @@ -29,6 +27,7 @@ env: global: - TEST=true matrix: + - ESLINT=7 - ESLINT=6 - ESLINT=5 - ESLINT=4 @@ -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" diff --git a/__tests__/src/rules/alt-text-test.js b/__tests__/src/rules/alt-text-test.js index 8ed33874b..523405211 100644 --- a/__tests__/src/rules/alt-text-test.js +++ b/__tests__/src/rules/alt-text-test.js @@ -50,7 +50,6 @@ const array = [{ 'input[type="image"]': ['InputImage'], }]; - ruleTester.run('alt-text', rule, { valid: [ // DEFAULT ELEMENT 'img' TESTS diff --git a/__tests__/src/rules/label-has-for-test.js b/__tests__/src/rules/label-has-for-test.js index 85cb1b1e9..ae4a38703 100644 --- a/__tests__/src/rules/label-has-for-test.js +++ b/__tests__/src/rules/label-has-for-test.js @@ -34,7 +34,6 @@ const expectedEveryError = { type: 'JSXOpeningElement', }; - const optionsComponents = [{ components: ['Label', 'Descriptor'], }]; diff --git a/__tests__/src/rules/no-onchange-test.js b/__tests__/src/rules/no-onchange-test.js index fa80244ce..c0862aa10 100644 --- a/__tests__/src/rules/no-onchange-test.js +++ b/__tests__/src/rules/no-onchange-test.js @@ -4,7 +4,6 @@ * @author Ethan Cohen */ - // ----------------------------------------------------------------------------- // Requirements // ----------------------------------------------------------------------------- diff --git a/__tests__/src/rules/role-has-required-aria-props-test.js b/__tests__/src/rules/role-has-required-aria-props-test.js index 9d3864184..e22a24726 100644 --- a/__tests__/src/rules/role-has-required-aria-props-test.js +++ b/__tests__/src/rules/role-has-required-aria-props-test.js @@ -29,7 +29,6 @@ const errorMessage = (role) => { }; }; - // Create basic test cases using all valid role types. const basicValidityTests = [...roles.keys()].map((role) => { const { diff --git a/__tests__/src/util/hasAccessibleChild-test.js b/__tests__/src/util/hasAccessibleChild-test.js index 60d26d29e..ee2831ad4 100644 --- a/__tests__/src/util/hasAccessibleChild-test.js +++ b/__tests__/src/util/hasAccessibleChild-test.js @@ -11,7 +11,6 @@ describe('hasAccessibleChild', () => { }); }); - describe('has no children and sets dangerouslySetInnerHTML', () => { it('Returns true', () => { const prop = JSXAttributeMock('dangerouslySetInnerHTML', true); diff --git a/package.json b/package.json index a60308915..330e2f202 100644 --- a/package.json +++ b/package.json @@ -30,27 +30,27 @@ "jest": "jest --coverage __tests__/**/*" }, "devDependencies": { - "@babel/cli": "^7.4.4", - "@babel/core": "^7.0.0", - "@babel/plugin-transform-flow-strip-types": "^7.2.3", - "babel-eslint": "^10.0.1", - "babel-jest": "^24.0.0", + "@babel/cli": "^7.10.1", + "@babel/core": "^7.10.2", + "@babel/plugin-transform-flow-strip-types": "^7.10.1", + "babel-eslint": "^10.1.0", + "babel-jest": "^24.9.0", "babel-preset-airbnb": "^5.0.0", - "coveralls": "^3.0.1", - "eslint": "^3 || ^4 || ^5 || ^6", - "eslint-config-airbnb-base": "^14.0.0", - "eslint-plugin-flowtype": "^5.0.0", - "eslint-plugin-import": "^2.18.0", - "estraverse": "^4.2.0", + "coveralls": "^3.1.0", + "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", + "estraverse": "^4.3.0", "expect": "^24.3.1", "flow-bin": "^0.113.0", - "in-publish": "^2.0.0", - "jest": "^24.0.0", + "in-publish": "^2.0.1", + "jest": "^24.9.0", "jscodeshift": "^0.6.0", - "minimist": "^1.2.0", + "minimist": "^1.2.5", "object.assign": "^4.1.0", - "rimraf": "^3.0.0", - "safe-publish-latest": "^1.1.1", + "rimraf": "^3.0.2", + "safe-publish-latest": "^1.1.4", "to-ast": "^1.0.0" }, "engines": { @@ -58,19 +58,19 @@ }, "license": "MIT", "dependencies": { - "@babel/runtime": "^7.4.5", + "@babel/runtime": "^7.10.2", "aria-query": "^4.0.2", - "array-includes": "^3.0.3", + "array-includes": "^3.1.1", "ast-types-flow": "^0.0.7", - "axe-core": "^3.5.2", - "axobject-query": "^2.1.1", - "damerau-levenshtein": "^1.0.4", + "axe-core": "^3.5.4", + "axobject-query": "^2.1.2", + "damerau-levenshtein": "^1.0.6", "emoji-regex": "^9.0.0", "has": "^1.0.3", - "jsx-ast-utils": "^2.2.1" + "jsx-ast-utils": "^2.4.1" }, "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6" + "eslint": "^3 || ^4 || ^5 || ^6 || ^7" }, "jest": { "coverageReporters": [ diff --git a/src/rules/alt-text.js b/src/rules/alt-text.js index 8bd254ad1..af60de071 100644 --- a/src/rules/alt-text.js +++ b/src/rules/alt-text.js @@ -218,7 +218,6 @@ module.exports = { return type; })); - return { JSXOpeningElement: (node) => { const nodeType = elementType(node); diff --git a/src/rules/anchor-has-content.js b/src/rules/anchor-has-content.js index 093d3e60c..36b816dfd 100644 --- a/src/rules/anchor-has-content.js +++ b/src/rules/anchor-has-content.js @@ -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 }); diff --git a/src/rules/no-distracting-elements.js b/src/rules/no-distracting-elements.js index ad18adcb4..dcff35f5d 100644 --- a/src/rules/no-distracting-elements.js +++ b/src/rules/no-distracting-elements.js @@ -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', diff --git a/src/rules/no-noninteractive-tabindex.js b/src/rules/no-noninteractive-tabindex.js index 0093c5826..d72fa27af 100644 --- a/src/rules/no-noninteractive-tabindex.js +++ b/src/rules/no-noninteractive-tabindex.js @@ -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.