Skip to content

Commit

Permalink
Merge pull request #2 from buildertrend/fix/readme-issue
Browse files Browse the repository at this point in the history
Fix unnecessary upstream merge
  • Loading branch information
C-Hess authored May 20, 2021
2 parents b124c8a + 33e241f commit fea95ba
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 5 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Cameron Hessler
Copyright (c) 2021 Buildertrend

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
45 changes: 44 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,50 @@ This plugin adds extra ESLint rules that may be more suitable for an enterprise

------------

This project has been moved to https://github.com/buildertrend/eslint-plugin-enterprise-extras
## Installation

Install this ESLint plugin as a dev dependency:

```bash
npm install --save-dev eslint-plugin-enterprise-extras
```

## Usage

Edit your project's `.eslintrc.js` configuration to load the plugin:

```js
module.exports = {
plugins: ["enterprise-extras"],
rules: {
// "enterprise-extras/no-href-assignment": "error"
// ...
// "enterprise-extras/...": "..."
}
}
```

Alternatively, you could use the `recommended` or `all` preset rule configurations:

```js
module.exports = {
extends: ["plugin:enterprise-extras/recommended"],
// extends: ["plugin:enterprise-extras/all"],
rules: {
// You can override the recommended rules here
}
}
```

## Supported Rules

✅ = Recommended
🔧 = Auto-fixable
| Name || 🔧 | Description |
| -------------------------------------------------- | - | - | ----------- |
| [no-href-assignment](/docs/no-href-assignment.md) || 🔧 | Prefers `location.assign` instead of `location.href =` |
| [private-component-methods](/docs/private-component-methods.md) || 🔧 | Requires that all methods of react components are private (except reserved lifecycle methods) |
| [no-unhandled-scheduling](/docs/no-unhandled-scheduling.md) || | `setTimeout` and `setInterval` calls should be cleared |

## LICENSE

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "eslint-plugin-enterprise-extras",
"description": "Extra eslint rules for enterprise environments focusing on React and Typescript",
"version": "1.1.1",
"version": "1.1.2",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down Expand Up @@ -42,7 +42,13 @@
"typescript",
"react"
],
"author": "Cameron Hessler",
"author": "Buildertrend",
"contributors": [
{
"name": "Cameron Hessler",
"email": "cameron.hessler@buildertrend.com"
}
],
"license": "MIT",
"bugs": {
"url": "https://github.com/buildertrend/eslint-plugin-enterprise-extras/issues"
Expand Down

0 comments on commit fea95ba

Please sign in to comment.