@darksheep/eslint 4.3.5 โ 4.4.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 +61 -0
- package/package.json +28 -27
- package/src/index.js +2 -2
- package/src/plugins/json.js +11 -14
- package/src/plugins/package-json.js +35 -0
- package/src/plugins/typescript.js +1 -1
- package/types/src/plugins/{json-files.d.ts โ package-json.d.ts} +1 -1
- package/src/plugins/json-files.js +0 -35
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,66 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.4.0](https://github.com/DarkSheepSoftware/eslint/compare/v4.3.6...v4.4.0) (2024-04-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ๐ Features
|
|
7
|
+
|
|
8
|
+
* Update parsers with valid types ([0abd598](https://github.com/DarkSheepSoftware/eslint/commit/0abd59800f2e6bdd0533f383fc87b578be5b06fe))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### ๐ Fixes
|
|
12
|
+
|
|
13
|
+
* Swap to pnpm to allow detecting missing packages ([4dcd53d](https://github.com/DarkSheepSoftware/eslint/commit/4dcd53d64716d0164519f34f3016b9e41e7561bf))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### ๐ฆ Dependencies
|
|
17
|
+
|
|
18
|
+
* **pkg:** update dependency @eslint/eslintrc to v3.0.2 ([#337](https://github.com/DarkSheepSoftware/eslint/issues/337)) ([47ad491](https://github.com/DarkSheepSoftware/eslint/commit/47ad491c4bcd4da6b6d760b578ebdc977ad12357))
|
|
19
|
+
* **pkg:** update dependency eslint-plugin-import to v2.29.1 ([#338](https://github.com/DarkSheepSoftware/eslint/issues/338)) ([21e3dee](https://github.com/DarkSheepSoftware/eslint/commit/21e3dee38737a933091469ce732e33fc627fe85f))
|
|
20
|
+
* **pkg:** update dependency eslint-plugin-jsdoc to v48.2.2 ([#339](https://github.com/DarkSheepSoftware/eslint/issues/339)) ([9241717](https://github.com/DarkSheepSoftware/eslint/commit/9241717e72e6dbc6f1223551aede448e8e86033e))
|
|
21
|
+
* **pkg:** update dependency eslint-plugin-package-json to v0.12.1 ([#340](https://github.com/DarkSheepSoftware/eslint/issues/340)) ([91d9425](https://github.com/DarkSheepSoftware/eslint/commit/91d94259547658ba27f7e5e4b195ddf89fa5c940))
|
|
22
|
+
* **pkg:** update dependency eslint-plugin-react to v7.34.1 ([#341](https://github.com/DarkSheepSoftware/eslint/issues/341)) ([5fa9e82](https://github.com/DarkSheepSoftware/eslint/commit/5fa9e822758a3f4311809398d1f3991f6ffd014a))
|
|
23
|
+
* **pkg:** update dependency eslint-plugin-security to v2.1.1 ([#342](https://github.com/DarkSheepSoftware/eslint/issues/342)) ([580609c](https://github.com/DarkSheepSoftware/eslint/commit/580609cc727a838f2d14d6718b8bbd88b4dff47b))
|
|
24
|
+
* **pkg:** update dependency eslint-plugin-unicorn to v51.0.1 ([#343](https://github.com/DarkSheepSoftware/eslint/issues/343)) ([f69d623](https://github.com/DarkSheepSoftware/eslint/commit/f69d62331db0fff8057c34bbb884870278f97cd9))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### ๐งน Chores
|
|
28
|
+
|
|
29
|
+
* pin all deps ([f9fd808](https://github.com/DarkSheepSoftware/eslint/commit/f9fd808125bd4fb7109261b7833deb861195899f))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### ๐ค Automation
|
|
33
|
+
|
|
34
|
+
* swap to using our eslint formatter ([28265a6](https://github.com/DarkSheepSoftware/eslint/commit/28265a68cf29492391cf11874eb6c32578c667b4))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### โช Reverts
|
|
38
|
+
|
|
39
|
+
* deps(pkg): update dependency eslint-plugin-sonarjs to ~0.25.0 ([#334](https://github.com/DarkSheepSoftware/eslint/issues/334)) ([45fe010](https://github.com/DarkSheepSoftware/eslint/commit/45fe0105d6f3f8fe93b80f7fb200b23642b5ec56))
|
|
40
|
+
|
|
41
|
+
## [4.3.6](https://github.com/DarkSheepSoftware/eslint/compare/v4.3.5...v4.3.6) (2024-04-03)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### ๐ฆ Dependencies
|
|
45
|
+
|
|
46
|
+
* **dev:** update dependency @types/eslint to v8.56.7 ([#330](https://github.com/DarkSheepSoftware/eslint/issues/330)) ([097bf77](https://github.com/DarkSheepSoftware/eslint/commit/097bf77ab6405de5995ee522941e4a9a8b0261b3))
|
|
47
|
+
* **dev:** update dependency @types/node to ~20.12.0 ([#328](https://github.com/DarkSheepSoftware/eslint/issues/328)) ([a24afbd](https://github.com/DarkSheepSoftware/eslint/commit/a24afbddc2dcb0f8a01ac564bc7b2a713063b5b7))
|
|
48
|
+
* **dev:** update dependency type-fest to ~4.14.0 ([#319](https://github.com/DarkSheepSoftware/eslint/issues/319)) ([1c36f16](https://github.com/DarkSheepSoftware/eslint/commit/1c36f161e0d3c55205d5e3b044b5a20b1b8a9fc9))
|
|
49
|
+
* **dev:** update dependency type-fest to ~4.15.0 ([#333](https://github.com/DarkSheepSoftware/eslint/issues/333)) ([90eab78](https://github.com/DarkSheepSoftware/eslint/commit/90eab78d35f2a2fa135e01c7f188876a6c638411))
|
|
50
|
+
* **dev:** update dependency typescript to v5.4.3 ([#316](https://github.com/DarkSheepSoftware/eslint/issues/316)) ([1562e75](https://github.com/DarkSheepSoftware/eslint/commit/1562e759a3cc699e07885ae1efe61ae191d88ae7))
|
|
51
|
+
* **lock:** lock file maintenance ([#321](https://github.com/DarkSheepSoftware/eslint/issues/321)) ([4cff532](https://github.com/DarkSheepSoftware/eslint/commit/4cff53264a79512a28543464aae3b2876a3215ec))
|
|
52
|
+
* **lock:** lock file maintenance ([#329](https://github.com/DarkSheepSoftware/eslint/issues/329)) ([b7907e2](https://github.com/DarkSheepSoftware/eslint/commit/b7907e208b3829edd13f3953a5091c819a7c75a1))
|
|
53
|
+
* **pkg:** update dependency eslint-plugin-jsdoc to v48.2.2 ([#325](https://github.com/DarkSheepSoftware/eslint/issues/325)) ([fd0e550](https://github.com/DarkSheepSoftware/eslint/commit/fd0e550953c010203ad6768a73a8c7ac94f00cfd))
|
|
54
|
+
* **pkg:** update dependency eslint-plugin-jsonc to ~2.15.0 ([#331](https://github.com/DarkSheepSoftware/eslint/issues/331)) ([86ef370](https://github.com/DarkSheepSoftware/eslint/commit/86ef370f8a79d72d249df422fbcd20aafa3ca613))
|
|
55
|
+
* **pkg:** update dependency eslint-plugin-n to v17.0.0-6 ([#322](https://github.com/DarkSheepSoftware/eslint/issues/322)) ([1b4bfd3](https://github.com/DarkSheepSoftware/eslint/commit/1b4bfd36738d2b14f3dc113ce14b0af50a038e49))
|
|
56
|
+
* **pkg:** update dependency eslint-plugin-package-json to ~0.11.0 ([#320](https://github.com/DarkSheepSoftware/eslint/issues/320)) ([57c41f0](https://github.com/DarkSheepSoftware/eslint/commit/57c41f0f680ad981b46f63634ca463b83fb980c3))
|
|
57
|
+
* **pkg:** update dependency eslint-plugin-package-json to ~0.12.0 ([#323](https://github.com/DarkSheepSoftware/eslint/issues/323)) ([36a9a8c](https://github.com/DarkSheepSoftware/eslint/commit/36a9a8c73a7b2870e17ccc5b6b897c86562cd2af))
|
|
58
|
+
* **pkg:** update dependency eslint-plugin-package-json to v0.12.1 ([#327](https://github.com/DarkSheepSoftware/eslint/issues/327)) ([88c88ab](https://github.com/DarkSheepSoftware/eslint/commit/88c88abe0b0711bde42e4f3d94bff8040b23c47a))
|
|
59
|
+
* **pkg:** update dependency eslint-plugin-regexp to ~2.4.0 ([#318](https://github.com/DarkSheepSoftware/eslint/issues/318)) ([b2db9ff](https://github.com/DarkSheepSoftware/eslint/commit/b2db9ff8578a9d95e6eaabf01997a30f1aafe769))
|
|
60
|
+
* **pkg:** update dependency eslint-plugin-sonarjs to ~0.25.0 ([#326](https://github.com/DarkSheepSoftware/eslint/issues/326)) ([21145bf](https://github.com/DarkSheepSoftware/eslint/commit/21145bf996a9beec8964b21384af8f2138b73c85))
|
|
61
|
+
* **pkg:** update typescript-eslint monorepo to ~7.4.0 ([#324](https://github.com/DarkSheepSoftware/eslint/issues/324)) ([9e316d9](https://github.com/DarkSheepSoftware/eslint/commit/9e316d9bba46f2a0dcf3f1103b92812ee1f45c4f))
|
|
62
|
+
* **pkg:** update typescript-eslint monorepo to ~7.5.0 ([#332](https://github.com/DarkSheepSoftware/eslint/issues/332)) ([6a7a9e5](https://github.com/DarkSheepSoftware/eslint/commit/6a7a9e575c103deb6027b5c6a3448fda57f77c7c))
|
|
63
|
+
|
|
3
64
|
## [4.3.5](https://github.com/DarkSheepSoftware/eslint/compare/v4.3.4...v4.3.5) (2024-03-20)
|
|
4
65
|
|
|
5
66
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darksheep/eslint",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/DarkSheepSoftware/eslint"
|
|
@@ -22,38 +22,39 @@
|
|
|
22
22
|
"githooks": "git config core.hooksPath .githooks"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@eslint-community/eslint-plugin-eslint-comments": "
|
|
26
|
-
"@eslint/eslintrc": "
|
|
27
|
-
"@eslint/js": "
|
|
28
|
-
"@stylistic/eslint-plugin": "
|
|
29
|
-
"@typescript-eslint/eslint-plugin": "
|
|
30
|
-
"@typescript-eslint/parser": "
|
|
31
|
-
"editorconfig": "
|
|
32
|
-
"eslint": "
|
|
33
|
-
"eslint-import-resolver-typescript": "
|
|
34
|
-
"eslint-plugin-import": "
|
|
35
|
-
"eslint-plugin-jest": "
|
|
36
|
-
"eslint-plugin-jsdoc": "
|
|
37
|
-
"eslint-plugin-jsonc": "
|
|
38
|
-
"eslint-plugin-jsx-a11y": "
|
|
39
|
-
"eslint-plugin-n": "17.0.0-
|
|
40
|
-
"eslint-plugin-package-json": "
|
|
41
|
-
"eslint-plugin-promise": "
|
|
42
|
-
"eslint-plugin-react": "
|
|
43
|
-
"eslint-plugin-regexp": "
|
|
44
|
-
"eslint-plugin-security": "
|
|
45
|
-
"eslint-plugin-sonarjs": "
|
|
46
|
-
"eslint-plugin-unicorn": "
|
|
47
|
-
"eslint-plugin-unused-imports": "
|
|
48
|
-
"jsonc-eslint-parser": "
|
|
25
|
+
"@eslint-community/eslint-plugin-eslint-comments": "4.1.0",
|
|
26
|
+
"@eslint/eslintrc": "3.0.2",
|
|
27
|
+
"@eslint/js": "8.57.0",
|
|
28
|
+
"@stylistic/eslint-plugin": "1.7.0",
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "7.5.0",
|
|
30
|
+
"@typescript-eslint/parser": "7.5.0",
|
|
31
|
+
"editorconfig": "2.0.0",
|
|
32
|
+
"eslint": "8.57.0",
|
|
33
|
+
"eslint-import-resolver-typescript": "3.6.1",
|
|
34
|
+
"eslint-plugin-import": "2.29.1",
|
|
35
|
+
"eslint-plugin-jest": "27.9.0",
|
|
36
|
+
"eslint-plugin-jsdoc": "48.2.2",
|
|
37
|
+
"eslint-plugin-jsonc": "2.15.0",
|
|
38
|
+
"eslint-plugin-jsx-a11y": "6.8.0",
|
|
39
|
+
"eslint-plugin-n": "17.0.0-6",
|
|
40
|
+
"eslint-plugin-package-json": "0.12.1",
|
|
41
|
+
"eslint-plugin-promise": "6.1.1",
|
|
42
|
+
"eslint-plugin-react": "7.34.1",
|
|
43
|
+
"eslint-plugin-regexp": "2.4.0",
|
|
44
|
+
"eslint-plugin-security": "2.1.1",
|
|
45
|
+
"eslint-plugin-sonarjs": "0.24.0",
|
|
46
|
+
"eslint-plugin-unicorn": "51.0.1",
|
|
47
|
+
"eslint-plugin-unused-imports": "3.1.0",
|
|
48
|
+
"jsonc-eslint-parser": "2.4.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
+
"@darksheep/eslint-formatter-github": "0.0.1",
|
|
51
52
|
"@types/eslint": "~8.56.0",
|
|
52
53
|
"@types/eslint__eslintrc": "~2.1.1",
|
|
53
54
|
"@types/eslint__js": "~8.42.3",
|
|
54
55
|
"@types/estree": "~1.0.2",
|
|
55
|
-
"@types/node": "~20.
|
|
56
|
-
"type-fest": "~4.
|
|
56
|
+
"@types/node": "~20.12.0",
|
|
57
|
+
"type-fest": "~4.15.0",
|
|
57
58
|
"typescript": "~5.4.0"
|
|
58
59
|
},
|
|
59
60
|
"peerDependenciesMeta": {
|
package/src/index.js
CHANGED
|
@@ -10,7 +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 {
|
|
13
|
+
import { createEslintPackageJsonConfig } from './plugins/package-json.js';
|
|
14
14
|
import { createEslintJsonConfig } from './plugins/json.js';
|
|
15
15
|
import { createEslintJsxA11yConfig } from './plugins/jsx-a11y.js';
|
|
16
16
|
import { createEslintNodeConfigs } from './plugins/node.js';
|
|
@@ -34,7 +34,7 @@ const configBuilders = [
|
|
|
34
34
|
createEslintCommentsConfig,
|
|
35
35
|
createEslintImportConfig,
|
|
36
36
|
createEslintNodeConfigs,
|
|
37
|
-
|
|
37
|
+
createEslintPackageJsonConfig,
|
|
38
38
|
createEslintJsonConfig,
|
|
39
39
|
createEslintPromiseConfig,
|
|
40
40
|
createEslintTypescriptConfig,
|
package/src/plugins/json.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import jsonc from 'eslint-plugin-jsonc';
|
|
2
|
+
import parser from 'jsonc-eslint-parser';
|
|
3
3
|
|
|
4
4
|
import { getJsonFiles } from '../utilities/eslint-files.js';
|
|
5
5
|
|
|
@@ -11,27 +11,24 @@ export async function createEslintJsonConfig() {
|
|
|
11
11
|
return [
|
|
12
12
|
{
|
|
13
13
|
files: await getJsonFiles(),
|
|
14
|
-
languageOptions: {
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
plugins: {
|
|
18
|
-
jsonc: /** @type {*} */ (jsoncPlugin),
|
|
19
|
-
},
|
|
14
|
+
languageOptions: { parser },
|
|
15
|
+
// @ts-expect-error jsonc does not match the plugin interface
|
|
16
|
+
plugins: { jsonc },
|
|
20
17
|
},
|
|
21
18
|
{
|
|
22
19
|
files: [ '**/*.json' ],
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
// @ts-expect-error Record<string, string> vs Record<string, 'error'>
|
|
21
|
+
rules: jsonc.configs['recommended-with-json'].rules,
|
|
25
22
|
},
|
|
26
23
|
{
|
|
27
24
|
files: [ '**/*.jsonc' ],
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
// @ts-expect-error Record<string, string> vs Record<string, 'error'>
|
|
26
|
+
rules: jsonc.configs['recommended-with-jsonc'].rules,
|
|
30
27
|
},
|
|
31
28
|
{
|
|
32
29
|
files: [ '**/*.json5' ],
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
// @ts-expect-error Record<string, string> vs Record<string, 'error'>
|
|
31
|
+
rules: jsonc.configs['recommended-with-json5'].rules,
|
|
35
32
|
},
|
|
36
33
|
];
|
|
37
34
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 createEslintPackageJsonConfig() {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
// @ts-expect-error
|
|
12
|
+
plugins: { 'package-json': plugin },
|
|
13
|
+
languageOptions: {
|
|
14
|
+
parser: 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
|
+
// Seems to break renovate finding changelogs
|
|
22
|
+
'package-json/prefer-repository-shorthand': 'off',
|
|
23
|
+
// Breaks workspace dependency linking
|
|
24
|
+
// Invalid version range for dependency @darksheep/clone: workspace:~
|
|
25
|
+
'package-json/valid-package-def': 'warn',
|
|
26
|
+
|
|
27
|
+
'package-json/unique-dependencies': 'error',
|
|
28
|
+
'package-json/valid-local-dependency': 'error',
|
|
29
|
+
'package-json/valid-name': 'error',
|
|
30
|
+
'package-json/valid-repository-directory': 'error',
|
|
31
|
+
'package-json/valid-version': 'error',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
}
|
|
@@ -29,7 +29,7 @@ export async function createEslintTypescriptConfig(root) {
|
|
|
29
29
|
return [ {
|
|
30
30
|
files: getTypescriptFiles(),
|
|
31
31
|
languageOptions: {
|
|
32
|
-
parser:
|
|
32
|
+
parser: typescriptParser,
|
|
33
33
|
sourceType: 'module',
|
|
34
34
|
parserOptions: {
|
|
35
35
|
warnOnUnsupportedTypeScriptVersion: false,
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Get ESLint config for the regexp plugin
|
|
3
3
|
* @returns {Promise<import('eslint').Linter.FlatConfig[]>}
|
|
4
4
|
*/
|
|
5
|
-
export function
|
|
5
|
+
export function createEslintPackageJsonConfig(): Promise<import('eslint').Linter.FlatConfig[]>;
|
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
// Seems to break renovate finding changelogs
|
|
22
|
-
'@package-json/prefer-repository-shorthand': 'off',
|
|
23
|
-
// Breaks workspace dependency linking
|
|
24
|
-
// Invalid version range for dependency @darksheep/clone: workspace:~
|
|
25
|
-
'@package-json/valid-package-def': 'off',
|
|
26
|
-
|
|
27
|
-
'@package-json/unique-dependencies': 'error',
|
|
28
|
-
'@package-json/valid-local-dependency': 'error',
|
|
29
|
-
'@package-json/valid-name': 'error',
|
|
30
|
-
'@package-json/valid-repository-directory': 'error',
|
|
31
|
-
'@package-json/valid-version': 'error',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
];
|
|
35
|
-
}
|