From bb348c43310f485b66801a543b5181abd62036a9 Mon Sep 17 00:00:00 2001 From: Martin Rosenberg Date: Fri, 18 Oct 2019 21:08:20 -0600 Subject: [PATCH] Add a11y linting script --- a11y.json | 4 ++++ package.json | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 a11y.json diff --git a/a11y.json b/a11y.json new file mode 100644 index 00000000..4b2a12b8 --- /dev/null +++ b/a11y.json @@ -0,0 +1,4 @@ +{ + "extends": ["plugin:jsx-a11y/strict"], + "plugins": ["jsx-a11y"] +} diff --git a/package.json b/package.json index 7c8a2a55..eec91641 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "A web-based note-taking app with GitHub sync and Markdown support", "private": false, "scripts": { + "a11y:fix": "eslint src --ext tsx --config './a11y.json' --fix", "build": "react-scripts build", "contributors:add": "all-contributors add", "contributors:generate": "all-contributors generate", @@ -154,6 +155,7 @@ "cypress": "^3.4.1", "eslint-config-prettier": "^6.4.0", "eslint-plugin-import": "^2.18.2", + "eslint-plugin-jsx-a11y": "^6.2.3", "eslint-plugin-prettier": "^3.1.1", "husky": "^3.0.9", "jest": "^24.9.0",