0.2.1 • Published 4 years ago

eslint-plugin-ad-hok v0.2.1

Weekly downloads
919
License
MIT
Repository
github
Last release
4 years ago

eslint-plugin-ad-hok

Ad-hok specific linting rules for ESLint

Table of Contents

Installation

Install ESLint

npm install --save-dev eslint

# or, if you're using yarn:

yarn add --dev eslint

Install the plugin

npm install --save-dev eslint-plugin-ad-hok

# or, if you're using yarn:

yan add --dev eslint-plugin-ad-hok

Configuration

Using preset

Use the recommended preset to get reasonable defaults:

"plugins": ["ad-hok"],
"extends": [
  "plugin:ad-hok/recommended"
]

Or, if you're using Typescript, use the recommended-typescript preset to get reasonable defaults for Typescript + React projects:

"plugins": ["ad-hok"],
"extends": [
  "plugin:ad-hok/recommended-typescript"
]

You may also optionally specify settings that will be shared across all the plugin rules.

"settings": {
  "ad-hok/should-rewrite-importable-names": true, // if you're using eslint-plugin-known-imports
}

Manually

If you don't use the preset, include the rules that you wish to use:

"plugins": ["ad-hok"],
"rules": {
  "ad-hok/no-flowmax-in-forwardref": "error",
  "ad-hok/dependencies": "error"
}

Rules

Typescript-specific rules:

Configuration presets

Recommended

This plugin exports a recommended configuration that provides reasonable defaults for enforcing ad-hok best practices

To enable this configuration use the extends property in your .eslintrc config file:

{
  "plugins": ["ad-hok"],
  "extends": ["plugin:ad-hok/recommended"]
}

See ESLint documentation for more information about extending configuration files

The rules enabled in this configuration are:

Recommended-Typescript

This plugin exports a recommended-typescript configuration that provides reasonable defaults for enforcing ad-hok best practices when you're using Typescript

To enable this configuration use the extends property in your .eslintrc config file:

{
  "plugins": ["ad-hok"],
  "extends": ["plugin:ad-hok/recommended-typescript"]
}

The rules enabled in this configuration (in addition to the rules listed for the recommended preset above) are:

Help / Contributions / Feedback

Please file an issue or submit a PR with any questions/suggestions

License

MIT

0.3.0-beta.5

4 years ago

0.3.0-beta.4

4 years ago

0.3.0-beta.2

4 years ago

0.3.0-beta.3

4 years ago

0.3.0-beta.1

4 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago