Skip to content

Commit

Permalink
chore(root): add eslint a11y plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
evenstensberg committed Oct 26, 2024
1 parent 2010f2e commit 0052e6c
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ const config = {
__OPENMCT_REVISION__: 'readonly',
__OPENMCT_BUILD_BRANCH__: 'readonly'
},
plugins: ['prettier', 'unicorn', 'simple-import-sort'],
plugins: ['prettier', 'unicorn', 'simple-import-sort', 'vuejs-accessibility'],
extends: [
'eslint:recommended',
'plugin:compat/recommended',
'plugin:vue/vue3-recommended',
'plugin:you-dont-need-lodash-underscore/compatible',
'plugin:prettier/recommended',
'plugin:no-unsanitized/DOM'
'plugin:no-unsanitized/DOM',
'plugin:vuejs-accessibility/recommended'
],
parser: 'vue-eslint-parser',
parserOptions: {
Expand Down Expand Up @@ -167,7 +168,19 @@ const config = {
'vue/first-attribute-linebreak': 'error',
'vue/multiline-html-element-content-newline': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/no-mutating-props': 'off' // TODO: Remove this rule and fix resulting errors
'vue/no-mutating-props': 'off', // TODO: Remove this rule and fix resulting errors
// TODO: A11y rules -> fix step by step
'vuejs-accessibility/no-static-element-interactions': 'off',
'vuejs-accessibility/click-events-have-key-events': 'off',
'vuejs-accessibility/interactive-supports-focus': 'off',
'vuejs-accessibility/label-has-for': 'off',
'vuejs-accessibility/mouse-events-have-key-events': 'off',
'vuejs-accessibility/role-has-required-aria-props': 'off',
'vuejs-accessibility/anchor-has-content': 'off',
'vuejs-accessibility/iframe-has-title': 'off',
'vuejs-accessibility/form-control-has-label': 'off',
'vuejs-accessibility/alt-text': 'off',
'vuejs-accessibility/aria-props': 'off'
},
overrides: [
{
Expand Down
36 changes: 36 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"eslint-plugin-simple-import-sort": "10.0.0",
"eslint-plugin-unicorn": "49.0.0",
"eslint-plugin-vue": "9.22.0",
"eslint-plugin-vuejs-accessibility": "^2.4.1",
"eslint-plugin-you-dont-need-lodash-underscore": "6.13.0",
"eventemitter3": "5.0.1",
"file-saver": "2.0.5",
Expand Down

0 comments on commit 0052e6c

Please sign in to comment.