@darksheep/eslint 4.1.6 โ 4.1.8
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 +21 -0
- package/package.json +3 -3
- package/src/plugins/import.js +1 -1
- package/src/plugins/jsdoc.js +1 -1
- package/src/plugins/node.js +8 -2
- package/src/plugins/sca.js +1 -1
- package/src/plugins/typescript.js +1 -1
- package/src/plugins/unused-imports.js +1 -1
- package/src/utilities/eslint-files.js +17 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.1.8](https://github.com/DarkSheepSoftware/eslint/compare/v4.1.7...v4.1.8) (2024-03-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ๐ฆ Dependencies
|
|
7
|
+
|
|
8
|
+
* **dev:** update dependency type-fest to ~4.11.0 ([#277](https://github.com/DarkSheepSoftware/eslint/issues/277)) ([5712bfd](https://github.com/DarkSheepSoftware/eslint/commit/5712bfd38a8581b804819368e78c3d4fa566717e))
|
|
9
|
+
* **lock:** lock file maintenance ([#276](https://github.com/DarkSheepSoftware/eslint/issues/276)) ([0ab07e7](https://github.com/DarkSheepSoftware/eslint/commit/0ab07e7adb771b2a400338ce96dd222b250a225c))
|
|
10
|
+
* **pkg:** update dependency eslint-plugin-react to ~7.34.0 ([#278](https://github.com/DarkSheepSoftware/eslint/issues/278)) ([2d6203f](https://github.com/DarkSheepSoftware/eslint/commit/2d6203f9d3b5a48a8877beaf48a2b53269d2122b))
|
|
11
|
+
|
|
12
|
+
## [4.1.7](https://github.com/DarkSheepSoftware/eslint/compare/v4.1.6...v4.1.7) (2024-03-02)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### ๐ฆ Dependencies
|
|
16
|
+
|
|
17
|
+
* **dev:** update dependency @types/node to v20.11.24 ([#273](https://github.com/DarkSheepSoftware/eslint/issues/273)) ([ccdd44b](https://github.com/DarkSheepSoftware/eslint/commit/ccdd44bdd2052234001fbdacc6053e03048182da))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### ๐งน Chores
|
|
21
|
+
|
|
22
|
+
* allow sync in test files ([#275](https://github.com/DarkSheepSoftware/eslint/issues/275)) ([7334c77](https://github.com/DarkSheepSoftware/eslint/commit/7334c770d7b316975e476f443a07cc135ab13df6))
|
|
23
|
+
|
|
3
24
|
## [4.1.6](https://github.com/DarkSheepSoftware/eslint/compare/v4.1.5...v4.1.6) (2024-02-29)
|
|
4
25
|
|
|
5
26
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darksheep/eslint",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"packageManager": "yarn@4.1.0",
|
|
6
6
|
"bin": "./src/bin/eslint.cjs",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@types/eslint__js": "~8.42.3",
|
|
27
27
|
"@types/estree": "~1.0.2",
|
|
28
28
|
"@types/node": "~20.11.0",
|
|
29
|
-
"type-fest": "~4.
|
|
29
|
+
"type-fest": "~4.11.0",
|
|
30
30
|
"typescript": "~5.3.2"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"eslint-plugin-jsx-a11y": "~6.8.0",
|
|
47
47
|
"eslint-plugin-n": "~17.0.0-0",
|
|
48
48
|
"eslint-plugin-promise": "~6.1.1",
|
|
49
|
-
"eslint-plugin-react": "~7.
|
|
49
|
+
"eslint-plugin-react": "~7.34.0",
|
|
50
50
|
"eslint-plugin-regexp": "~2.2.0",
|
|
51
51
|
"eslint-plugin-security": "~2.1.0",
|
|
52
52
|
"eslint-plugin-sonarjs": "~0.24.0",
|
package/src/plugins/import.js
CHANGED
package/src/plugins/jsdoc.js
CHANGED
package/src/plugins/node.js
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
getModuleFiles,
|
|
8
8
|
getTypescriptFiles,
|
|
9
9
|
getExampleFiles,
|
|
10
|
+
getTestFiles,
|
|
10
11
|
} from '../utilities/eslint-files.js';
|
|
11
12
|
|
|
12
13
|
const script = n.configs['flat/recommended-script'];
|
|
@@ -69,8 +70,8 @@ function toExt(globs) {
|
|
|
69
70
|
export async function createEslintNodeConfigs(root) {
|
|
70
71
|
const commonFiles = await getCommonFiles(root);
|
|
71
72
|
const moduleFiles = await getModuleFiles(root);
|
|
72
|
-
const typescriptFiles =
|
|
73
|
-
const exampleFiles =
|
|
73
|
+
const typescriptFiles = getTypescriptFiles();
|
|
74
|
+
const exampleFiles = getExampleFiles();
|
|
74
75
|
const rootDirectory = dirname(fileURLToPath(root));
|
|
75
76
|
|
|
76
77
|
return [
|
|
@@ -125,5 +126,10 @@ export async function createEslintNodeConfigs(root) {
|
|
|
125
126
|
'n/no-unsupported-features/es-syntax': [ 'error', { ignores: [ 'modules' ] } ],
|
|
126
127
|
},
|
|
127
128
|
},
|
|
129
|
+
{
|
|
130
|
+
files: getTestFiles(),
|
|
131
|
+
plugins: { n },
|
|
132
|
+
rules: { 'n/no-sync': 'off' },
|
|
133
|
+
},
|
|
128
134
|
];
|
|
129
135
|
}
|
package/src/plugins/sca.js
CHANGED
|
@@ -27,7 +27,7 @@ export async function createEslintTypescriptConfig(root) {
|
|
|
27
27
|
const typescriptPlugin = idef(await import('@typescript-eslint/eslint-plugin'));
|
|
28
28
|
|
|
29
29
|
return [ {
|
|
30
|
-
files:
|
|
30
|
+
files: getTypescriptFiles(),
|
|
31
31
|
languageOptions: {
|
|
32
32
|
parser: /** @type {*} */ (typescriptParser),
|
|
33
33
|
sourceType: 'module',
|
|
@@ -46,17 +46,30 @@ export async function getModuleFiles(root) {
|
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* Get a list of globs for typescript files
|
|
49
|
-
* @returns {
|
|
49
|
+
* @returns {string[]}
|
|
50
50
|
*/
|
|
51
|
-
export
|
|
51
|
+
export function getTypescriptFiles() {
|
|
52
52
|
return [ '**/*.ts', '**/*.tsx' ];
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Get a list of possible example files
|
|
57
|
-
* @returns {
|
|
57
|
+
* @returns {string[]}
|
|
58
|
+
*/
|
|
59
|
+
export function getTestFiles() {
|
|
60
|
+
return [
|
|
61
|
+
...expandGlob('**/test.*'),
|
|
62
|
+
...expandGlob('**/*.test.*'),
|
|
63
|
+
...expandGlob('**/{test,tests}/*'),
|
|
64
|
+
...expandGlob('**/{test,tests}/**/*'),
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Get a list of possible example files
|
|
70
|
+
* @returns {string[]}
|
|
58
71
|
*/
|
|
59
|
-
export
|
|
72
|
+
export function getExampleFiles() {
|
|
60
73
|
return [
|
|
61
74
|
...expandGlob('**/example.{ts,js,tsx,jsx,mts,cts,mjs,cjs}'),
|
|
62
75
|
...expandGlob('**/{example,examples}/*'),
|