@brandsinsurance/eslint-plugin
v1.8.1
Published
ESLint Plugin for custom rules for Brands Insurance
Downloads
150
Readme
= @brandsinsurance/eslint-plugin
Plugin for custom ESLint rules for BrandsInsurance
== Installation
You'll first need to install link:https://eslint.org/[ESLint]:
[source, shell]
npm i eslint --save-dev
Next, install @brandsinsurance/eslint-plugin
:
[source, shell]
npm install @brandsinsurance/eslint-plugin --save-dev
== Usage
Add @brandsinsurance
to the plugins section of your .eslintrc.js
configuration file.
You can omit the eslint-plugin-
prefix:
[source, javascript]
{ plugins: [ '@brandsinsurance' ] }
Then configure the rules you want to use under the rules section.
[source,javascript]
module.exports = { rules: { '@brandsinsurance/spaces-in-ifs': 'error', }, };
Or, you can extend either built-in config.
[source,javascript]
module.exports = { plugins: ['@brandsinsurance'], extends: ['plugin:@brandsinsurance/all-js-only'], };
module.exports = { plugins: ['@brandsinsurance', '@typescript-eslint'], extends: ['plugin:@brandsinsurance/all'], };
== Rules
- xref:./docs/rules/array-reduce-second-arg/README.adoc[
array-reduce-second-arg
] - xref:./docs/rules/no-spaces-in-catches/README.adoc[
no-spaces-in-catches
] - xref:./docs/rules/spaces-in-dowhiles/README.adoc[
spaces-in-dowhiles
] - xref:./docs/rules/spaces-in-fors/README.adoc[
spaces-in-fors
] - xref:./docs/rules/spaces-in-ifs/README.adoc[
spaces-in-ifs
] - xref:./docs/rules/spaces-in-switches/README.adoc[
spaces-in-switches
] - xref:./docs/rules/spaces-in-whiles/README.adoc[
spaces-in-whiles
]
== Configs
- :xref:./src/configs/all.ts[
all
] ** All eslint rules we've discussed, including those linting TypeScript - :xref:./src/configs/all_js_only.ts[
all-js-only
] ** All javascript eslint rules we've discussed
== Contributing
See xref:./CONTRIBUTING.adoc[CONTRIBUTING] for how to add your own rule
== Changelog
See xref:./CHANGELOG.adoc[CHANGELOG] see see changes