@donmahallem/eslint-config 2.2.2 → 2.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donmahallem/eslint-config",
3
- "version": "2.2.2",
3
+ "version": "2.3.1",
4
4
  "description": "My personal eslint. You better not use it!",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -11,7 +11,7 @@
11
11
  "test:coverage": "nyc --nycrc-path ./.nycrc.json npm run test",
12
12
  "lint": "eslint -c ./src/index.js ./src",
13
13
  "postlint": "prettier --config ./.prettierrc src/* --check",
14
- "lint:fix": "eslint -c ./dist/cjs/index.js --ext .ts ./src --fix",
14
+ "lint:fix": "eslint -c ./src/index.js ./src --fix",
15
15
  "postlint:fix": "prettier --config ./.prettierrc src/**/*.ts --write",
16
16
  "docs": "typedoc --options ./typedoc.json",
17
17
  "version": "npm run build:readme"
@@ -42,13 +42,13 @@
42
42
  "access": "public"
43
43
  },
44
44
  "dependencies": {
45
- "@typescript-eslint/eslint-plugin": "~8.23.0",
46
- "@typescript-eslint/parser": "~8.23.0",
45
+ "@typescript-eslint/eslint-plugin": "~8.24.0",
46
+ "@typescript-eslint/parser": "~8.24.0",
47
47
  "ajv": "~8.17.1",
48
48
  "eslint": "~9.20.0",
49
49
  "eslint-config-prettier": "~10.0.0",
50
50
  "eslint-plugin-chai-friendly": "~1.0.1",
51
- "eslint-plugin-header": "~3.1.1",
51
+ "eslint-plugin-headers": "~1.2.1",
52
52
  "eslint-plugin-import": "~2.31.0",
53
53
  "eslint-plugin-jsdoc": "~50.6.0",
54
54
  "eslint-plugin-mocha": "~10.5.0",
@@ -58,8 +58,8 @@
58
58
  "typescript-eslint": "~8.23.0"
59
59
  },
60
60
  "peerDependencies": {
61
- "@typescript-eslint/eslint-plugin": "~8.23.0",
62
- "@typescript-eslint/parser": "~8.23.0",
61
+ "@typescript-eslint/eslint-plugin": "~8.24.0",
62
+ "@typescript-eslint/parser": "~8.24.0",
63
63
  "eslint": "~9.20.0",
64
64
  "eslint-config-prettier": "~10.0.0",
65
65
  "eslint-plugin-header": "~3.1.1",
@@ -77,8 +77,8 @@
77
77
  "@types/mocha": "10.0.10",
78
78
  "@types/node": "22.13.1",
79
79
  "@types/sinon": "17.0.3",
80
- "@typescript-eslint/eslint-plugin": "8.23.0",
81
- "@typescript-eslint/parser": "8.23.0",
80
+ "@typescript-eslint/eslint-plugin": "8.24.0",
81
+ "@typescript-eslint/parser": "8.24.0",
82
82
  "chai": "5.1.2",
83
83
  "colors": "1.4.0",
84
84
  "eslint": "9.20.0",
@@ -88,7 +88,7 @@
88
88
  "sinon": "19.0.2",
89
89
  "ts-node": "10.9.2",
90
90
  "tslib": "2.8.1",
91
- "typedoc": "0.27.6",
91
+ "typedoc": "0.27.7",
92
92
  "typescript": "5.7.3"
93
93
  }
94
94
  }
package/src/index.js CHANGED
@@ -1,9 +1,19 @@
1
- // @ts-check
1
+ /**
2
+ * Package @donmahallem/eslint-config
3
+ * Source https://github.com/donmahallem/eslint-config
4
+ *
5
+ * @ts-check
6
+ */
2
7
 
8
+ import { readFileSync } from 'node:fs';
9
+ import { join as pathJoin } from 'node:path';
3
10
  import eslint from '@eslint/js';
4
11
  import tseslint from 'typescript-eslint';
5
12
  import mochaPlugin from 'eslint-plugin-mocha';
6
13
  import pluginChaiFriendly from 'eslint-plugin-chai-friendly';
14
+ import headers from 'eslint-plugin-headers';
15
+ // eslint-disable-next-line no-undef
16
+ const packageInfo = JSON.parse(readFileSync(pathJoin(process.cwd(), 'package.json')));
7
17
 
8
18
  export default tseslint.config(
9
19
  eslint.configs.recommended,
@@ -15,5 +25,19 @@ export default tseslint.config(
15
25
  rules: {
16
26
  '@typescript-eslint/no-unused-expressions': 'off',
17
27
  },
28
+ },
29
+ {
30
+ plugins: {
31
+ headers,
32
+ },
33
+ rules: {
34
+ 'headers/header-format': [
35
+ 'error',
36
+ {
37
+ source: 'string',
38
+ content: `Package ${packageInfo.name}\nSource ${packageInfo.homepage}`,
39
+ },
40
+ ],
41
+ },
18
42
  }
19
43
  );
package/src/index.spec.js CHANGED
@@ -1,4 +1,4 @@
1
- /*
1
+ /**
2
2
  * Package @donmahallem/eslint-config
3
3
  * Source https://github.com/donmahallem/eslint-config
4
4
  */
package/src/index.ts CHANGED
@@ -1,4 +1,9 @@
1
- // @ts-check
1
+ /**
2
+ * Package @donmahallem/eslint-config
3
+ * Source https://github.com/donmahallem/eslint-config
4
+ *
5
+ * @ts-check
6
+ */
2
7
 
3
8
  import eslint from '@eslint/js';
4
9
  import tseslint from 'typescript-eslint';