@foray1010/eslint-config 7.7.3 → 7.8.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/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [7.8.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@7.7.3...@foray1010/eslint-config@7.8.0) (2022-10-03)
7
+
8
+ ### Features
9
+
10
+ - **eslint-config:** prefer Number static properties over global ones ([532df43](https://github.com/foray1010/common-presets/commit/532df43987f464ea3f3cfe1e5507b1077e14bced))
11
+ - **eslint-config:** re-enable functional/prefer-tacit ([9f312cc](https://github.com/foray1010/common-presets/commit/9f312cc3ac05429a969f271c46e02d915bf44e41))
12
+
6
13
  ## [7.7.3](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@7.7.2...@foray1010/eslint-config@7.7.3) (2022-10-02)
7
14
 
8
15
  ### Bug Fixes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@foray1010/eslint-config",
4
- "version": "7.7.3",
4
+ "version": "7.8.0",
5
5
  "homepage": "https://github.com/foray1010/common-presets/tree/master/packages/eslint-config#readme",
6
6
  "bugs": "https://github.com/foray1010/common-presets/issues",
7
7
  "repository": {
@@ -30,7 +30,7 @@
30
30
  "eslint-config-prettier": "^8.3.0",
31
31
  "eslint-plugin-compat": "^4.0.0",
32
32
  "eslint-plugin-eslint-comments": "^3.2.0",
33
- "eslint-plugin-functional": "^4.4.0",
33
+ "eslint-plugin-functional": "^4.4.1",
34
34
  "eslint-plugin-import": "^2.22.1",
35
35
  "eslint-plugin-jest": "^27.0.4",
36
36
  "eslint-plugin-jest-dom": "^4.0.0",
@@ -40,7 +40,8 @@
40
40
  "eslint-plugin-react": "^7.31.8",
41
41
  "eslint-plugin-react-hooks": "^4.2.0",
42
42
  "eslint-plugin-simple-import-sort": "^8.0.0",
43
- "eslint-plugin-testing-library": "^5.7.0"
43
+ "eslint-plugin-testing-library": "^5.7.0",
44
+ "eslint-plugin-unicorn": "^42.0.0"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@types/confusing-browser-globals": "1.0.0",
@@ -56,5 +57,5 @@
56
57
  "publishConfig": {
57
58
  "access": "public"
58
59
  },
59
- "gitHead": "959a348ec7c5c2373efed4523f1da2193142f071"
60
+ "gitHead": "728b8351b1895f7af4b9b476461f8a3fd6f34a60"
60
61
  }
package/presets/base.js CHANGED
@@ -64,6 +64,7 @@ module.exports = {
64
64
  'eslint-plugin-import',
65
65
  'eslint-plugin-jsdoc',
66
66
  'eslint-plugin-prettier',
67
+ 'eslint-plugin-unicorn',
67
68
  ],
68
69
  env: {
69
70
  // should align with parserOptions.ecmaVersion
@@ -126,6 +127,8 @@ module.exports = {
126
127
  'jsdoc/valid-types': 'off',
127
128
  // avoid assigning anonymous function to object key which is harder to trace when debug
128
129
  'object-shorthand': ['error', 'always'],
130
+ // prefer Number static properties over global ones
131
+ 'unicorn/prefer-number-properties': 'error',
129
132
  },
130
133
  overrides: [
131
134
  {
@@ -272,8 +275,7 @@ module.exports = {
272
275
  },
273
276
  ],
274
277
  // forbid unnecessary callback wrapper
275
- // disabled due to https://github.com/eslint-functional/eslint-plugin-functional/issues/486
276
- // 'functional/prefer-tacit': 'error',
278
+ 'functional/prefer-tacit': 'error',
277
279
  // @typescript-eslint/eslint-plugin suggests to disable it: https://github.com/typescript-eslint/typescript-eslint/blob/2588e9ea55f78352fdd6ae92a306135aabb49a1a/docs/linting/TROUBLESHOOTING.md#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
278
280
  // It is disabled in recommended config but re-enabled here to enforce a subset of global variables that supported by both node.js and browsers
279
281
  'no-undef': 'error',