Skip to content

Commit

Permalink
Merge pull request #1 from ableco/feature-initial-version
Browse files Browse the repository at this point in the history
Initial version (0.1.0)
  • Loading branch information
hpneo authored Oct 3, 2019
2 parents 1a68c22 + d157cd1 commit deeb1cb
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
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
35 changes: 35 additions & 0 deletions README.md
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).
48 changes: 48 additions & 0 deletions index.js
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
19 changes: 19 additions & 0 deletions package.json
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"
}
}

0 comments on commit deeb1cb

Please sign in to comment.