vuejs / eslint-config-airbnb

ESLint Shareable Configs for Airbnb JavaScript Style Guide in Vue.js Projects
MIT License
72 stars 20 forks source link

How to disable accessibility? #42

Closed 9mm closed 2 years ago

9mm commented 2 years ago

I'm using:

"@vue/eslint-config-airbnb": "^6.0.0",

for an internal app but I don't want to get nagged by the tons of accessibility rules, how can I still use airbnb defaults but disable accessibility without adding every single rule?

bananna0 commented 2 years ago

I have the same question here

9mm commented 2 years ago

@bananna0 Put this at the top of .eslintrc.js

const a11yOff = Object
  .keys(require('eslint-plugin-vuejs-accessibility').rules)
  .reduce((acc, rule) => { acc[`vuejs-accessibility/${rule}`] = 'off'; return acc; }, {});

Then put ...a11yOff as the last item in the rules object

bananna0 commented 2 years ago

@9mm Thank you for this workaround;)

But it would be better to have some one command or any setting to turn it off(

9mm commented 2 years ago

@bananna0 yep, I thought the same thing until I just couldn't take the warnings for every single image and title anymore and caved in

haoqunjiang commented 2 years ago

But it would be better to have some one command or any setting to turn it off(

It's an intentional decision to make it hard to disable. Developers should make accessible websites.

The upstream eslint-config-airbnb library didn't provide an easy way to turn off these rules, either.

martijnvanloonafs commented 1 year ago

Oke i will use another library, my project has literally 1 user who can use his eyes. Not available on the internet. Build under time constraints.