eslint-config-arcticicestudio v0.5.0
Getting Started
The documentation provides chapters to learn about the requirements, the installation and how to use the package. You can learn how to build the project and run the tests in the development chapters.
This package includes support for the React and JSX A11Y plugin rules. To use the ESLint core and eslint-plugin-import rules only please refer to the base shareable rule configuration package eslint-config-arcticicestudio-base.
Quick Start
Installation
Add the package as development dependency to your project:
npm install --save-dev eslint-config-arcticicestudio
Next to all base rules, the default export also contains rules for React and A11Y as well as compatibility support for Prettier. Therefore this package depends on the eslint-plugin-react, eslint-plugin-jsx-a11y, eslint-plugin-prettier and prettier packages defined as peer dependencies. The eslint and eslint-plugin-import package peer dependencies are required because of the inherince of the base rules package.
Run npm install
from within the project root to bootstrap the project and install the development- and runtime dependencies. The peer dependencies can now be easily installed using npm 5+ with npx:
npx install-peerdeps --dev eslint-config-arcticicestudio
Please read the documentation on how to install the peer dependencies if using npm < 5.
Usage
This ESLint shareable config can be used by extending the ESLint configuration file of your project.
Add arcticicestudio
and/or any of the additional entry points to the extends
array in your .eslintrc.js
file:
module.exports = {
plugins: [
/* Only required when using the special `arcticicestudio/prettier` preset. */
"prettier"
],
extends: [
/* Provides base rules and specific rules for "React" and "JSX A11Y". */
"arcticicestudio"
/*
* Provides support for projects using Prettier also in combination with React.
* Note that this must always be placed after the `arcticicestudio` preset to take precedence,
* otherwise it won't have any effect regarding useless and possibly conflicting rules!
*/
"arcticicestudio/prettier"
]
};
Entry Points
This package provides multiple entry points that can be composed especially for the projects they are used in:
arcticicestuio
— The default entry point that includes the base rules of the eslint-config-arcticicestudio-base package as well as additional rules from the eslint-plugin-react and eslint-plugin-jsx-a11y packages.arcticicestuio/prettier
— Entry point with support for Prettier through eslint-plugin-prettier and the officially recommended Prettier ESLint configuration through the eslint-config-prettier package. It disables possibly conflicting rules and rules that definitely not needed when using Prettier for code formatting. There is also additional support when Prettier is used for React based projects by extending the specialprettier/react
configuration that also disables specificreact/
and JSX rules. Note that this configuration should always be placed afterarcticicestuio
in order to override conflicting rules, otherwise thearcticicestuio
preset will take precedence leaving conflicting rules untouched.
Contributing
Read the contributing guide to learn about the development process and how to propose enhancement suggestions and report bugs, how to submit pull requests and the project's styleguides, branch organization and versioning model.
The guide also includes information about minimal, complete, and verifiable examples and other ways to contribute to the project like improving existing issues and giving feedback on issues and pull requests.