@digest/eslint-config 4.13.0-next.1 → 4.13.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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@digest/eslint-config",
3
3
  "title": "ESLint Digest",
4
4
  "license": "LGPL-3.0-or-later",
5
- "version": "4.13.0-next.1",
5
+ "version": "4.13.0",
6
6
  "description": "Digested ESLint configurations",
7
7
  "author": "wallzero @wallzeroblog (http://wallzero.com)",
8
8
  "contributors": [
@@ -36,18 +36,19 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@digest/scripts": "^4.0.0",
39
- "@eslint/js": "9.15.0",
40
- "@stylistic/eslint-plugin-js": "^2.10.1",
39
+ "@eslint/compat": "^1.2.3",
40
+ "@eslint/js": "^9.15.0",
41
+ "@stylistic/eslint-plugin-js": "^2.11.0",
41
42
  "eslint": "^9.15.0",
42
- "eslint-config-canonical": "^44.3.28",
43
+ "eslint-config-canonical": "^44.3.31",
43
44
  "eslint-plugin-canonical": "^5.0.0",
44
45
  "eslint-plugin-import": "^2.31.0",
45
46
  "globals": "^15.12.0",
46
- "typescript-eslint": "^8.14.0"
47
+ "typescript-eslint": "^8.16.0"
47
48
  },
48
49
  "keywords": [
49
50
  "digest",
50
51
  "eslint"
51
52
  ],
52
- "gitHead": "2259231a62f413ed2168aa03d4e639c02a8a8a60"
53
+ "gitHead": "66948355a283f4bde90f5266e9f01bbe1a9c2dd3"
53
54
  }
@@ -22,6 +22,7 @@
22
22
  canonical/filename-match-exported
23
23
  */
24
24
 
25
+ const compat = require('@eslint/compat');
25
26
  const canonicalBrowser = require('eslint-config-canonical/configurations/browser');
26
27
  const canonical = require('eslint-config-canonical/configurations/canonical');
27
28
  const canonicalJSDoc = require('eslint-config-canonical/configurations/jsdoc');
@@ -30,6 +31,11 @@ const canonicalLodash = require('eslint-config-canonical/configurations/lodash')
30
31
  const canonicalModule = require('eslint-config-canonical/configurations/module');
31
32
  const canonicalNode = require('eslint-config-canonical/configurations/node');
32
33
  const canonicalRegExp = require('eslint-config-canonical/configurations/regexp');
34
+ const fs = require('node:fs');
35
+ const path = require('node:path');
36
+
37
+ const gitignorePath = path.resolve(__dirname, '.gitignore');
38
+ const gitignoreExists = fs.existsSync(gitignorePath);
33
39
 
34
40
  const {
35
41
  'import/no-extraneous-dependencies': noExraneousDependencies,
@@ -47,60 +53,67 @@ const {
47
53
  } = canonicalJSON.recommended.rules;
48
54
 
49
55
  const generalConfigs = [
50
- {
51
- ignores: [
52
- '**/dist/*',
53
- '**/node_modules/*'
54
- ],
55
- },
56
- {
57
- ...canonical.recommended,
58
- rules: {
59
- ...canonicalFixedRules,
60
- '@stylistic/comma-dangle': 'off'
61
- }
62
- },
63
- {
64
- ...canonical.recommended,
65
- ignores: [
66
- '**/__tests__/*'
67
- ],
68
- rules: {
69
- '@stylistic/comma-dangle': 'off',
70
- 'import/no-extraneous-dependencies': noExraneousDependencies
71
- }
72
- },
73
- {
74
- ...canonicalNode.recommended,
75
- rules: canonicalNodeFixedRules
76
- },
77
- {
78
- ...canonicalNode.recommended,
79
- ignores: [
80
- '**/__tests__/*'
81
- ],
82
- rules: {
83
- 'n/no-extraneous-import': noExraneousImport
84
- }
85
- },
86
- canonicalModule.recommended,
87
- canonicalBrowser.recommended,
88
- canonicalRegExp.recommended,
89
- canonicalJSDoc.recommended,
90
- canonicalLodash.recommended,
91
- {
92
- ...canonicalJSON.recommended,
93
- rules: canonicalJSONFixedRules
94
- },
95
- {
96
- ...canonicalJSON.recommended,
97
- ignores: [
98
- '**/package.json'
99
- ],
100
- rules: {
101
- 'jsonc/sort-keys': sortKeys
56
+ gitignoreExists ?
57
+ [
58
+ compat.includeIgnoreFile(gitignorePath)
59
+ ] :
60
+ [],
61
+ [
62
+ {
63
+ ignores: [
64
+ '**/dist/*',
65
+ '**/node_modules/*'
66
+ ],
67
+ },
68
+ {
69
+ ...canonical.recommended,
70
+ rules: {
71
+ ...canonicalFixedRules,
72
+ '@stylistic/comma-dangle': 'off'
73
+ }
74
+ },
75
+ {
76
+ ...canonical.recommended,
77
+ ignores: [
78
+ '**/__tests__/*'
79
+ ],
80
+ rules: {
81
+ '@stylistic/comma-dangle': 'off',
82
+ 'import/no-extraneous-dependencies': noExraneousDependencies
83
+ }
84
+ },
85
+ {
86
+ ...canonicalNode.recommended,
87
+ rules: canonicalNodeFixedRules
88
+ },
89
+ {
90
+ ...canonicalNode.recommended,
91
+ ignores: [
92
+ '**/__tests__/*'
93
+ ],
94
+ rules: {
95
+ 'n/no-extraneous-import': noExraneousImport
96
+ }
97
+ },
98
+ canonicalModule.recommended,
99
+ canonicalBrowser.recommended,
100
+ canonicalRegExp.recommended,
101
+ canonicalJSDoc.recommended,
102
+ canonicalLodash.recommended,
103
+ {
104
+ ...canonicalJSON.recommended,
105
+ rules: canonicalJSONFixedRules
106
+ },
107
+ {
108
+ ...canonicalJSON.recommended,
109
+ ignores: [
110
+ '**/package.json'
111
+ ],
112
+ rules: {
113
+ 'jsonc/sort-keys': sortKeys
114
+ }
102
115
  }
103
- }
104
- ];
116
+ ]
117
+ ].flat();
105
118
 
106
119
  module.exports = generalConfigs;