eslint-plugin-chai-friendly 0.8.0 → 1.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/README.md CHANGED
@@ -71,7 +71,7 @@ ESLint 9 flat config format:
71
71
  const pluginChaiFriendly = require("eslint-plugin-chai-friendly");
72
72
 
73
73
  module.exports = [
74
- pluginChaiFriendly.configs.recommended,
74
+ pluginChaiFriendly.configs.recommendedFlat,
75
75
  // other configurations
76
76
  ]
77
77
  ```
package/lib/index.js CHANGED
@@ -19,7 +19,8 @@ const plugin = {
19
19
 
20
20
  // assign configs here so we can reference `plugin`
21
21
  Object.assign(plugin.configs, {
22
- recommended: {
22
+ // Compatible with ESLint v9 flat configs
23
+ recommendedFlat: {
23
24
  plugins: {
24
25
  'chai-friendly': plugin
25
26
  },
@@ -27,6 +28,17 @@ Object.assign(plugin.configs, {
27
28
  'chai-friendly/no-unused-expressions': 'error',
28
29
  'no-unused-expressions': 'off'
29
30
  }
31
+ },
32
+
33
+ // Compatible with ESLint <9 eslintrc configs
34
+ recommended: {
35
+ plugins: [
36
+ 'chai-friendly'
37
+ ],
38
+ rules: {
39
+ 'no-unused-expressions': 0, // disable original rule
40
+ 'chai-friendly/no-unused-expressions': 2
41
+ }
30
42
  }
31
43
  },)
32
44
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-chai-friendly",
3
- "version": "0.8.0",
3
+ "version": "1.0.0",
4
4
  "description": "This plugin makes 'no-unused-expressions' rule friendly towards chai expect statements.",
5
5
  "keywords": [
6
6
  "eslint",