@donmahallem/eslint-config 2.0.74 → 2.1.2

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,31 +1,25 @@
1
1
  {
2
2
  "name": "@donmahallem/eslint-config",
3
- "version": "2.0.74",
3
+ "version": "2.1.2",
4
4
  "description": "My personal eslint. You better not use it!",
5
- "main": "dist/cjs/index.js",
6
- "module": "dist/esm/index.js",
7
- "types": "dist/types/index.d.ts",
5
+ "module": "src/index.js",
8
6
  "private": false,
9
7
  "scripts": {
10
- "build": "npm run build:esm && npm run build:cjs",
11
- "build:esm": "tsc --project ./tsconfig.app.json --outDir ./dist/esm --module esnext",
12
- "build:cjs": "tsc --project ./tsconfig.app.json --outDir ./dist/cjs --module commonjs",
13
8
  "build:readme": "npx @appnest/readme generate --input package_readme_blueprint.md --config readme_config.json",
14
9
  "test": "mocha --config ./.mocharc.yml",
15
10
  "test:coverage": "nyc --nycrc-path ./.nycrc.json npm run test",
16
- "prelint": "npm run build",
17
- "lint": "eslint -c ./dist/cjs/index.js --ext .ts ./src",
18
- "postlint": "prettier --config ./.prettierrc src/**/*.ts --check",
11
+ "lint": "eslint -c ./src/index.js ./src",
12
+ "postlint": "prettier --config ./.prettierrc src/* --check",
19
13
  "lint:fix": "eslint -c ./dist/cjs/index.js --ext .ts ./src --fix",
20
14
  "postlint:fix": "prettier --config ./.prettierrc src/**/*.ts --write",
21
15
  "docs": "typedoc --options ./typedoc.json",
22
- "prepublishOnly": "npm run test && npm run docs && npm run build",
23
16
  "version": "npm run build:readme"
24
17
  },
25
18
  "files": [
26
19
  "dist/*",
27
20
  "src/*"
28
21
  ],
22
+ "type": "module",
29
23
  "homepage": "https://github.com/donmahallem/eslint-config",
30
24
  "author": {
31
25
  "name": "donmahallem",
@@ -41,30 +35,29 @@
41
35
  "url": "https://github.com/donmahallem/eslint-config.git"
42
36
  },
43
37
  "engines": {
44
- "node": ">=18"
38
+ "node": ">=20"
45
39
  },
46
40
  "publishConfig": {
47
41
  "access": "public"
48
42
  },
49
43
  "dependencies": {
50
- "@typescript-eslint/eslint-plugin": "~7.18.0",
51
- "@typescript-eslint/eslint-plugin-tslint": "~7.0.2",
52
- "@typescript-eslint/parser": "~7.18.0",
44
+ "@typescript-eslint/eslint-plugin": "~8.23.0",
45
+ "@typescript-eslint/parser": "~8.23.0",
53
46
  "ajv": "~8.17.1",
54
- "eslint": "~8.57.1",
55
- "eslint-config-prettier": "~10.0.1",
47
+ "eslint": "~9.20.0",
48
+ "eslint-config-prettier": "~10.0.0",
56
49
  "eslint-plugin-header": "~3.1.1",
57
50
  "eslint-plugin-import": "~2.31.0",
58
- "eslint-plugin-jsdoc": "~50.6.3",
51
+ "eslint-plugin-jsdoc": "~50.6.0",
52
+ "eslint-plugin-mocha": "~10.5.0",
59
53
  "eslint-plugin-no-null": "~1.0.2",
60
54
  "eslint-plugin-prefer-arrow": "~1.2.3",
61
55
  "prettier": "~3.4.2"
62
56
  },
63
57
  "peerDependencies": {
64
- "@typescript-eslint/eslint-plugin": "~7.18.0",
65
- "@typescript-eslint/eslint-plugin-tslint": "~7.0.0",
66
- "@typescript-eslint/parser": "~7.18.0",
67
- "eslint": "~8.57.0",
58
+ "@typescript-eslint/eslint-plugin": "~8.23.0",
59
+ "@typescript-eslint/parser": "~8.23.0",
60
+ "eslint": "~9.20.0",
68
61
  "eslint-config-prettier": "~10.0.0",
69
62
  "eslint-plugin-header": "~3.1.1",
70
63
  "eslint-plugin-import": "~2.31.0",
@@ -77,18 +70,23 @@
77
70
  "@appnest/readme": "1.2.7",
78
71
  "@semantic-release/changelog": "6.0.3",
79
72
  "@semantic-release/git": "10.0.1",
80
- "@types/chai": "4.3.20",
73
+ "@types/chai": "5.0.1",
81
74
  "@types/mocha": "10.0.10",
82
- "@types/node": "22.10.10",
75
+ "@types/node": "22.13.1",
83
76
  "@types/sinon": "17.0.3",
84
- "chai": "4.5.0",
77
+ "@typescript-eslint/eslint-plugin": "8.23.0",
78
+ "@typescript-eslint/parser": "8.23.0",
79
+ "chai": "5.1.2",
85
80
  "colors": "1.4.0",
81
+ "eslint": "9.20.0",
82
+ "eslint-plugin-mocha": "10.5.0",
86
83
  "mocha": "11.1.0",
87
84
  "nyc": "17.1.0",
88
85
  "sinon": "19.0.2",
89
86
  "ts-node": "10.9.2",
90
87
  "tslib": "2.8.1",
91
88
  "typedoc": "0.27.6",
92
- "typescript": "5.7.3"
89
+ "typescript": "5.7.3",
90
+ "typescript-eslint": "8.23.0"
93
91
  }
94
92
  }
