@darksheep/eslint 4.1.8 → 4.2.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 +14 -0
- package/package.json +8 -4
- package/types/eslint.config.d.ts +2 -0
- package/types/src/bin/eslint.d.cts +2 -0
- package/types/src/configs/eslint-base.d.ts +5 -0
- package/types/src/configs/eslint-complexity.d.ts +5 -0
- package/types/src/configs/eslint-ignores.d.ts +6 -0
- package/types/src/configs/eslint-recommended.d.ts +5 -0
- package/types/src/configs/eslint-style.d.ts +6 -0
- package/types/src/custom/index.d.ts +8 -0
- package/types/src/custom/instance-of-array.d.ts +3 -0
- package/types/src/custom/loose-types.d.ts +3 -0
- package/types/src/custom/no-useless-expression.d.ts +3 -0
- package/types/src/custom/sequence-expression.d.ts +3 -0
- package/types/src/index.d.ts +8 -0
- package/types/src/plugins/eslint-comments.d.ts +5 -0
- package/types/src/plugins/import.d.ts +6 -0
- package/types/src/plugins/jest.d.ts +6 -0
- package/types/src/plugins/jsdoc.d.ts +6 -0
- package/types/src/plugins/json.d.ts +5 -0
- package/types/src/plugins/jsx-a11y.d.ts +5 -0
- package/types/src/plugins/node.d.ts +6 -0
- package/types/src/plugins/promise.d.ts +5 -0
- package/types/src/plugins/react.d.ts +6 -0
- package/types/src/plugins/regexp.d.ts +6 -0
- package/types/src/plugins/sca.d.ts +6 -0
- package/types/src/plugins/security.d.ts +5 -0
- package/types/src/plugins/sonarjs.d.ts +6 -0
- package/types/src/plugins/style.d.ts +5 -0
- package/types/src/plugins/typescript.d.ts +6 -0
- package/types/src/plugins/unicorn.d.ts +6 -0
- package/types/src/plugins/unused-imports.d.ts +6 -0
- package/types/src/utilities/editorconfig.d.ts +27 -0
- package/types/src/utilities/eslint-files.d.ts +32 -0
- package/types/src/utilities/expand-glob.d.ts +5 -0
- package/types/src/utilities/filesystem.d.ts +27 -0
- package/types/src/utilities/make-compat.d.ts +5 -0
- package/types/src/utilities/package.d.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.2.0](https://github.com/DarkSheepSoftware/eslint/compare/v4.1.8...v4.2.0) (2024-03-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### 💡 Features
|
|
7
|
+
|
|
8
|
+
* builtin ts types ([564facf](https://github.com/DarkSheepSoftware/eslint/commit/564facf2e27b27e15db026118e5342dafb2cad8d))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### 📦 Dependencies
|
|
12
|
+
|
|
13
|
+
* **deps:** update yarn to v4.1.1 ([#282](https://github.com/DarkSheepSoftware/eslint/issues/282)) ([c9af1d8](https://github.com/DarkSheepSoftware/eslint/commit/c9af1d84596926fe2aa75c5e9cb20fc1e853452a))
|
|
14
|
+
* **dev:** update dependency type-fest to v4.11.1 ([#258](https://github.com/DarkSheepSoftware/eslint/issues/258)) ([00a0fa3](https://github.com/DarkSheepSoftware/eslint/commit/00a0fa33ae4d7de182953a29a9b3ae786e3a396e))
|
|
15
|
+
* **pkg:** update typescript-eslint monorepo to v7.1.1 ([#280](https://github.com/DarkSheepSoftware/eslint/issues/280)) ([7653003](https://github.com/DarkSheepSoftware/eslint/commit/765300359b074c5eec9d1dbc06474d2f307b43e6))
|
|
16
|
+
|
|
3
17
|
## [4.1.8](https://github.com/DarkSheepSoftware/eslint/compare/v4.1.7...v4.1.8) (2024-03-04)
|
|
4
18
|
|
|
5
19
|
|
package/package.json
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darksheep/eslint",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"packageManager": "yarn@4.1.
|
|
5
|
+
"packageManager": "yarn@4.1.1",
|
|
6
6
|
"bin": "./src/bin/eslint.cjs",
|
|
7
7
|
"exports": {
|
|
8
|
-
".":
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./src/index.js",
|
|
10
|
+
"types": "./types/src/index.d.ts"
|
|
11
|
+
}
|
|
9
12
|
},
|
|
10
13
|
"files": [
|
|
11
|
-
"src"
|
|
14
|
+
"src",
|
|
15
|
+
"types"
|
|
12
16
|
],
|
|
13
17
|
"engines": {
|
|
14
18
|
"node": "^20 || ^21"
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get basic ESLint ignores config
|
|
3
|
+
* @param {import('node:url').URL} root root url
|
|
4
|
+
* @returns {Promise<import('eslint').Linter.FlatConfig[]>}
|
|
5
|
+
*/
|
|
6
|
+
export function createEslintIgnoresConfig(root: import('node:url').URL): Promise<import('eslint').Linter.FlatConfig[]>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/**
|
|
3
|
+
* @param {string | URL} root root url
|
|
4
|
+
* @returns {Promise<import('eslint').Linter.FlatConfig[]>}
|
|
5
|
+
*/
|
|
6
|
+
export function createConfig(root: string | URL): Promise<import('eslint').Linter.FlatConfig[]>;
|
|
7
|
+
export * from "eslint";
|
|
8
|
+
import { URL } from 'node:url';
|
|
@@ -0,0 +1,6 @@
|
|
|
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[]>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get ESLint config jest plugin
|
|
3
|
+
* @param {import('node:url').URL} root root url
|
|
4
|
+
* @returns {Promise<import('eslint').Linter.FlatConfig[]>}
|
|
5
|
+
*/
|
|
6
|
+
export function createEslintJestConfig(root: import('node:url').URL): Promise<import('eslint').Linter.FlatConfig[]>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get ESLint config for the sca plugin
|
|
3
|
+
* @param {URL} root The root url of the package we are linting
|
|
4
|
+
* @returns {Promise<import('eslint').Linter.FlatConfig[]>}
|
|
5
|
+
*/
|
|
6
|
+
export function createEslintSCAConfig(root: URL): Promise<import('eslint').Linter.FlatConfig[]>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get ESLint config for the typescript plugin
|
|
3
|
+
* @param {import('node:url').URL} root root url
|
|
4
|
+
* @returns {Promise<import('eslint').Linter.FlatConfig[]>}
|
|
5
|
+
*/
|
|
6
|
+
export function createEslintTypescriptConfig(root: import('node:url').URL): Promise<import('eslint').Linter.FlatConfig[]>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get ESLint config for the unicorn plugin
|
|
3
|
+
* @param {import('node:url').URL} root root url
|
|
4
|
+
* @returns {Promise<import('eslint').Linter.FlatConfig[]>}
|
|
5
|
+
*/
|
|
6
|
+
export function createEslintUnicornConfig(root: import('node:url').URL): Promise<import('eslint').Linter.FlatConfig[]>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get ESLint config for the unused import plugin
|
|
3
|
+
* @param {import('node:url').URL} root root url
|
|
4
|
+
* @returns {Promise<import('eslint').Linter.FlatConfig[]>}
|
|
5
|
+
*/
|
|
6
|
+
export function createEslintUnusedImportsConfig(root: import('node:url').URL): Promise<import('eslint').Linter.FlatConfig[]>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {import('node:url').URL} root root url
|
|
3
|
+
* @returns {Promise<import('eslint').Linter.FlatConfig[]>}
|
|
4
|
+
*/
|
|
5
|
+
export function createEditorOverrides(root: import('node:url').URL): Promise<import('eslint').Linter.FlatConfig[]>;
|
|
6
|
+
export type RuleSet = {
|
|
7
|
+
/**
|
|
8
|
+
* end of line
|
|
9
|
+
*/
|
|
10
|
+
EOL: string;
|
|
11
|
+
/**
|
|
12
|
+
* line feed
|
|
13
|
+
*/
|
|
14
|
+
LF: string;
|
|
15
|
+
/**
|
|
16
|
+
* trailing spaces
|
|
17
|
+
*/
|
|
18
|
+
TRAIL: string;
|
|
19
|
+
/**
|
|
20
|
+
* indent size
|
|
21
|
+
*/
|
|
22
|
+
INDENT: string;
|
|
23
|
+
/**
|
|
24
|
+
* indent binary ops size
|
|
25
|
+
*/
|
|
26
|
+
INDENT_BINARY?: string | undefined;
|
|
27
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get a list of globs for common js files
|
|
3
|
+
* @returns {Promise<string[]>}
|
|
4
|
+
*/
|
|
5
|
+
export function getJsonFiles(): Promise<string[]>;
|
|
6
|
+
/**
|
|
7
|
+
* Get a list of globs for common js files
|
|
8
|
+
* @param {import('node:url').URL} root root url
|
|
9
|
+
* @returns {Promise<string[]>}
|
|
10
|
+
*/
|
|
11
|
+
export function getCommonFiles(root: import('node:url').URL): Promise<string[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Get a list of globs for module files
|
|
14
|
+
* @param {import('node:url').URL} root root url
|
|
15
|
+
* @returns {Promise<string[]>}
|
|
16
|
+
*/
|
|
17
|
+
export function getModuleFiles(root: import('node:url').URL): Promise<string[]>;
|
|
18
|
+
/**
|
|
19
|
+
* Get a list of globs for typescript files
|
|
20
|
+
* @returns {string[]}
|
|
21
|
+
*/
|
|
22
|
+
export function getTypescriptFiles(): string[];
|
|
23
|
+
/**
|
|
24
|
+
* Get a list of possible example files
|
|
25
|
+
* @returns {string[]}
|
|
26
|
+
*/
|
|
27
|
+
export function getTestFiles(): string[];
|
|
28
|
+
/**
|
|
29
|
+
* Get a list of possible example files
|
|
30
|
+
* @returns {string[]}
|
|
31
|
+
*/
|
|
32
|
+
export function getExampleFiles(): string[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {string} path The absolute path to the file to check
|
|
3
|
+
* @returns {Promise<boolean>}
|
|
4
|
+
*/
|
|
5
|
+
export function exists(path: string): Promise<boolean>;
|
|
6
|
+
/**
|
|
7
|
+
* Does {filePath} exist in {projectPath}
|
|
8
|
+
* @param {string} [filePath] The path of the file to check
|
|
9
|
+
* @param {string} [projectPath] The path to the project root
|
|
10
|
+
* @returns {boolean}
|
|
11
|
+
*/
|
|
12
|
+
export function descendsFrom(filePath?: string | undefined, projectPath?: string | undefined): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Create a list of parent directories from {filepath} to {stopDirectory}
|
|
15
|
+
* @param {string} filepath The file to start from
|
|
16
|
+
* @param {string} [stopDirectory] The directory to stop at
|
|
17
|
+
* @returns {string[]}
|
|
18
|
+
*/
|
|
19
|
+
export function listParents(filepath: string, stopDirectory?: string | undefined): string[];
|
|
20
|
+
/**
|
|
21
|
+
* Find the closest {filename} starting from {rootFilePath}
|
|
22
|
+
* @param {string} rootFilePath The file to start the search from
|
|
23
|
+
* @param {string} filename The filename to find
|
|
24
|
+
* @param {string} [stopDirectory] The directory to stop searching at
|
|
25
|
+
* @returns {Promise<string|null>} Returns absolute path to the closest {filename} if found
|
|
26
|
+
*/
|
|
27
|
+
export function findUp(rootFilePath: string, filename: string, stopDirectory?: string | undefined): Promise<string | null>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the path of the eslint package json
|
|
3
|
+
* @param {import('node:url').URL} root root url
|
|
4
|
+
* @param {string} [packageName] The name of the npm package
|
|
5
|
+
* @returns {Promise<import('type-fest').PackageJson | null>}
|
|
6
|
+
*/
|
|
7
|
+
export function getPackageJson(root: import('node:url').URL, packageName?: string | undefined): Promise<import('type-fest').PackageJson | null>;
|