Skip to content

Commit

Permalink
feat(package): Add prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
bmuenzenmeyer committed Jan 17, 2018
1 parent 1955516 commit b8e3e11
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 43 deletions.
36 changes: 11 additions & 25 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,19 @@
"sourceType": "module"
},
"globals": {},
"extends": ["prettier"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error",
"block-scoped-var": 0,
"camelcase": 0,
"comma-spacing": [1, {"before": false, "after": true}],
"consistent-return": 2,
"curly": [2, "all"],
"dot-notation": [1, { "allowKeywords": true }],
"eqeqeq": [2, "allow-null"],
"global-strict": [0, "never"],
"guard-for-in": 2,
"indent": [1, 2, {"SwitchCase": 1, "VariableDeclarator": 1}],
"lines-around-comment": [1, {
"beforeBlockComment": true,
"beforeLineComment": true,
"allowBlockStart": true,
"allowObjectStart": true,
"allowArrayStart": true
}],
"key-spacing": 0,
"keyword-spacing": 1,
"new-cap": 0,
"no-alert": 2,
"no-bitwise": 2,
Expand All @@ -42,7 +35,6 @@
"no-extend-native": 2,
"no-extra-bind": 2,
"no-extra-parens": 0,
"no-extra-semi": 2,
"no-func-assign": 2,
"no-implied-eval": 2,
"no-invalid-regexp": 2,
Expand All @@ -51,7 +43,6 @@
"no-loop-func": 2,
"no-mixed-requires": 0,
"no-multi-str": 2,
"no-multi-spaces": 1,
"no-native-reassign": 2,
"no-new": 2,
"no-param-reassign": 1,
Expand All @@ -69,24 +60,19 @@
"no-use-before-define": 1,
"no-useless-call": 2,
"no-useless-concat": 2,
"no-var": 2,
"no-with": 2,
"quotes": [0, "single"],
"radix": 2,
"semi": [1, "always"],
"strict": 0,
"space-before-blocks": 1,
"space-before-function-paren": [1, {
"anonymous": "always",
"named": "never"
}],
"space-in-parens": [1, "never"],
"space-infix-ops": 1,
"valid-typeof": 2,
"vars-on-top": 0,
"wrap-iife": [2, "inside"],
"prefer-const": ["error", {
"destructuring": "any",
"ignoreReadBeforeAssign": false
}]
"prefer-const": [
"error",
{
"destructuring": "any",
"ignoreReadBeforeAssign": false
}
]
}
}
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "es5"
}
77 changes: 60 additions & 17 deletions package-lock.json

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

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"@pattern-lab/patternengine-node-handlebars": "^2.0.0-alpha.2",
"@pattern-lab/patternengine-node-underscore": "^2.0.0-alpha.1",
"eslint": "3.5.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-prettier": "^2.5.0",
"prettier": "1.10.2",
"rewire": "2.5.2",
"tap": "11.0.1"
},
Expand Down Expand Up @@ -57,7 +60,7 @@
"license": "MIT",
"scripts": {
"lint": "eslint core/**/*.js",
"pretest": "npm run lint",
"prettier": "prettier --config .prettierrc --write ./core/**/*.js",
"test": "tap test/*_tests.js --reporter spec --coverage"
},
"engines": {
Expand Down

0 comments on commit b8e3e11

Please sign in to comment.