-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ableco/feature-initial-version
Initial version (0.1.0)
- Loading branch information
Showing
4 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
yarn-error.log | ||
.DS_Store | ||
package-lock.json | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# @ableco/eslint-config | ||
|
||
This repository provides recommended ESLint configuration for use on Able JavaScript projects. | ||
|
||
## Installation | ||
|
||
### Using yarn: | ||
`yarn add @ableco/eslint-configuration --dev` | ||
|
||
### Using npm: | ||
`npm install @ableco/eslint-configuration --save-dev` | ||
|
||
## Usage | ||
|
||
In your `.eslintrc.js` file, replace it with: | ||
|
||
```javascript | ||
module.exports = { | ||
root: true, | ||
settings: { | ||
//... your own settings, for example "import/resolver" or "react". | ||
}, | ||
extends: "@ableco" | ||
}; | ||
``` | ||
|
||
> **Note:** This ESLint configuration only replaces `env`, `parser`, `extends`, `plugins` and `rules`. | ||
## Contributing | ||
|
||
Bug reports and pull requests are welcome on GitHub at https://github.com/ableco/eslint-config. | ||
|
||
## License | ||
|
||
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
node: true, | ||
es6: true, | ||
jest: true | ||
}, | ||
parser: "babel-eslint", | ||
extends: "react-app", | ||
plugins: ["import", "react-hooks", "prettier"], | ||
rules: { | ||
"no-dupe-keys": "error", | ||
"no-undef": "error", | ||
"no-unreachable": "error", | ||
"no-unused-vars": [ | ||
"error", | ||
{ | ||
argsIgnorePattern: "^_", | ||
varsIgnorePattern: "^_", | ||
ignoreRestSiblings: true | ||
} | ||
], | ||
"no-useless-constructor": "error", | ||
"no-var": "error", | ||
"no-duplicate-imports": "error", | ||
"no-duplicate-case": "error", | ||
"import/no-unresolved": "error", | ||
"import/default": "error", | ||
"react/jsx-no-undef": "error", | ||
"react/jsx-uses-vars": "error", | ||
"react/jsx-uses-react": "error", | ||
"react/react-in-jsx-scope": "error", | ||
"react/no-string-refs": "error", | ||
"react/prop-types": ["error", { skipUndeclared: true }], | ||
"react/forbid-prop-types": "error", | ||
"react/prefer-stateless-function": [ | ||
"error", | ||
{ ignorePureComponents: true } | ||
], | ||
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks | ||
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies | ||
"prettier/prettier": "error", | ||
"no-console": ["error", { "allow": ["warn", "error"] }], | ||
"no-debugger": "error" | ||
} | ||
}; | ||
|
||
// Globals added dynamically or add them in .eslintignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "@ableco/eslint-config", | ||
"version": "0.1.0", | ||
"description": "ESLint configuration from https://github.com/ableco/coding-standards", | ||
"main": "index.js", | ||
"repository": "https://github.com/ableco/eslint-config", | ||
"author": "Able", | ||
"license": "MIT", | ||
"dependencies": { | ||
"babel-eslint": "^10.0.3", | ||
"eslint": "^6.5.1", | ||
"eslint-config-react-app": "^5.0.2", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-prettier": "^3.1.1", | ||
"eslint-plugin-react-hooks": "^2.1.1", | ||
"eslint-utils": "^1.4.2", | ||
"prettier": "^1.18.2" | ||
} | ||
} |