@mwxltd/eslint-config-standard
v0.0.3
Published
ESLint configuration used in MWX Ltd projects
Downloads
1
Readme
@mwxltd/eslint-config-standard
This package includes the ESLint configuration used by MWX Ltd projects.
Usage
First, install this package, ESLint and the necessary plugins.
npm install --save-dev eslint-config-mwxltd babel-eslint@^8.2.1 eslint@^4.17.0 eslint-plugin-import@^2.6.0 eslint-plugin-jsx-a11y@^5.1.1 eslint-plugin-react@^7.1.0
Then add the following to the package.json
of the project:
"eslintConfig": {
"extends": "@mwxltd/standard"
}
That's it! You can override the settings from eslint-config-mwxltd
by modifying the config in package.json
or create an .eslintrc
file. Learn more about configuring ESLint
on the ESLint website.
Accessibility Checks
The following rules from the eslint-plugin-jsx-a11y plugin are activated:
- accessible-emoji
- alt-text
- anchor-has-content
- aria-activedescendant-has-tabindex
- aria-props
- aria-proptypes
- aria-role
- aria-unsupported-elements
- heading-has-content
- href-no-hash
- iframe-has-title
- img-redundant-alt
- no-access-key
- no-distracting-elements
- no-redundant-roles
- role-has-required-aria-props
- role-supports-aria-props
- scope
If you want to enable even more accessibility rules, you can add the following to the config in package.json
:
{
"extends": ["@mwxltd/standard", "plugin:jsx-a11y/recommended"],
"plugins": ["jsx-a11y"]
}