Skip to content

Commit

Permalink
Add .prettierrc.js, don't run Prettier on CHANGELOG.md (#65)
Browse files Browse the repository at this point in the history
* Update .eslintrc.js
* Exclude CHANGELOG.md from prettier lint
  • Loading branch information
rekmarks committed May 18, 2021
1 parent b5e467c commit 09cba70
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ module.exports = {
},
],

ignorePatterns: ['!.eslintrc.js', 'dist/'],
ignorePatterns: ['!.eslintrc.js', '!.prettierrc.js', 'dist/'],
};
8 changes: 8 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// All of these are defaults except singleQuote, but we specify them
// for explicitness
module.exports = {
quoteProps: 'as-needed',
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test:watch": "jest --watch",
"prepublishOnly": "yarn build:clean && yarn lint && yarn test",
"lint:eslint": "eslint . --cache --ext js,ts",
"lint:misc": "prettier '**/*.json' '**/*.md' '**/*.yml' --single-quote --ignore-path .gitignore",
"lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' '**/*.yml' --ignore-path .gitignore",
"lint": "yarn lint:eslint && yarn lint:misc --check",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
"build:clean": "rimraf dist && yarn build",
Expand Down

0 comments on commit 09cba70

Please sign in to comment.