@darksheep/eslint 4.3.6 โ 4.4.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/CHANGELOG.md +45 -0
- package/package.json +25 -24
- 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,50 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.4.1](https://github.com/DarkSheepSoftware/eslint/compare/v4.4.0...v4.4.1) (2024-04-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ๐ฆ Dependencies
|
|
7
|
+
|
|
8
|
+
* **pkg:** update dependency eslint-plugin-sonarjs to v0.25.1 ([#344](https://github.com/DarkSheepSoftware/eslint/issues/344)) ([aaed2ce](https://github.com/DarkSheepSoftware/eslint/commit/aaed2cefb2da139e69724d26b458c51de13657d6))
|
|
9
|
+
|
|
10
|
+
## [4.4.0](https://github.com/DarkSheepSoftware/eslint/compare/v4.3.6...v4.4.0) (2024-04-03)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### ๐ Features
|
|
14
|
+
|
|
15
|
+
* Update parsers with valid types ([0abd598](https://github.com/DarkSheepSoftware/eslint/commit/0abd59800f2e6bdd0533f383fc87b578be5b06fe))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### ๐ Fixes
|
|
19
|
+
|
|
20
|
+
* Swap to pnpm to allow detecting missing packages ([4dcd53d](https://github.com/DarkSheepSoftware/eslint/commit/4dcd53d64716d0164519f34f3016b9e41e7561bf))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### ๐ฆ Dependencies
|
|
24
|
+
|
|
25
|
+
* **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))
|
|
26
|
+
* **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))
|
|
27
|
+
* **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))
|
|
28
|
+
* **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))
|
|
29
|
+
* **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))
|
|
30
|
+
* **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))
|
|
31
|
+
* **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))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### ๐งน Chores
|
|
35
|
+
|
|
36
|
+
* pin all deps ([f9fd808](https://github.com/DarkSheepSoftware/eslint/commit/f9fd808125bd4fb7109261b7833deb861195899f))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### ๐ค Automation
|
|
40
|
+
|
|
41
|
+
* swap to using our eslint formatter ([28265a6](https://github.com/DarkSheepSoftware/eslint/commit/28265a68cf29492391cf11874eb6c32578c667b4))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### โช Reverts
|
|
45
|
+
|
|
46
|
+
* 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))
|
|
47
|
+
|
|
3
48
|
## [4.3.6](https://github.com/DarkSheepSoftware/eslint/compare/v4.3.5...v4.3.6) (2024-04-03)
|
|
4
49
|
|
|
5
50
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darksheep/eslint",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/DarkSheepSoftware/eslint"
|
|
@@ -22,32 +22,33 @@
|
|
|
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": "
|
|
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
39
|
"eslint-plugin-n": "17.0.0-6",
|
|
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": "
|
|
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.25.1",
|
|
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",
|
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
|
-
}
|