@shelf/eslint-config 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,31 @@
1
+ #!/bin/sh
2
+ if [ -z "$husky_skip_init" ]; then
3
+ debug () {
4
+ if [ "$HUSKY_DEBUG" = "1" ]; then
5
+ echo "husky (debug) - $1"
6
+ fi
7
+ }
8
+
9
+ readonly hook_name="$(basename "$0")"
10
+ debug "starting $hook_name..."
11
+
12
+ if [ "$HUSKY" = "0" ]; then
13
+ debug "HUSKY env variable is set to 0, skipping hook"
14
+ exit 0
15
+ fi
16
+
17
+ if [ -f ~/.huskyrc ]; then
18
+ debug "sourcing ~/.huskyrc"
19
+ . ~/.huskyrc
20
+ fi
21
+
22
+ export readonly husky_skip_init=1
23
+ sh -e "$0" "$@"
24
+ exitCode="$?"
25
+
26
+ if [ $exitCode != 0 ]; then
27
+ echo "husky - $hook_name hook exited with code $exitCode (error)"
28
+ fi
29
+
30
+ exit $exitCode
31
+ fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shelf/eslint-config",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "ESLint Config for Shelf Projects",
5
5
  "license": "MIT",
6
6
  "repository": "shelfio/eslint-config",
@@ -32,37 +32,32 @@
32
32
  "eslintconfig"
33
33
  ],
34
34
  "dependencies": {
35
- "@babel/eslint-parser": "7.15.0",
35
+ "@babel/eslint-parser": "7.15.8",
36
36
  "@typescript-eslint/eslint-plugin": "4.33.0",
37
37
  "@typescript-eslint/parser": "4.33.0",
38
38
  "eslint-config-next": "11.1.2",
39
39
  "eslint-config-prettier": "8.3.0",
40
40
  "eslint-plugin-babel": "5.3.1",
41
- "eslint-plugin-import": "2.24.2",
41
+ "eslint-plugin-import": "2.25.2",
42
42
  "eslint-plugin-jest": "24.4.3",
43
43
  "eslint-plugin-jest-formatting": "3.0.0",
44
44
  "eslint-plugin-json-format": "2.0.1",
45
45
  "eslint-plugin-jsx": "0.1.0",
46
46
  "eslint-plugin-prettier": "3.4.1",
47
- "eslint-plugin-react": "7.24.0",
47
+ "eslint-plugin-react": "7.26.1",
48
48
  "eslint-plugin-react-hooks": "4.2.0",
49
- "eslint-plugin-testing-library": "4.12.0",
50
- "eslint-plugin-vue": "7.14.0"
49
+ "eslint-plugin-testing-library": "4.12.4",
50
+ "eslint-plugin-vue": "7.19.1"
51
51
  },
52
52
  "devDependencies": {
53
- "husky": "4.3.8",
54
- "lint-staged": "11.1.2",
55
- "prettier": "2.4.0"
53
+ "husky": "7.0.2",
54
+ "lint-staged": "11.2.3",
55
+ "prettier": "2.4.1"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "eslint": "7.x",
59
59
  "prettier": "2.x"
60
60
  },
61
- "husky": {
62
- "hooks": {
63
- "pre-commit": "lint-staged"
64
- }
65
- },
66
61
  "lint-staged": {
67
62
  "*.{js,json,css,md,yml}": [
68
63
  "prettier --write",
package/typescript.js CHANGED
@@ -17,6 +17,7 @@ module.exports = {
17
17
  ...tsParser,
18
18
  rules: {
19
19
  complexity: ['warn', {max: 5}],
20
+ 'multiline-ternary': ['error', 'never'],
20
21
  curly: 'error',
21
22
  'no-nested-ternary': 'error',
22
23
  'prettier/prettier': 'error',