Skip to content

Commit

Permalink
feat: improve a11y checks
Browse files Browse the repository at this point in the history
  • Loading branch information
redwoodjsbot committed Feb 25, 2021
1 parent f7ac52a commit 71993c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion packages/core/config/storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ module.exports = {
stories: [
'../../../../web/src/**/*.stories.{tsx,jsx,js}',
],
addons: config.web.a11y ? ['@storybook/addon-a11y'] : undefined,
// spreading false (like ...false) into an object -> nothing (i.e. {});
// great for when we don't wan't to include the property.
...(config.web.a11y && { addons: ['@storybook/addon-a11y'] }),
webpackFinal: (sbConfig, { configType }) => {
// configType is 'PRODUCTION' or 'DEVELOPMENT', why shout?
const isEnvProduction = configType && configType.toLowerCase() === 'production'
Expand Down
5 changes: 2 additions & 3 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ const config = getConfig()
module.exports = {
extends: [
'./shared.js',
config.web.a11y ? 'plugin:jsx-a11y/recommended' : undefined,
],

config.web.a11y && 'plugin:jsx-a11y/recommended',
].filter(Boolean),
plugins: ['@redwoodjs/eslint-plugin-redwood'],
overrides: [
{
Expand Down

0 comments on commit 71993c3

Please sign in to comment.