Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support ESLint 7.x #684

Merged
merged 3 commits into from
Jun 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,47 +30,47 @@
"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": {
"node": ">=4.0"
},
"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": [
Expand Down
1 change: 0 additions & 1 deletion src/rules/alt-text.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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