Skip to content

Commit

Permalink
fix: husky eslint improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpalmer committed Jul 20, 2021
1 parent c708e2e commit 55068df
Show file tree
Hide file tree
Showing 8 changed files with 184 additions and 54 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
'node': true
},
'extends': 'eslint:recommended',
'parser': '@babel/eslint-parser',
'parserOptions': {
'ecmaVersion': 12,
'sourceType': 'module'
Expand Down
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint:staged
yarn test:staged
3 changes: 3 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
"src/**/*.js": ["yarn lint"],
};
9 changes: 9 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
presets: [
'@babel/preset-env',
],
plugins: [
'@babel/plugin-transform-runtime',
'@babel/plugin-syntax-top-level-await',
],
};
31 changes: 14 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,32 @@
"license": "MIT",
"private": true,
"dependencies": {
"lerna": "^4.0.0"
"@babel/core": "^7.14.6",
"@babel/eslint-parser": "^7.14.7",
"@babel/plugin-syntax-top-level-await": "^7.14.5",
"@babel/plugin-transform-runtime": "^7.14.5",
"@babel/preset-env": "^7.14.7",
"lerna": "^4.0.0",
"lint-staged": "^11.0.1"
},
"workspaces": [
"packages/*"
],
"husky": {
"hooks": {
"pre-commit": "eslint --fix . && pretty-quick --staged"
}
},
"devDependencies": {
"eslint": "7.31.0",
"husky": "7.0.1",
"husky": "^7.0.0",
"jest": "27.0.6",
"prettier": "2.3.2",
"pretty-quick": "3.1.1"
},
"scripts": {
"setup": "lerna bootstrap",
"test": "lerna run --no-bail test",
"test": "lerna run --no-bail test --",
"test:staged": "lerna run --bail test -- --findRelatedTests --passWithNoTests",
"test:coverage": "lerna run --bail test -- --coverage",
"lint": "eslint packages/**/src packages/**/test",
"clean": "rm -rf node_modules && lerna exec -- rm -rf node_modules coverage lib"
},
"babel": {
"presets": [
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-transform-runtime"
]
"lint:staged": "lint-staged",
"clean": "rm -rf node_modules && lerna exec -- rm -rf node_modules coverage lib",
"prepare": "husky install"
}
}
11 changes: 0 additions & 11 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,9 @@
"test": "NODE_OPTIONS=--experimental-vm-modules jest ."
},
"devDependencies": {
"@babel/core": "7.14.6",
"@babel/plugin-transform-runtime": "7.14.5",
"@babel/preset-env": "7.14.7",
"@jest/core": "27.0.6",
"@jest/globals": "27.0.6"
},
"babel": {
"presets": [
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-transform-runtime"
]
},
"jest": {
"verbose": true,
"transform": {}
Expand Down
12 changes: 0 additions & 12 deletions packages/dinero/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,9 @@
"@soldi/core": "0.1.0"
},
"devDependencies": {
"@babel/core": "7.14.6",
"@babel/plugin-transform-runtime": "7.14.5",
"@babel/preset-env": "7.14.7",
"babel-jest": "27.0.6",
"jest": "27.0.6",
"jsverify": "0.8.4"
},
"babel": {
"presets": [
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-transform-runtime"
]
},
"jest": {
"verbose": true,
"transform": {}
Expand Down

0 comments on commit 55068df

Please sign in to comment.