eslint-config-uphold 3.0.0 → 4.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-uphold",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "Uphold-flavored ESLint config",
5
5
  "keywords": [
6
6
  "config",
@@ -34,21 +34,23 @@
34
34
  "eslint-config-prettier": "^7.2.0",
35
35
  "eslint-plugin-mocha": "^5.3.0",
36
36
  "eslint-plugin-prettier": "^3.3.1",
37
+ "eslint-plugin-promise": "^5.1.0",
37
38
  "eslint-plugin-rulesdir": "^0.1.0",
38
39
  "eslint-plugin-sort-imports-requires": "^1.0.2",
40
+ "eslint-plugin-sort-keys-fix": "^1.1.2",
39
41
  "eslint-plugin-sql-template": "^2.0.0"
40
42
  },
41
43
  "devDependencies": {
42
44
  "@uphold/github-changelog-generator": "^3.0.0",
43
- "eslint": "~8.7.0",
45
+ "eslint": "~8.20.0",
44
46
  "mocha": "^9.2.0",
45
47
  "pre-commit": "^1.2.2",
46
- "prettier": "^2.2.1",
48
+ "prettier": "^2.7.1",
47
49
  "should": "^9.0.2"
48
50
  },
49
51
  "peerDependencies": {
50
- "eslint": "~8.7.0",
51
- "prettier": "^2.2.1"
52
+ "eslint": "~8.20.0",
53
+ "prettier": "^2.7.1"
52
54
  },
53
55
  "pre-commit": [
54
56
  "lint"
package/src/index.js CHANGED
@@ -23,11 +23,19 @@ module.exports = {
23
23
  node: true
24
24
  },
25
25
  extends: ['eslint:recommended', 'plugin:prettier/recommended'],
26
+ overrides: [
27
+ {
28
+ files: ['**/bin/**', '**/scripts/**'],
29
+ rules: {
30
+ 'no-console': 'off'
31
+ }
32
+ }
33
+ ],
26
34
  parser: '@babel/eslint-parser',
27
35
  parserOptions: {
28
36
  requireConfigFile: false
29
37
  },
30
- plugins: ['mocha', 'rulesdir', 'sort-imports-requires', 'sql-template'],
38
+ plugins: ['mocha', 'promise', 'rulesdir', 'sort-imports-requires', 'sort-keys-fix', 'sql-template'],
31
39
  root: true,
32
40
  rules: {
33
41
  'accessor-pairs': 'error',
@@ -57,7 +65,9 @@ module.exports = {
57
65
  'no-bitwise': 'error',
58
66
  'no-caller': 'error',
59
67
  'no-cond-assign': ['error', 'always'],
68
+ 'no-console': 'warn',
60
69
  'no-div-regex': 'error',
70
+ 'no-dupe-keys': 'error',
61
71
  'no-duplicate-imports': 'error',
62
72
  'no-else-return': 'error',
63
73
  'no-eq-null': 'error',
@@ -124,6 +134,7 @@ module.exports = {
124
134
  'prefer-spread': 'error',
125
135
  'prefer-template': 'error',
126
136
  'prettier/prettier': ['error', { arrowParens: 'avoid', printWidth: 120, singleQuote: true, trailingComma: 'none' }],
137
+ 'promise/prefer-await-to-then': 'error',
127
138
  radix: 'error',
128
139
  'require-atomic-updates': 'off',
129
140
  'require-await': 'error',
@@ -143,7 +154,7 @@ module.exports = {
143
154
  useOldSingleMemberSyntax: true
144
155
  }
145
156
  ],
146
- 'sort-keys': ['error', 'asc', { natural: true }],
157
+ 'sort-keys-fix/sort-keys-fix': ['error', 'asc', { natural: true }],
147
158
  'spaced-comment': 'error',
148
159
  'sql-template/no-unsafe-query': 'error',
149
160
  'valid-jsdoc': 'error',
@@ -10,7 +10,7 @@ module.exports = {
10
10
  avoidName: 'Calls to `sinon.useFakeTimers()` must provide a `toFake` configuration'
11
11
  }
12
12
  },
13
- // eslint-disable-next-line sort-keys
13
+ // eslint-disable-next-line sort-keys-fix/sort-keys-fix
14
14
  create(context) {
15
15
  return {
16
16
  CallExpression(node) {