Skip to content

Commit

Permalink
chore: use newspack-scripts, but not for build or eslint commands
Browse files Browse the repository at this point in the history
  • Loading branch information
dkoo committed Jan 24, 2022
1 parent 2765942 commit a2f2369
Show file tree
Hide file tree
Showing 6 changed files with 34,943 additions and 37,187 deletions.
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ jobs:
- checkout_with_workspace
- run:
name: Perform post-release chores
command: |
wget -O post-release.sh https://raw.githubusercontent.com/Automattic/newspack-scripts/master/post-release.sh
chmod 755 ./post-release.sh && ./post-release.sh
command: ./node_modules/newspack-scripts/post-release.sh

workflows:
version: 2
Expand All @@ -111,6 +109,7 @@ workflows:
only:
- release
- alpha
- /^hotfix\/.*/
- post_release:
requires:
- release
Expand Down
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ module.exports = {
env: {
browser: true,
},
ignorePatterns: [ 'dist/', 'node_modules/', 'postcss.config.js' ],
rules: {
// Disallow importing or requiring packages that are not listed in package.json
// This prevents us from depending on transitive dependencies, which could break in unexpected ways.
'import/no-extraneous-dependencies': ['error'],
'import/no-extraneous-dependencies': [ 'error' ],
// Skip prop types validation for now
'react/prop-types': 'off',
// Allow exporting components as default exports
Expand Down
10 changes: 7 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@
},
"license": "GPL-3.0-or-later",
"scripts": {
"post-install-cmd": [ "vendor/bin/cghooks add --no-lock" ],
"post-update-cmd": [ "vendor/bin/cghooks update" ]
"post-install-cmd": [
"vendor/bin/cghooks add --no-lock"
],
"post-update-cmd": [
"vendor/bin/cghooks update"
]
},
"extra": {
"hooks": {
"pre-commit": [
"./node_modules/.bin/lint-staged"
],
"commit-msg": [
"cat $1 | ./node_modules/.bin/commitlint"
"cat $1 | ./node_modules/.bin/newspack-scripts commitlint"
]
}
},
Expand Down
Loading

0 comments on commit a2f2369

Please sign in to comment.