@darksheep/eslint 4.2.0 โ†’ 4.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.3.0](https://github.com/DarkSheepSoftware/eslint/compare/v4.2.1...v4.3.0) (2024-03-09)
4
+
5
+
6
+ ### ๐ŸŒŸ Features
7
+
8
+ * package.json linting ([2ff260c](https://github.com/DarkSheepSoftware/eslint/commit/2ff260c8462d7960fed3a12b87ac9f196b28661b))
9
+
10
+
11
+ ### ๐Ÿ“ฆ Dependencies
12
+
13
+ * **dev:** update dependency @types/node to v20.11.25 ([#287](https://github.com/DarkSheepSoftware/eslint/issues/287)) ([36c11d3](https://github.com/DarkSheepSoftware/eslint/commit/36c11d3962a199dbf3cdb7211badde30832963a6))
14
+ * **dev:** update dependency type-fest to ~4.12.0 ([#291](https://github.com/DarkSheepSoftware/eslint/issues/291)) ([ac2142e](https://github.com/DarkSheepSoftware/eslint/commit/ac2142e17742e98d3348fba3e0d75509b97d8516))
15
+ * **dev:** update dependency typescript to ~5.4.0 ([#288](https://github.com/DarkSheepSoftware/eslint/issues/288)) ([1298bbb](https://github.com/DarkSheepSoftware/eslint/commit/1298bbbb75e108a42ed0d839515cd013061dff9a))
16
+ * **lock:** lock file maintenance ([#289](https://github.com/DarkSheepSoftware/eslint/issues/289)) ([19274d0](https://github.com/DarkSheepSoftware/eslint/commit/19274d0545fc0082e89e62f51e4bcc882339f947))
17
+ * **pkg:** update dependency eslint-plugin-jsdoc to v48.2.1 ([#290](https://github.com/DarkSheepSoftware/eslint/issues/290)) ([dd40f17](https://github.com/DarkSheepSoftware/eslint/commit/dd40f175880add3e066016617a36089358ebbaa8))
18
+ * **pkg:** update dependency eslint-plugin-regexp to ~2.3.0 ([#292](https://github.com/DarkSheepSoftware/eslint/issues/292)) ([b9872d0](https://github.com/DarkSheepSoftware/eslint/commit/b9872d096937ec767ec3a3c8f15ab6ac97010f9d))
19
+
20
+
21
+ ### ๐Ÿค– Automation
22
+
23
+ * Make `Features` a ๐ŸŒŸ emoji, it was ๐Ÿ’ก ([d2628da](https://github.com/DarkSheepSoftware/eslint/commit/d2628dafb6fe5eb0517b9beade0a59977648c39b))
24
+
25
+ ## [4.2.1](https://github.com/DarkSheepSoftware/eslint/compare/v4.2.0...v4.2.1) (2024-03-06)
26
+
27
+
28
+ ### ๐Ÿ“ฆ Dependencies
29
+
30
+ * **pkg:** update dependency eslint-plugin-n to v17.0.0-4 ([#283](https://github.com/DarkSheepSoftware/eslint/issues/283)) ([770380a](https://github.com/DarkSheepSoftware/eslint/commit/770380a55ad8c69fa0f3d59961ee6b864cc0753b))
31
+
32
+
33
+ ### ๐Ÿงน Chores
34
+
35
+ * Export types via "types" property too ([#285](https://github.com/DarkSheepSoftware/eslint/issues/285)) ([60416d6](https://github.com/DarkSheepSoftware/eslint/commit/60416d6bed06824c17c53ff12906dfcc2e542e2b))
36
+
3
37
  ## [4.2.0](https://github.com/DarkSheepSoftware/eslint/compare/v4.1.8...v4.2.0) (2024-03-06)
4
38
 
5
39
 
package/package.json CHANGED
@@ -1,38 +1,26 @@
1
1
  {
2
2
  "name": "@darksheep/eslint",
3
- "version": "4.2.0",
3
+ "version": "4.3.0",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/DarkSheepSoftware/eslint"
7
+ },
4
8
  "type": "module",
5
- "packageManager": "yarn@4.1.1",
6
- "bin": "./src/bin/eslint.cjs",
7
9
  "exports": {
8
10
  ".": {
9
11
  "import": "./src/index.js",
10
12
  "types": "./types/src/index.d.ts"
11
13
  }
12
14
  },
15
+ "types": "./types/src/index.d.ts",
16
+ "bin": "./src/bin/eslint.cjs",
13
17
  "files": [
14
18
  "src",
15
19
  "types"
16
20
  ],
17
- "engines": {
18
- "node": "^20 || ^21"
19
- },
20
- "repository": {
21
- "type": "git",
22
- "url": "https://github.com/DarkSheepSoftware/eslint.git"
23
- },
24
21
  "scripts": {
25
22
  "githooks": "git config core.hooksPath .githooks"
26
23
  },
27
- "devDependencies": {
28
- "@types/eslint": "~8.56.0",
29
- "@types/eslint__eslintrc": "~2.1.1",
30
- "@types/eslint__js": "~8.42.3",
31
- "@types/estree": "~1.0.2",
32
- "@types/node": "~20.11.0",
33
- "type-fest": "~4.11.0",
34
- "typescript": "~5.3.2"
35
- },
36
24
  "dependencies": {
37
25
  "@eslint-community/eslint-plugin-eslint-comments": "~4.1.0",
38
26
  "@eslint/eslintrc": "~3.0.0",
@@ -49,18 +37,32 @@
49
37
  "eslint-plugin-jsonc": "~2.13.0",
50
38
  "eslint-plugin-jsx-a11y": "~6.8.0",
51
39
  "eslint-plugin-n": "~17.0.0-0",
40
+ "eslint-plugin-package-json": "~0.10.4",
52
41
  "eslint-plugin-promise": "~6.1.1",
53
42
  "eslint-plugin-react": "~7.34.0",
54
- "eslint-plugin-regexp": "~2.2.0",
43
+ "eslint-plugin-regexp": "~2.3.0",
55
44
  "eslint-plugin-security": "~2.1.0",
56
45
  "eslint-plugin-sonarjs": "~0.24.0",
57
46
  "eslint-plugin-unicorn": "~51.0.0",
58
47
  "eslint-plugin-unused-imports": "~3.1.0",
59
48
  "jsonc-eslint-parser": "~2.4.0"
60
49
  },
50
+ "devDependencies": {
51
+ "@types/eslint": "~8.56.0",
52
+ "@types/eslint__eslintrc": "~2.1.1",
53
+ "@types/eslint__js": "~8.42.3",
54
+ "@types/estree": "~1.0.2",
55
+ "@types/node": "~20.11.0",
56
+ "type-fest": "~4.12.0",
57
+ "typescript": "~5.4.0"
58
+ },
61
59
  "peerDependenciesMeta": {
62
60
  "typescript": {
63
61
  "optional": true
64
62
  }
63
+ },
64
+ "packageManager": "yarn@4.1.1",
65
+ "engines": {
66
+ "node": "^20 || ^21"
65
67
  }
66
68
  }
package/src/index.js CHANGED
@@ -10,6 +10,7 @@ import { createEslintCommentsConfig } from './plugins/eslint-comments.js';
10
10
  import { createEslintImportConfig } from './plugins/import.js';
11
11
  import { createEslintJestConfig } from './plugins/jest.js';
12
12
  import { createEslintJSDocConfig } from './plugins/jsdoc.js';
13
+ import { createEslintJsonFilesConfig } from './plugins/json-files.js';
13
14
  import { createEslintJsonConfig } from './plugins/json.js';
14
15
  import { createEslintJsxA11yConfig } from './plugins/jsx-a11y.js';
15
16
  import { createEslintNodeConfigs } from './plugins/node.js';
@@ -33,6 +34,7 @@ const configBuilders = [
33
34
  createEslintCommentsConfig,
34
35
  createEslintImportConfig,
35
36
  createEslintNodeConfigs,
37
+ createEslintJsonFilesConfig,
36
38
  createEslintJsonConfig,
37
39
  createEslintPromiseConfig,
38
40
  createEslintTypescriptConfig,
@@ -0,0 +1,32 @@
1
+ import * as plugin from 'eslint-plugin-package-json';
2
+ import jsoncParser from 'jsonc-eslint-parser';
3
+
4
+ /**
5
+ * Get ESLint config for the regexp plugin
6
+ * @returns {Promise<import('eslint').Linter.FlatConfig[]>}
7
+ */
8
+ export async function createEslintJsonFilesConfig() {
9
+ // console.info(plugin);
10
+ return [
11
+ {
12
+ plugins: { '@package-json': /** @type {*} */ (plugin) },
13
+ languageOptions: {
14
+ parser: /** @type {*} */ (jsoncParser),
15
+ },
16
+ files: [ 'package.json', '**/package.json' ],
17
+ rules: {
18
+ '@package-json/order-properties': [ 'error', { order: 'sort-package-json' } ],
19
+ '@package-json/sort-collections': 'error',
20
+
21
+ '@package-json/prefer-repository-shorthand': 'off',
22
+
23
+ '@package-json/unique-dependencies': 'error',
24
+ '@package-json/valid-local-dependency': 'error',
25
+ '@package-json/valid-name': 'error',
26
+ '@package-json/valid-package-def': 'error',
27
+ '@package-json/valid-repository-directory': 'error',
28
+ '@package-json/valid-version': 'error',
29
+ },
30
+ },
31
+ ];
32
+ }
@@ -36,7 +36,7 @@ const commonRules = {
36
36
  'n/no-unsupported-features/node-builtins': 'error',
37
37
 
38
38
  'n/process-exit-as-throw': 'error',
39
- 'n/shebang': 'error',
39
+ 'n/hashbang': 'error',
40
40
 
41
41
  'n/no-deprecated-api': 'error',
42
42
 
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Get ESLint config for the regexp plugin
3
+ * @returns {Promise<import('eslint').Linter.FlatConfig[]>}
4
+ */
5
+ export function createEslintJsonFilesConfig(): Promise<import('eslint').Linter.FlatConfig[]>;