eslint-plugin-chai-friendly 1.1.0 → 1.1.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.
Files changed (2) hide show
  1. package/lib/index.js +23 -26
  2. package/package.json +20 -7
package/lib/index.js CHANGED
@@ -14,35 +14,32 @@ const plugin = {
14
14
  'no-unused-expressions': require('./rules/no-unused-expressions')
15
15
  },
16
16
  processors: {},
17
- configs: {}
18
- };
19
-
20
- // assign configs here so we can reference `plugin`
21
- Object.assign(plugin.configs, {
22
- // Compatible with ESLint v9 flat configs
23
- recommendedFlat: {
24
- name: 'chai-friendly/recommendedFlat',
25
- plugins: {
26
- 'chai-friendly': plugin
17
+ configs: {
18
+ // Compatible with ESLint v9 flat configs
19
+ recommendedFlat: {
20
+ name: 'chai-friendly/recommendedFlat',
21
+ plugins: {},
22
+ rules: {
23
+ 'chai-friendly/no-unused-expressions': 'error',
24
+ 'no-unused-expressions': 'off',
25
+ '@typescript-eslint/no-unused-expressions': 'off' // disable TypeScript ESLint version
26
+ }
27
27
  },
28
- rules: {
29
- 'chai-friendly/no-unused-expressions': 'error',
30
- 'no-unused-expressions': 'off',
31
- '@typescript-eslint/no-unused-expressions': 'off' // disable TypeScript ESLint version
32
- }
33
- },
34
28
 
35
- // Compatible with ESLint <9 eslintrc configs
36
- recommended: {
37
- plugins: [
38
- 'chai-friendly'
39
- ],
40
- rules: {
41
- 'no-unused-expressions': 0, // disable original rule
42
- '@typescript-eslint/no-unused-expressions': 0, // disable TypeScript ESLint version
43
- 'chai-friendly/no-unused-expressions': 2
29
+ // Compatible with ESLint <9 eslintrc configs
30
+ recommended: {
31
+ plugins: [
32
+ 'chai-friendly'
33
+ ],
34
+ rules: {
35
+ 'no-unused-expressions': 0, // disable original rule
36
+ '@typescript-eslint/no-unused-expressions': 0, // disable TypeScript ESLint version
37
+ 'chai-friendly/no-unused-expressions': 2
38
+ }
44
39
  }
45
40
  }
46
- },)
41
+ };
42
+
43
+ plugin.configs.recommendedFlat.plugins['chai-friendly'] = plugin;
47
44
 
48
45
  module.exports = plugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-chai-friendly",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "This plugin makes 'no-unused-expressions' rule friendly towards chai expect statements.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -27,7 +27,9 @@
27
27
  ],
28
28
  "scripts": {
29
29
  "lint": "eslint .",
30
- "test": "nyc mocha tests --recursive && npm run integration-test:all",
30
+ "test": "npm run test:unit && npm run integration-test:all",
31
+ "test:types": "npx tsc -p tests/types/tsconfig.json",
32
+ "test:unit": "nyc mocha tests/ --recursive",
31
33
  "integration-test": "npx eslint examples/test.js --no-ignore",
32
34
  "integration-test:ts": "npx eslint --config examples/eslint.config.js examples/test-ts-specific.ts --no-ignore",
33
35
  "integration-test:all": "npx eslint --config examples/eslint.config.js examples/test.js examples/test-ts-specific.ts --no-ignore"
@@ -38,14 +40,25 @@
38
40
  "devDependencies": {
39
41
  "@babel/core": "^7.25.2",
40
42
  "@babel/eslint-parser": "^7.25.1",
41
- "@typescript-eslint/eslint-plugin": "^8.34.0",
42
- "@typescript-eslint/parser": "^8.34.0",
43
+ "@typescript-eslint/eslint-plugin": "^8.57.0",
44
+ "@typescript-eslint/parser": "^8.57.0",
43
45
  "chai": "^5.1.1",
44
- "eslint": "^9.3.0",
45
- "mocha": "^10.0.0",
46
- "nyc": "^15.1.0",
46
+ "eslint": "^9.39.4",
47
+ "mocha": "^11.7.5",
48
+ "nyc": "^18.0.0",
47
49
  "typescript": "^5.8.3"
48
50
  },
51
+ "overrides": {
52
+ "flatted": "3.4.1",
53
+ "serialize-javascript": "7.0.4",
54
+ "@istanbuljs/load-nyc-config": {
55
+ "js-yaml": "3.14.2"
56
+ },
57
+ "mocha": {
58
+ "diff": "8.0.3",
59
+ "js-yaml": "4.1.1"
60
+ }
61
+ },
49
62
  "engines": {
50
63
  "node": ">=0.10.0"
51
64
  },