eslint-config-uphold 2.2.0 → 3.1.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.
Files changed (2) hide show
  1. package/package.json +5 -5
  2. package/src/index.js +22 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-uphold",
3
- "version": "2.2.0",
3
+ "version": "3.1.0",
4
4
  "description": "Uphold-flavored ESLint config",
5
5
  "keywords": [
6
6
  "config",
@@ -35,7 +35,7 @@
35
35
  "eslint-plugin-mocha": "^5.3.0",
36
36
  "eslint-plugin-prettier": "^3.3.1",
37
37
  "eslint-plugin-rulesdir": "^0.1.0",
38
- "eslint-plugin-sort-imports-es6": "^0.0.3",
38
+ "eslint-plugin-sort-imports-requires": "^1.0.2",
39
39
  "eslint-plugin-sql-template": "^2.0.0"
40
40
  },
41
41
  "devDependencies": {
@@ -43,18 +43,18 @@
43
43
  "eslint": "~8.7.0",
44
44
  "mocha": "^9.2.0",
45
45
  "pre-commit": "^1.2.2",
46
- "prettier": "^2.2.1",
46
+ "prettier": "^2.5.1",
47
47
  "should": "^9.0.2"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "eslint": "~8.7.0",
51
- "prettier": "^2.2.1"
51
+ "prettier": "^2.5.1"
52
52
  },
53
53
  "pre-commit": [
54
54
  "lint"
55
55
  ],
56
56
  "engines": {
57
- "node": ">=10.23.2"
57
+ "node": ">=14"
58
58
  },
59
59
  "options": {
60
60
  "mocha": "-t 10000 --require should test"
package/src/index.js CHANGED
@@ -23,14 +23,23 @@ 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-es6', 'sql-template'],
38
+ plugins: ['mocha', 'rulesdir', 'sort-imports-requires', 'sql-template'],
31
39
  root: true,
32
40
  rules: {
33
41
  'accessor-pairs': 'error',
42
+ 'array-callback-return': 'error',
34
43
  'block-scoped-var': 'error',
35
44
  'consistent-this': ['error', 'self'],
36
45
  curly: 'error',
@@ -56,6 +65,7 @@ module.exports = {
56
65
  'no-bitwise': 'error',
57
66
  'no-caller': 'error',
58
67
  'no-cond-assign': ['error', 'always'],
68
+ 'no-console': 'warn',
59
69
  'no-div-regex': 'error',
60
70
  'no-duplicate-imports': 'error',
61
71
  'no-else-return': 'error',
@@ -127,12 +137,19 @@ module.exports = {
127
137
  'require-atomic-updates': 'off',
128
138
  'require-await': 'error',
129
139
  'rulesdir/explicit-sinon-use-fake-timers': 'error',
130
- 'sort-imports-es6/sort-imports-es6': [
140
+ 'sort-imports-requires/sort-imports': [
141
+ 'error',
142
+ {
143
+ unsafeAutofix: true,
144
+ useOldSingleMemberSyntax: true
145
+ }
146
+ ],
147
+ 'sort-imports-requires/sort-requires': [
131
148
  'error',
132
149
  {
133
- ignoreCase: false,
134
- ignoreMemberSort: false,
135
- memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single']
150
+ unsafeAutofix: true,
151
+ useAliases: false,
152
+ useOldSingleMemberSyntax: true
136
153
  }
137
154
  ],
138
155
  'sort-keys': ['error', 'asc', { natural: true }],