package/src/index.js ADDED
@@ -0,0 +1,7 @@
1
+ // @ts-check
2
+
3
+ import eslint from '@eslint/js';
4
+ import tseslint from 'typescript-eslint';
5
+ import mochaPlugin from 'eslint-plugin-mocha';
6
+
7
+ export default tseslint.config(eslint.configs.recommended, tseslint.configs.recommended, mochaPlugin.configs.flat.recommended);
@@ -7,8 +7,8 @@ import { expect } from 'chai';
7
7
  import 'mocha';
8
8
  import * as defaultConfig from './index';
9
9
 
10
- describe('index', (): void => {
11
- it('should be defined', (): void => {
10
+ describe('index', function () {
11
+ it('should be defined', function () {
12
12
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
13
13
  expect(defaultConfig).to.have.exist;
14
14
  });
package/src/index.ts CHANGED
@@ -1,80 +1,7 @@
1
- /*
2
- * Package @donmahallem/eslint-config
3
- * Source https://github.com/donmahallem/eslint-config
4
- */
1
+ // @ts-check
5
2
 
6
- /* eslint-env es6*/
7
- import { join as pathJoin } from 'path';
8
- // eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-unsafe-assignment
9
- const packageInfo = require(pathJoin(process.cwd(), 'package.json'));
3
+ import eslint from '@eslint/js';
4
+ import tseslint from 'typescript-eslint';
5
+ import mochaPlugin from 'eslint-plugin-mocha';
10
6
 
11
- /**
12
- * Missing rules
13
- * 'import-spacing','static-this':,'switch-final-break','typedef','whitespace'
14
- */
15
- module.exports = {
16
- env: {
17
- browser: true,
18
- es6: true,
19
- node: true,
20
- },
21
- extends: [
22
- 'eslint:recommended',
23
- 'plugin:jsdoc/recommended',
24
- 'plugin:@typescript-eslint/eslint-recommended',
25
- 'plugin:@typescript-eslint/recommended',
26
- 'plugin:@typescript-eslint/recommended-requiring-type-checking',
27
- 'prettier',
28
- ],
29
- parser: '@typescript-eslint/parser',
30
- parserOptions: {
31
- project: 'tsconfig.json',
32
- sourceType: 'module',
33
- },
34
- plugins: ['jsdoc', 'eslint-plugin-prefer-arrow', 'eslint-plugin-import', 'eslint-plugin-no-null', 'header', '@typescript-eslint'],
35
- rules: {
36
- '@typescript-eslint/naming-convention': [
37
- 'error',
38
- {
39
- format: ['UPPER_CASE'],
40
- selector: 'enumMember',
41
- },
42
- ],
43
- '@typescript-eslint/unbound-method': 'off',
44
- 'header/header': [
45
- 2,
46
- 'block',
47
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
48
- ['', ` * Package ${packageInfo.name as string}`, ` * Source ${packageInfo.homepage as string}`, ' '],
49
- 2,
50
- ],
51
- 'import/order': [
52
- 'error',
53
- {
54
- alphabetize: {
55
- caseInsensitive: false,
56
- order: 'asc',
57
- },
58
- groups: [['external', 'builtin'], ['sibling', 'parent', 'internal'], 'index', 'object', 'type'],
59
- },
60
- ],
61
- 'max-len': [
62
- 'error',
63
- {
64
- code: 140,
65
- },
66
- ],
67
- 'no-multiple-empty-lines': ['error', { max: 2, maxBOF: 1 }],
68
- 'quote-props': ['error', 'as-needed'],
69
- quotes: ['error', 'single', { allowTemplateLiterals: true }],
70
- 'sort-keys': [
71
- 'error',
72
- 'asc',
73
- {
74
- caseSensitive: true,
75
- minKeys: 2,
76
- natural: false,
77
- },
78
- ],
79
- },
80
- };
7
+ export default tseslint.config(eslint.configs.recommended, tseslint.configs.recommended, mochaPlugin.configs.flat.recommended);
package/dist/cjs/index.js DELETED
@@ -1,81 +0,0 @@
1
- "use strict";
2
- /*
3
- * Package @donmahallem/eslint-config
4
- * Source https://github.com/donmahallem/eslint-config
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- /* eslint-env es6*/
8
- const path_1 = require("path");
9
- // eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-unsafe-assignment
10
- const packageInfo = require((0, path_1.join)(process.cwd(), 'package.json'));
11
- /**
12
- * Missing rules
13
- * 'import-spacing','static-this':,'switch-final-break','typedef','whitespace'
14
- */
15
- module.exports = {
16
- env: {
17
- browser: true,
18
- es6: true,
19
- node: true,
20
- },
21
- extends: [
22
- 'eslint:recommended',
23
- 'plugin:jsdoc/recommended',
24
- 'plugin:@typescript-eslint/eslint-recommended',
25
- 'plugin:@typescript-eslint/recommended',
26
- 'plugin:@typescript-eslint/recommended-requiring-type-checking',
27
- 'prettier',
28
- ],
29
- parser: '@typescript-eslint/parser',
30
- parserOptions: {
31
- project: 'tsconfig.json',
32
- sourceType: 'module',
33
- },
34
- plugins: ['jsdoc', 'eslint-plugin-prefer-arrow', 'eslint-plugin-import', 'eslint-plugin-no-null', 'header', '@typescript-eslint'],
35
- rules: {
36
- '@typescript-eslint/naming-convention': [
37
- 'error',
38
- {
39
- format: ['UPPER_CASE'],
40
- selector: 'enumMember',
41
- },
42
- ],
43
- '@typescript-eslint/unbound-method': 'off',
44
- 'header/header': [
45
- 2,
46
- 'block',
47
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
48
- ['', ` * Package ${packageInfo.name}`, ` * Source ${packageInfo.homepage}`, ' '],
49
- 2,
50
- ],
51
- 'import/order': [
52
- 'error',
53
- {
54
- alphabetize: {
55
- caseInsensitive: false,
56
- order: 'asc',
57
- },
58
- groups: [['external', 'builtin'], ['sibling', 'parent', 'internal'], 'index', 'object', 'type'],
59
- },
60
- ],
61
- 'max-len': [
62
- 'error',
63
- {
64
- code: 140,
65
- },
66
- ],
67
- 'no-multiple-empty-lines': ['error', { max: 2, maxBOF: 1 }],
68
- 'quote-props': ['error', 'as-needed'],
69
- quotes: ['error', 'single', { allowTemplateLiterals: true }],
70
- 'sort-keys': [
71
- 'error',
72
- 'asc',
73
- {
74
- caseSensitive: true,
75
- minKeys: 2,
76
- natural: false,
77
- },
78
- ],
79
- },
80
- };
81
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,mBAAmB;AACnB,+BAAwC;AACxC,sGAAsG;AACtG,MAAM,WAAW,GAAG,OAAO,CAAC,IAAA,WAAQ,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC;AAErE;;;GAGG;AACH,MAAM,CAAC,OAAO,GAAG;IACb,GAAG,EAAE;QACD,OAAO,EAAE,IAAI;QACb,GAAG,EAAE,IAAI;QACT,IAAI,EAAE,IAAI;KACb;IACD,OAAO,EAAE;QACL,oBAAoB;QACpB,0BAA0B;QAC1B,8CAA8C;QAC9C,uCAAuC;QACvC,+DAA+D;QAC/D,UAAU;KACb;IACD,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACX,OAAO,EAAE,eAAe;QACxB,UAAU,EAAE,QAAQ;KACvB;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,QAAQ,EAAE,oBAAoB,CAAC;IACjI,KAAK,EAAE;QACH,sCAAsC,EAAE;YACpC,OAAO;YACP;gBACI,MAAM,EAAE,CAAC,YAAY,CAAC;gBACtB,QAAQ,EAAE,YAAY;aACzB;SACJ;QACD,mCAAmC,EAAE,KAAK;QAC1C,eAAe,EAAE;YACb,CAAC;YACD,OAAO;YACP,sEAAsE;YACtE,CAAC,EAAE,EAAE,cAAc,WAAW,CAAC,IAAc,EAAE,EAAE,aAAa,WAAW,CAAC,QAAkB,EAAE,EAAE,GAAG,CAAC;YACpG,CAAC;SACJ;QACD,cAAc,EAAE;YACZ,OAAO;YACP;gBACI,WAAW,EAAE;oBACT,eAAe,EAAE,KAAK;oBACtB,KAAK,EAAE,KAAK;iBACf;gBACD,MAAM,EAAE,CAAC,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC;aAClG;SACJ;QACD,SAAS,EAAE;YACP,OAAO;YACP;gBACI,IAAI,EAAE,GAAG;aACZ;SACJ;QACD,yBAAyB,EAAE,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;QAC3D,aAAa,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;QACrC,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC;QAC5D,WAAW,EAAE;YACT,OAAO;YACP,KAAK;YACL;gBACI,aAAa,EAAE,IAAI;gBACnB,OAAO,EAAE,CAAC;gBACV,OAAO,EAAE,KAAK;aACjB;SACJ;KACJ;CACJ,CAAC"}
package/dist/esm/index.js DELETED
@@ -1,79 +0,0 @@
1
- /*
2
- * Package @donmahallem/eslint-config
3
- * Source https://github.com/donmahallem/eslint-config
4
- */
5
- /* eslint-env es6*/
6
- import { join as pathJoin } from 'path';
7
- // eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-unsafe-assignment
8
- const packageInfo = require(pathJoin(process.cwd(), 'package.json'));
9
- /**
10
- * Missing rules
11
- * 'import-spacing','static-this':,'switch-final-break','typedef','whitespace'
12
- */
13
- module.exports = {
14
- env: {
15
- browser: true,
16
- es6: true,
17
- node: true,
18
- },
19
- extends: [
20
- 'eslint:recommended',
21
- 'plugin:jsdoc/recommended',
22
- 'plugin:@typescript-eslint/eslint-recommended',
23
- 'plugin:@typescript-eslint/recommended',
24
- 'plugin:@typescript-eslint/recommended-requiring-type-checking',
25
- 'prettier',
26
- ],
27
- parser: '@typescript-eslint/parser',
28
- parserOptions: {
29
- project: 'tsconfig.json',
30
- sourceType: 'module',
31
- },
32
- plugins: ['jsdoc', 'eslint-plugin-prefer-arrow', 'eslint-plugin-import', 'eslint-plugin-no-null', 'header', '@typescript-eslint'],
33
- rules: {
34
- '@typescript-eslint/naming-convention': [
35
- 'error',
36
- {
37
- format: ['UPPER_CASE'],
38
- selector: 'enumMember',
39
- },
40
- ],
41
- '@typescript-eslint/unbound-method': 'off',
42
- 'header/header': [
43
- 2,
44
- 'block',
45
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
46
- ['', ` * Package ${packageInfo.name}`, ` * Source ${packageInfo.homepage}`, ' '],
47
- 2,
48
- ],
49
- 'import/order': [
50
- 'error',
51
- {
52
- alphabetize: {
53
- caseInsensitive: false,
54
- order: 'asc',
55
- },
56
- groups: [['external', 'builtin'], ['sibling', 'parent', 'internal'], 'index', 'object', 'type'],
57
- },
58
- ],
59
- 'max-len': [
60
- 'error',
61
- {
62
- code: 140,
63
- },
64
- ],
65
- 'no-multiple-empty-lines': ['error', { max: 2, maxBOF: 1 }],
66
- 'quote-props': ['error', 'as-needed'],
67
- quotes: ['error', 'single', { allowTemplateLiterals: true }],
68
- 'sort-keys': [
69
- 'error',
70
- 'asc',
71
- {
72
- caseSensitive: true,
73
- minKeys: 2,
74
- natural: false,
75
- },
76
- ],
77
- },
78
- };
79
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,mBAAmB;AACnB,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,MAAM,CAAC;AACxC,sGAAsG;AACtG,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC;AAErE;;;GAGG;AACH,MAAM,CAAC,OAAO,GAAG;IACb,GAAG,EAAE;QACD,OAAO,EAAE,IAAI;QACb,GAAG,EAAE,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