@w5s/eslint-config 1.0.0-alpha.42 → 1.0.0-alpha.44

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/README.md CHANGED
@@ -1,17 +1,17 @@
1
- <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=# W5s ESLint configuration _(${name})_) -->
1
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=# W5s ESLint configuration _(${name})_) -->
2
2
  # W5s ESLint configuration _(@w5s/eslint-config)_
3
3
  <!-- AUTO-GENERATED-CONTENT:END -->
4
4
 
5
5
  [![NPM Version][package-version-svg]][package-url]
6
6
  [![License][license-image]][license-url]
7
7
 
8
- <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=> ${description}&unknownTxt= ) -->
8
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=> ${description}&unknownTxt= ) -->
9
9
  > ESLint configuration presets
10
10
  <!-- AUTO-GENERATED-CONTENT:END -->
11
11
 
12
12
  ## Installation
13
13
 
14
- <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=```console\nnpm install --save-dev ${name}\n```) -->
14
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=```console\nnpm install --save-dev ${name}\n```) -->
15
15
  ```console
16
16
  npm install --save-dev @w5s/eslint-config
17
17
  ```
@@ -67,19 +67,19 @@ For most kind of project, just edit `eslintrc.json` and cherry pick only configu
67
67
  - `@w5s/eslint-config/ts`: for typescript files
68
68
 
69
69
  ## License
70
- <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=[${license}][license-url] © ${author}) -->
70
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[${license}][license-url] © ${author}) -->
71
71
  [MIT][license-url] © Julien Polo <julien.polo@gmail.com>
72
72
  <!-- AUTO-GENERATED-CONTENT:END -->
73
73
 
74
74
  <!-- VARIABLES -->
75
75
 
76
- <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square) -->
76
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square) -->
77
77
  [package-version-svg]: https://img.shields.io/npm/v/@w5s/eslint-config.svg?style=flat-square
78
78
  <!-- AUTO-GENERATED-CONTENT:END -->
79
- <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}) -->
79
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}) -->
80
80
  [package-url]: https://www.npmjs.com/package/@w5s/eslint-config
81
81
  <!-- AUTO-GENERATED-CONTENT:END -->
82
- <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square) -->
82
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square) -->
83
83
  [license-image]: https://img.shields.io/badge/license-MIT-green.svg?style=flat-square
84
84
  <!-- AUTO-GENERATED-CONTENT:END -->
85
85
  [license-url]: ../../LICENSE
package/jest.js CHANGED
@@ -8,11 +8,6 @@ module.exports = {
8
8
  '**/__tests__/**/*.+(ts|tsx|js|jsx)',
9
9
  '**/?(*.)+(spec|test).+(ts|tsx|js|jsx)',
10
10
  ],
11
- settings: {
12
- jest: {
13
- version: 'latest',
14
- },
15
- },
16
11
  },
17
12
  ],
18
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/eslint-config",
3
- "version": "1.0.0-alpha.42",
3
+ "version": "1.0.0-alpha.44",
4
4
  "description": "ESLint configuration presets",
5
5
  "keywords": [
6
6
  "eslint",
@@ -58,7 +58,7 @@
58
58
  "@rushstack/eslint-patch": "^1.1.0",
59
59
  "@typescript-eslint/eslint-plugin": "^5.0.0",
60
60
  "@typescript-eslint/parser": "^5.0.0",
61
- "@w5s/prettier-config": "^1.0.4",
61
+ "@w5s/prettier-config": "^1.0.5",
62
62
  "eslint-config-airbnb-base": "^15.0.0",
63
63
  "eslint-config-prettier": "^8.0.0",
64
64
  "eslint-plugin-functional": "^4.2.0",
@@ -80,10 +80,10 @@
80
80
  "@types/eslint": "8.4.10",
81
81
  "@types/eslint-plugin-prettier": "3.1.0",
82
82
  "@types/jest": "29.2.4",
83
- "@types/prettier": "2.7.1",
83
+ "@types/prettier": "2.7.2",
84
84
  "@types/react": "18.0.26",
85
- "@typescript-eslint/parser": "5.46.0",
86
- "eslint": "8.29.0",
85
+ "@typescript-eslint/parser": "5.46.1",
86
+ "eslint": "8.30.0",
87
87
  "eslint-config-prettier": "8.5.0",
88
88
  "eslint-find-rules": "4.1.0",
89
89
  "prettier": "2.8.1",
@@ -104,5 +104,5 @@
104
104
  "publishConfig": {
105
105
  "access": "public"
106
106
  },
107
- "gitHead": "a471255b755549d87ea56b49dfe75bd54505b5b0"
107
+ "gitHead": "8208d001778969aa2dbe145ef9a4e9d836ff0c04"
108
108
  }
package/rules/jest.js CHANGED
@@ -3,9 +3,12 @@ const { off, error, concatESConfig } = require('./_rule.js');
3
3
  module.exports = concatESConfig(
4
4
  {
5
5
  env: {
6
- jest: true,
6
+ 'jest/globals': true,
7
7
  },
8
8
  extends: ['plugin:jest/recommended'],
9
+ globals: {
10
+ context: true,
11
+ },
9
12
  plugins: ['jest'],
10
13
  rules: {
11
14
  'jest/consistent-test-it': error,
@@ -15,6 +18,18 @@ module.exports = concatESConfig(
15
18
  'jest/prefer-to-contain': error,
16
19
  'jest/valid-title': [error, { ignoreTypeOfDescribeName: true }],
17
20
  },
21
+ settings: {
22
+ jest: {
23
+ // Compatibility with mocha, cypress, etc.
24
+ globalAliases: {
25
+ describe: ['context'],
26
+ fdescribe: ['fcontext'],
27
+ xdescribe: ['xcontext'],
28
+ },
29
+
30
+ version: 'latest',
31
+ },
32
+ },
18
33
  },
19
34
  /**
20
35
  * Unicorn less strict to help writing tests
@@ -31,6 +46,7 @@ module.exports = concatESConfig(
31
46
  */
32
47
  {
33
48
  rules: {
49
+ '@typescript-eslint/naming-convention': off,
34
50
  '@typescript-eslint/no-non-null-assertion': off,
35
51
  '@typescript-eslint/no-unsafe-assignment': off,
36
52
  '@typescript-eslint/no-unsafe-call': off,
@@ -4,7 +4,7 @@ const { fixme, off, warn, error, concatESConfig } = require('./_rule.js');
4
4
  const { rules: _baseRules } = require('./base.js');
5
5
  const { rules: _baseImportRules } = require('./import.js');
6
6
 
7
- // Fix Hack : TS pluging seems to modify the rules
7
+ // Fix Hack : TS plugin seems to modify the rules
8
8
  const deepClone = (/** @type {Record<string, unknown>} */ anyValue) => JSON.parse(JSON.stringify(anyValue));
9
9
  const baseRules = deepClone(_baseRules);
10
10
  const baseImportRules = deepClone(_baseImportRules);