@darksheep/eslint 4.4.6 → 4.4.7
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 +25 -0
- package/package.json +7 -9
- package/src/index.js +0 -2
- package/src/plugins/sonarjs.js +15 -20
- package/types/src/plugins/sonarjs.d.ts +1 -2
- package/src/plugins/import.js +0 -139
- package/types/src/plugins/import.d.ts +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.4.7](https://github.com/DarkSheepSoftware/eslint/compare/v4.4.6...v4.4.7) (2024-05-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### 🐛 Fixes
|
|
7
|
+
|
|
8
|
+
* Remove import plugin ([#406](https://github.com/DarkSheepSoftware/eslint/issues/406)) ([a27810a](https://github.com/DarkSheepSoftware/eslint/commit/a27810ab7241184acbd72addc22a8cbfee124d75))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### 📦 Dependencies
|
|
12
|
+
|
|
13
|
+
* **deps:** update yarn to v4.2.0 ([#399](https://github.com/DarkSheepSoftware/eslint/issues/399)) ([02ed681](https://github.com/DarkSheepSoftware/eslint/commit/02ed681160cb4cef078e78157c5c30c7adcea8a2))
|
|
14
|
+
* **deps:** update yarn to v4.2.1 ([#400](https://github.com/DarkSheepSoftware/eslint/issues/400)) ([aa9677b](https://github.com/DarkSheepSoftware/eslint/commit/aa9677ba6e3e9a8967b0f69eaaca1d13c9c8f9c2))
|
|
15
|
+
* **dev:** update dependency @types/node to v20.12.10 ([#410](https://github.com/DarkSheepSoftware/eslint/issues/410)) ([3f24a44](https://github.com/DarkSheepSoftware/eslint/commit/3f24a443d7e2cee69fed2154702e00a4054b52c3))
|
|
16
|
+
* **dev:** update dependency @types/node to v20.12.8 ([#398](https://github.com/DarkSheepSoftware/eslint/issues/398)) ([60fb0fc](https://github.com/DarkSheepSoftware/eslint/commit/60fb0fc66063986ce43d10bce5e2a2f3326aa377))
|
|
17
|
+
* **dev:** update dependency type-fest to v4.18.1 ([#396](https://github.com/DarkSheepSoftware/eslint/issues/396)) ([9580302](https://github.com/DarkSheepSoftware/eslint/commit/9580302dd09b765a881c22a75df5fe37d8149bff))
|
|
18
|
+
* **lock:** lock file maintenance ([#403](https://github.com/DarkSheepSoftware/eslint/issues/403)) ([f78d4d9](https://github.com/DarkSheepSoftware/eslint/commit/f78d4d90355c6d7e7ea9a282656a6dc78b5dbd12))
|
|
19
|
+
* **lock:** lock file maintenance ([#407](https://github.com/DarkSheepSoftware/eslint/issues/407)) ([9e87a3c](https://github.com/DarkSheepSoftware/eslint/commit/9e87a3c02887f5f417a263620060418364e5e568))
|
|
20
|
+
* **pkg:** update dependency @eslint/js to v9.2.0 ([#404](https://github.com/DarkSheepSoftware/eslint/issues/404)) ([6466b92](https://github.com/DarkSheepSoftware/eslint/commit/6466b92d3efad12574a1f30c3762746bb19a3aae))
|
|
21
|
+
* **pkg:** update dependency eslint-plugin-jest to v28.4.0 ([#401](https://github.com/DarkSheepSoftware/eslint/issues/401)) ([d1da73d](https://github.com/DarkSheepSoftware/eslint/commit/d1da73d309e91272c1330457ad1fc496baec988f))
|
|
22
|
+
* **pkg:** update dependency eslint-plugin-jest to v28.5.0 ([#405](https://github.com/DarkSheepSoftware/eslint/issues/405)) ([af64ff6](https://github.com/DarkSheepSoftware/eslint/commit/af64ff6a7afaf76770f3d6444fe658d6604c5c33))
|
|
23
|
+
* **pkg:** update dependency eslint-plugin-n to v17.5.1 ([#411](https://github.com/DarkSheepSoftware/eslint/issues/411)) ([9972dd5](https://github.com/DarkSheepSoftware/eslint/commit/9972dd5ffa59b42d7de1a9abd83f45ee7a46c313))
|
|
24
|
+
* **pkg:** update dependency eslint-plugin-sonarjs to v1 ([#402](https://github.com/DarkSheepSoftware/eslint/issues/402)) ([2b0cd21](https://github.com/DarkSheepSoftware/eslint/commit/2b0cd21672c29b5105b3afa568cfdb51910426fb))
|
|
25
|
+
* **pkg:** update dependency eslint-plugin-sonarjs to v1.0.3 ([#408](https://github.com/DarkSheepSoftware/eslint/issues/408)) ([faf9356](https://github.com/DarkSheepSoftware/eslint/commit/faf9356af4dbe0dff24dd9bd5f06dc54660261d7))
|
|
26
|
+
* **pkg:** update dependency eslint-plugin-unused-imports to v3.2.0 ([#395](https://github.com/DarkSheepSoftware/eslint/issues/395)) ([3aa4960](https://github.com/DarkSheepSoftware/eslint/commit/3aa49602cba965df7f84858a48b95005801d2b0b))
|
|
27
|
+
|
|
3
28
|
## [4.4.6](https://github.com/DarkSheepSoftware/eslint/compare/v4.4.5...v4.4.6) (2024-04-30)
|
|
4
29
|
|
|
5
30
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darksheep/eslint",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/DarkSheepSoftware/eslint"
|
|
@@ -24,27 +24,25 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@eslint-community/eslint-plugin-eslint-comments": "4.3.0",
|
|
26
26
|
"@eslint/eslintrc": "3.0.2",
|
|
27
|
-
"@eslint/js": "9.
|
|
27
|
+
"@eslint/js": "9.2.0",
|
|
28
28
|
"@stylistic/eslint-plugin": "1.8.0",
|
|
29
29
|
"@typescript-eslint/eslint-plugin": "7.8.0",
|
|
30
30
|
"@typescript-eslint/parser": "7.8.0",
|
|
31
31
|
"editorconfig": "2.0.0",
|
|
32
32
|
"eslint": "8.57.0",
|
|
33
|
-
"eslint-
|
|
34
|
-
"eslint-plugin-import": "2.29.1",
|
|
35
|
-
"eslint-plugin-jest": "28.3.0",
|
|
33
|
+
"eslint-plugin-jest": "28.5.0",
|
|
36
34
|
"eslint-plugin-jsdoc": "48.2.3",
|
|
37
35
|
"eslint-plugin-jsonc": "2.15.1",
|
|
38
36
|
"eslint-plugin-jsx-a11y": "6.8.0",
|
|
39
|
-
"eslint-plugin-n": "17.
|
|
37
|
+
"eslint-plugin-n": "17.5.1",
|
|
40
38
|
"eslint-plugin-package-json": "0.13.1",
|
|
41
39
|
"eslint-plugin-promise": "6.1.1",
|
|
42
40
|
"eslint-plugin-react": "7.34.1",
|
|
43
41
|
"eslint-plugin-regexp": "2.5.0",
|
|
44
42
|
"eslint-plugin-security": "3.0.0",
|
|
45
|
-
"eslint-plugin-sonarjs": "0.
|
|
43
|
+
"eslint-plugin-sonarjs": "1.0.3",
|
|
46
44
|
"eslint-plugin-unicorn": "52.0.0",
|
|
47
|
-
"eslint-plugin-unused-imports": "3.
|
|
45
|
+
"eslint-plugin-unused-imports": "3.2.0",
|
|
48
46
|
"jsonc-eslint-parser": "2.4.0"
|
|
49
47
|
},
|
|
50
48
|
"devDependencies": {
|
|
@@ -62,7 +60,7 @@
|
|
|
62
60
|
"optional": true
|
|
63
61
|
}
|
|
64
62
|
},
|
|
65
|
-
"packageManager": "yarn@4.
|
|
63
|
+
"packageManager": "yarn@4.2.1",
|
|
66
64
|
"engines": {
|
|
67
65
|
"node": "^20 || ^21"
|
|
68
66
|
}
|
package/src/index.js
CHANGED
|
@@ -7,7 +7,6 @@ import { createEslintComplexityConfig } from './configs/eslint-complexity.js';
|
|
|
7
7
|
import { createStyleConfigs } from './configs/eslint-style.js';
|
|
8
8
|
|
|
9
9
|
import { createEslintCommentsConfig } from './plugins/eslint-comments.js';
|
|
10
|
-
import { createEslintImportConfig } from './plugins/import.js';
|
|
11
10
|
import { createEslintJestConfig } from './plugins/jest.js';
|
|
12
11
|
import { createEslintJSDocConfig } from './plugins/jsdoc.js';
|
|
13
12
|
import { createEslintPackageJsonConfig } from './plugins/package-json.js';
|
|
@@ -32,7 +31,6 @@ const configBuilders = [
|
|
|
32
31
|
createEslintComplexityConfig,
|
|
33
32
|
createStyleConfigs,
|
|
34
33
|
createEslintCommentsConfig,
|
|
35
|
-
createEslintImportConfig,
|
|
36
34
|
createEslintNodeConfigs,
|
|
37
35
|
createEslintPackageJsonConfig,
|
|
38
36
|
createEslintJsonConfig,
|
package/src/plugins/sonarjs.js
CHANGED
|
@@ -1,28 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { makeCompat } from '../utilities/make-compat.js';
|
|
1
|
+
import sonarjs from 'eslint-plugin-sonarjs';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* Get ESLint config for the sonar plugin
|
|
6
|
-
* @param {import('node:url').URL} root root url
|
|
7
5
|
* @returns {import('eslint').Linter.FlatConfig[]}
|
|
8
6
|
*/
|
|
9
|
-
export function createEslintSonarJSConfig(
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
export function createEslintSonarJSConfig() {
|
|
8
|
+
return [
|
|
9
|
+
{
|
|
10
|
+
plugins: { sonarjs },
|
|
11
|
+
rules: {
|
|
12
|
+
...sonarjs.configs.recommended.rules,
|
|
13
|
+
'sonarjs/cognitive-complexity': 'error',
|
|
14
|
+
},
|
|
17
15
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
{
|
|
21
|
-
|
|
22
|
-
rules: {
|
|
23
|
-
'sonarjs/no-duplicate-string': 'off',
|
|
24
|
-
},
|
|
16
|
+
{
|
|
17
|
+
files: [ '*.test.*' ],
|
|
18
|
+
rules: {
|
|
19
|
+
'sonarjs/no-duplicate-string': 'off',
|
|
25
20
|
},
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
},
|
|
22
|
+
];
|
|
28
23
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Get ESLint config for the sonar plugin
|
|
3
|
-
* @param {import('node:url').URL} root root url
|
|
4
3
|
* @returns {import('eslint').Linter.FlatConfig[]}
|
|
5
4
|
*/
|
|
6
|
-
export function createEslintSonarJSConfig(
|
|
5
|
+
export function createEslintSonarJSConfig(): import('eslint').Linter.FlatConfig[];
|
package/src/plugins/import.js
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import importPlugin from 'eslint-plugin-import';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
getModuleFiles,
|
|
5
|
-
getTypescriptFiles,
|
|
6
|
-
} from '../utilities/eslint-files.js';
|
|
7
|
-
|
|
8
|
-
/** @type {import('eslint').Linter.RulesRecord} */
|
|
9
|
-
const rules = {
|
|
10
|
-
/*
|
|
11
|
-
*Static analysis
|
|
12
|
-
*/
|
|
13
|
-
'import/no-unresolved': 'off',
|
|
14
|
-
'import/named': 'error',
|
|
15
|
-
'import/default': 'warn',
|
|
16
|
-
'import/namespace': [
|
|
17
|
-
'error',
|
|
18
|
-
{ allowComputed: true },
|
|
19
|
-
],
|
|
20
|
-
'import/no-restricted-paths': 'off',
|
|
21
|
-
'import/no-absolute-path': 'error',
|
|
22
|
-
'import/no-dynamic-require': 'error',
|
|
23
|
-
'import/no-internal-modules': 'off',
|
|
24
|
-
'import/no-webpack-loader-syntax': 'off',
|
|
25
|
-
'import/no-self-import': 'error',
|
|
26
|
-
'import/no-cycle': [
|
|
27
|
-
'error',
|
|
28
|
-
{ ignoreExternal: true },
|
|
29
|
-
],
|
|
30
|
-
'import/no-useless-path-segments': 'error',
|
|
31
|
-
'import/no-relative-parent-imports': 'off',
|
|
32
|
-
|
|
33
|
-
/*
|
|
34
|
-
* Helpful warnings
|
|
35
|
-
*/
|
|
36
|
-
'import/export': 'error',
|
|
37
|
-
'import/no-named-as-default': 'error',
|
|
38
|
-
'import/no-named-as-default-member': 'error',
|
|
39
|
-
'import/no-deprecated': 'error',
|
|
40
|
-
'import/no-mutable-exports': 'warn',
|
|
41
|
-
|
|
42
|
-
// For some reason this seems to be broken :thinking:
|
|
43
|
-
// 'import/no-unused-modules': [ 'warn', { unusedExports: true } ],
|
|
44
|
-
|
|
45
|
-
/*
|
|
46
|
-
* Module systems
|
|
47
|
-
*/
|
|
48
|
-
'import/unambiguous': 'error',
|
|
49
|
-
'import/no-commonjs': 'error',
|
|
50
|
-
'import/no-amd': 'error',
|
|
51
|
-
'import/no-nodejs-modules': 'off',
|
|
52
|
-
'import/no-extraneous-dependencies': 'off',
|
|
53
|
-
|
|
54
|
-
/*
|
|
55
|
-
* Import Style
|
|
56
|
-
*/
|
|
57
|
-
'import/first': 'error',
|
|
58
|
-
'import/exports-last': 'warn',
|
|
59
|
-
'import/no-duplicates': 'error',
|
|
60
|
-
'import/no-namespace': 'off',
|
|
61
|
-
'import/extensions': 'off',
|
|
62
|
-
'import/order': [
|
|
63
|
-
'error', {
|
|
64
|
-
groups: [
|
|
65
|
-
'builtin',
|
|
66
|
-
'external',
|
|
67
|
-
[
|
|
68
|
-
'internal',
|
|
69
|
-
'sibling',
|
|
70
|
-
'parent',
|
|
71
|
-
],
|
|
72
|
-
'index',
|
|
73
|
-
],
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
'import/newline-after-import': 'error',
|
|
77
|
-
// Breaks babel.
|
|
78
|
-
'import/prefer-default-export': 'off',
|
|
79
|
-
'import/max-dependencies': 'off',
|
|
80
|
-
'import/no-unassigned-import': 'error',
|
|
81
|
-
'import/no-named-default': 'off',
|
|
82
|
-
'import/no-default-export': 'off',
|
|
83
|
-
'import/no-named-export': 'off',
|
|
84
|
-
// Breaks babel.
|
|
85
|
-
'import/no-anonymous-default-export': 'off',
|
|
86
|
-
// This is sometimes painful
|
|
87
|
-
'import/group-exports': 'off',
|
|
88
|
-
'import/dynamic-import-chunkname': 'off',
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Get ESLint config for imports check
|
|
93
|
-
* @param {import('node:url').URL} root The root of the eslint config directory
|
|
94
|
-
* @returns {Promise<import('eslint').Linter.FlatConfig[]>}
|
|
95
|
-
*/
|
|
96
|
-
export async function createEslintImportConfig(root) {
|
|
97
|
-
return [
|
|
98
|
-
{
|
|
99
|
-
files: await getModuleFiles(root),
|
|
100
|
-
plugins: { import: importPlugin },
|
|
101
|
-
languageOptions: {
|
|
102
|
-
parserOptions: {
|
|
103
|
-
sourceType: 'module',
|
|
104
|
-
ecmaVersion: 2022,
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
settings: {
|
|
108
|
-
'import/parsers': {
|
|
109
|
-
espree: [ '.js', '.cjs', '.mjs', '.jsx' ],
|
|
110
|
-
},
|
|
111
|
-
'import/resolver': {
|
|
112
|
-
node: true,
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
rules: rules,
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
files: getTypescriptFiles(),
|
|
119
|
-
plugins: { import: importPlugin },
|
|
120
|
-
languageOptions: {
|
|
121
|
-
parserOptions: {
|
|
122
|
-
sourceType: 'module',
|
|
123
|
-
ecmaVersion: 2022,
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
settings: {
|
|
127
|
-
...importPlugin.configs.typescript.settings,
|
|
128
|
-
|
|
129
|
-
'import/resolver': {
|
|
130
|
-
typescript: {
|
|
131
|
-
alwaysTryTypes: true,
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
-
},
|
|
136
|
-
rules: importPlugin.configs.typescript.rules,
|
|
137
|
-
},
|
|
138
|
-
];
|
|
139
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get ESLint config for imports check
|
|
3
|
-
* @param {import('node:url').URL} root The root of the eslint config directory
|
|
4
|
-
* @returns {Promise<import('eslint').Linter.FlatConfig[]>}
|
|
5
|
-
*/
|
|
6
|
-
export function createEslintImportConfig(root: import('node:url').URL): Promise<import('eslint').Linter.FlatConfig[]>;
|