Skip to content

Commit

Permalink
feat(prettier): extend Prettier target files (#273)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `lint:md:fix` was replaced with `prettier:write`
  • Loading branch information
ybiquitous committed Nov 18, 2018
1 parent 23eebcb commit a89ba5d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@
},
"scripts": {
"test": "nyc --check-coverage --lines 100 --branches 90 tape \"test/**/*.test.js\"",
"test:watch": "nodemon --ext js --watch . --exec \"tape test/**/*.test.js\"",
"test:watch": "nodemon --ext js,json --watch . --exec \"tape test/**/*.test.js\"",
"test:coverage": "nyc report --reporter=text-lcov > coverage.lcov",
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.mjs .",
"lint:js:fix": "npm run lint:js -- --fix",
"lint:md": "markdownlint --ignore node_modules --ignore CHANGELOG.md \"**/*.md\"",
"lint:md:fix": "prettier --write \"**/*.md\"",
"lint": "npm-run-all --print-label --parallel lint:*",
"prettier:write": "prettier --write --ignore-path .gitignore \"**/*.{html,json,md,yaml,yml}\"",
"release": "standard-version --sign",
"release:dry-run": "npm run release -- --dry-run"
},
Expand All @@ -69,11 +69,9 @@
"git add"
],
"*.md": [
"prettier --write",
"markdownlint",
"git add"
"markdownlint"
],
"*.{yml,yaml,json}": [
"*.{html,json,md,yaml,yml}": [
"prettier --write",
"git add"
]
Expand Down
6 changes: 3 additions & 3 deletions test/fixtures/package-empty_expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.mjs .",
"lint:js:fix": "npm run lint:js -- --fix",
"lint:md": "markdownlint --ignore node_modules --ignore CHANGELOG.md \"**/*.md\"",
"lint:md:fix": "prettier --write \"**/*.md\"",
"lint": "npm-run-all --print-label --parallel lint:*",
"prettier:write": "prettier --write --ignore-path .gitignore \"**/*.{html,json,md,yaml,yml}\"",
"release": "standard-version --sign",
"release:dry-run": "npm run release -- --dry-run"
},
Expand All @@ -20,8 +20,8 @@
"lint-staged": {
"linters": {
"*.{js,jsx,mjs}": ["eslint --fix --no-ignore", "git add"],
"*.md": ["prettier --write", "markdownlint", "git add"],
"*.{yml,yaml,json}": ["prettier --write", "git add"]
"*.md": ["markdownlint"],
"*.{html,json,md,yaml,yml}": ["prettier --write", "git add"]
},
"ignore": ["CHANGELOG.md"]
}
Expand Down
6 changes: 3 additions & 3 deletions test/fixtures/package-normal_expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"test:coverage": "echo \"unsupported.\" && exit 1",
"lint:js:fix": "npm run lint:js -- --fix",
"lint:md": "markdownlint --ignore node_modules --ignore CHANGELOG.md \"**/*.md\"",
"lint:md:fix": "prettier --write \"**/*.md\"",
"lint": "npm-run-all --print-label --parallel lint:*",
"prettier:write": "prettier --write --ignore-path .gitignore \"**/*.{html,json,md,yaml,yml}\"",
"release": "standard-version --sign",
"release:dry-run": "npm run release -- --dry-run"
},
Expand All @@ -21,8 +21,8 @@
"*.css": "xyz",
"linters": {
"*.{js,jsx,mjs}": ["eslint --fix --no-ignore", "git add"],
"*.md": ["prettier --write", "markdownlint", "git add"],
"*.{yml,yaml,json}": ["prettier --write", "git add"]
"*.md": ["markdownlint"],
"*.{html,json,md,yaml,yml}": ["prettier --write", "git add"]
},
"ignore": ["CHANGELOG.md"]
}
Expand Down

0 comments on commit a89ba5d

Please sign in to comment.