Skip to content

Commit

Permalink
separation of concerns
Browse files Browse the repository at this point in the history
  • Loading branch information
joeycozza committed Nov 15, 2017
1 parent 46b6fbb commit 075d0b3
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ typings/
# dotenv environment variables file
.env

tags
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# eslint-config-frontier
A common ESLint configuration setup for frontier apps to base off of.
A common ESLint configuration for frontier apps to base off of.

## Usage

1. Run `npm install eslint-config-frontier --save-dev` from your Terminal.
2. Add `"extends": "frontier"` to your eslint config.
- Since you likely will not need to make a TON of changes to the eslint config, we recommend
just putting a "eslintConfig" section in your package.json file. The minimum to start using
this eslint config would look like the following.
```json
...
"eslintConfig": {
"extends": ["frontier"]
},
...
```
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
parserOptions: {
ecmaVersion: 8
},
env: {
es6: true
},
extends: ['eslint:recommended', 'frontier/lib/bestPractice', 'frontier/lib/style', 'frontier/lib/custom']
};
7 changes: 7 additions & 0 deletions lib/bestPractice.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
rules: {
'no-await-in-loop': 'error',
'no-duplicate-imports': 'error',
'no-console': 'off'
}
};
5 changes: 5 additions & 0 deletions lib/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
plugins: ['security'],
extends: ['plugin:security/recommended'],
rules: {}
};
7 changes: 7 additions & 0 deletions lib/style.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
rules: {
'no-multiple-empty-lines': ['warn', {max: 2}],
'space-infix-ops': 'warn',
'arrow-parens': ['warn', 'as-needed']
}
};
29 changes: 29 additions & 0 deletions package-lock.json

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

26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "eslint-config-frontier",
"version": "0.0.1",
"description": "A common ESLint configuration setup for frontier apps to base off of.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/fs-webdev/eslint-config-frontier.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/fs-webdev/eslint-config-frontier/issues"
},
"homepage": "https://github.com/fs-webdev/eslint-config-frontier#readme",
"dependencies": {
"eslint-plugin-security": "^1.4.0"
},
"peerDependencies": {
"eslint": ">= 4"
}
}

0 comments on commit 075d0b3

Please sign in to comment.