Skip to content

Commit

Permalink
Fixes #2 eslint & prettier config
Browse files Browse the repository at this point in the history
  • Loading branch information
ZachStoltz committed Aug 2, 2019
1 parent 5043833 commit cb4d759
Show file tree
Hide file tree
Showing 9 changed files with 3,016 additions and 62 deletions.
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from @typescript-eslint/eslint-plugin
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
},
}
12 changes: 12 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict'

module.exports = {
bracketSpacing: false,
singleQuote: true,
jsxBracketSameLine: true,
trailingComma: 'es5',
printWidth: 80,
tabWidth: 2,
parser: 'babylon',
semi: false,
}
20 changes: 16 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,22 @@
"scripts": {
"test": "lerna run test"
},
"devDependencies": {
"lerna": "3.16.4"
"husky": {
"hooks": {
"pre-commit": "lerna run --concurrency 1 --stream precommit"
}
},
"dependencies": {
"create-react-app": "3.0.1"
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^1.13.0",
"@typescript-eslint/parser": "^1.13.0",
"chalk": "^2.4.2",
"create-react-app": "^3.0.1",
"eslint": "^6.1.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-prettier": "^3.1.0",
"husky": "^3.0.2",
"lerna": "^3.16.4",
"lint-staged": "^9.2.1",
"prettier": "1.18.2"
}
}
14 changes: 12 additions & 2 deletions packages/cache-service/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
{
"name": "wodly-cache-service",
"version": "0.0.1",
"private": true,
"description": "Wodly's Caching Service",
"repository": "https://github.com/coderockett/wodly",
"author": "Zach Stoltz <zach@stoltz.io>",
"scripts": {
"precommit": "lint-staged",
"start": "nodemon app.js",
"test": "jest -b"
},
"private": true,
"lint-staged": {
"*.ts": [
"eslint --fix",
"prettier --write",
"git add",
"jest --bail --findRelatedTests"
]
},
"dependencies": {
"redis": "2.8.0",
"restify": "8.3.3",
"restify-errors": "8.0.1"
},
"devDependencies": {
"jest": "24.8.0"
"jest": "24.8.0",
"lint-staged": "^9.2.1"
}
}
Loading

0 comments on commit cb4d759

Please sign in to comment.