Skip to content
Permalink
Browse files

chore: run prettier on precommit

  • Loading branch information...
NicoPennec committed Aug 15, 2019
1 parent 92d882f commit ffc66d0e55b5f5d5202abf9827eb18a3594b6e11
Showing with 492 additions and 34 deletions.
  1. +5 −0 .eslintignore
  2. +3 −6 .eslintrc.js
  3. +1 −1 .gitignore
  4. +5 −0 .prettierrc
  5. +17 −6 package.json
  6. +461 −21 yarn.lock
@@ -0,0 +1,5 @@
# Common
node_modules
coverage
dist
.nuxt
@@ -1,13 +1,10 @@
module.exports = {
extends: [
'@nuxtjs'
'@nuxtjs',
'plugin:prettier/recommended'
],
rules: {
// Allow sparse arrays
'no-sparse-arrays': 'off',
// Allow space after function name (standard rule)
'space-before-function-paren': ['error', 'always'],
// Remove parents on arrow function
'arrow-parens': ['error', 'as-needed']
'no-sparse-arrays': 'off'
}
}
@@ -4,6 +4,6 @@ node_modules
*.log*
.nuxt
.vscode
.DS_STORE
.DS_Store
coverage
dist
@@ -0,0 +1,5 @@
{
"printWidth": 120,
"semi": false,
"singleQuote": true
}
@@ -5,9 +5,9 @@
"keywords": [
"nuxt",
"nuxtjs",
"seo",
"sitemap",
"sitemap.xml",
"seo"
"sitemap.xml"
],
"repository": "https://github.com/nuxt-community/sitemap-module",
"license": "MIT",
@@ -26,21 +26,28 @@
"scripts": {
"build": "nuxt build test/fixture",
"dev": "nuxt test/fixture",
"format": "yarn lint --fix",
"generate": "nuxt generate test/fixture",
"lint": "eslint lib test",
"lint": "eslint . --ext js,vue",
"preview": "standard-version --dry-run",
"release": "standard-version && git push --follow-tags && npm publish",
"start": "nuxt start test/fixture",
"test": "npm run lint && npm run unit",
"test": "yarn lint && yarn unit",
"unit": "jest"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "npm run lint",
"pre-push": "npm test"
"pre-commit": "lint-staged",
"pre-push": "yarn test"
}
},
"lint-staged": {
"*.{js,vue}": [
"eslint --fix",
"git add"
]
},
"jest": {
"collectCoverage": true,
"collectCoverageFrom": [
@@ -63,9 +70,13 @@
"@nuxtjs/eslint-config": "latest",
"codecov": "latest",
"eslint": "latest",
"eslint-config-prettier": "latest",
"eslint-plugin-prettier": "latest",
"husky": "latest",
"jest": "latest",
"lint-staged": "latest",
"nuxt": "latest",
"prettier": "latest",
"request-promise-native": "latest",
"standard-version": "latest"
},

0 comments on commit ffc66d0

Please sign in to comment.
You can’t perform that action at this time.