eslint-plugin-chai-friendly 0.8.0 → 1.0.1

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,9 @@ 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: {
24
+ name: 'chai-friendly/recommendedFlat',
23
25
  plugins: {
24
26
  'chai-friendly': plugin
25
27
  },
@@ -27,6 +29,17 @@ Object.assign(plugin.configs, {
27
29
  'chai-friendly/no-unused-expressions': 'error',
28
30
  'no-unused-expressions': 'off'
29
31
  }
32
+ },
33
+
34
+ // Compatible with ESLint <9 eslintrc configs
35
+ recommended: {
36
+ plugins: [
37
+ 'chai-friendly'
38
+ ],
39
+ rules: {
40
+ 'no-unused-expressions': 0, // disable original rule
41
+ 'chai-friendly/no-unused-expressions': 2
42
+ }
30
43
  }
31
44
  },)
32
45
 
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.1",
4
4
  "description": "This plugin makes 'no-unused-expressions' rule friendly towards chai expect statements.",
5
5
  "keywords": [
6
6
  "eslint",