@darksheep/eslint 6.8.1 โ 6.9.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 +33 -0
- package/package.json +17 -15
- package/src/index.js +2 -0
- package/src/plugins/react-native.js +43 -0
- package/src/plugins/typescript.js +5 -2
- package/src/types.d.ts +12 -7
- package/types/src/plugins/react-native.d.ts +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [6.9.0](https://github.com/DarkSheepSoftware/eslint/compare/v6.8.2...v6.9.0) (2025-03-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ๐ Features
|
|
7
|
+
|
|
8
|
+
* Add react native plugin ([#855](https://github.com/DarkSheepSoftware/eslint/issues/855)) ([d2c88ca](https://github.com/DarkSheepSoftware/eslint/commit/d2c88ca8de54aa233b93524dcc4409f414d21d3a))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### ๐ฆ Dependencies
|
|
12
|
+
|
|
13
|
+
* **pkg:** pin dependencies ([#856](https://github.com/DarkSheepSoftware/eslint/issues/856)) ([b7b2be4](https://github.com/DarkSheepSoftware/eslint/commit/b7b2be4f3921654b2df75b0e6329708fdbdd903f))
|
|
14
|
+
* **pkg:** update dependency @stylistic/eslint-plugin to v4.2.0 ([#825](https://github.com/DarkSheepSoftware/eslint/issues/825)) ([fdd4a26](https://github.com/DarkSheepSoftware/eslint/commit/fdd4a2690e865811b627f8a366fe50e1b9ae35a8))
|
|
15
|
+
* **pkg:** update dependency eslint-plugin-jsdoc to v50.6.6 ([#852](https://github.com/DarkSheepSoftware/eslint/issues/852)) ([f19c467](https://github.com/DarkSheepSoftware/eslint/commit/f19c467105a42f3443f9d3172acb96ff65544a09))
|
|
16
|
+
* **pkg:** update dependency eslint-plugin-n to v17.16.2 ([#850](https://github.com/DarkSheepSoftware/eslint/issues/850)) ([b111031](https://github.com/DarkSheepSoftware/eslint/commit/b1110316a7b3c82d70b0bbac4a10cb33f5b13f13))
|
|
17
|
+
* **pkg:** update dependency eslint-plugin-package-json to v0.26.3 ([#849](https://github.com/DarkSheepSoftware/eslint/issues/849)) ([89463a0](https://github.com/DarkSheepSoftware/eslint/commit/89463a08c34c672176ed81f6354388db96d97bcf))
|
|
18
|
+
* **pkg:** update dependency eslint-plugin-perfectionist to v4.10.1 ([#851](https://github.com/DarkSheepSoftware/eslint/issues/851)) ([68c91eb](https://github.com/DarkSheepSoftware/eslint/commit/68c91ebb4fdb6acefa390c590e94746870c25c00))
|
|
19
|
+
* **pkg:** update dependency yaml-eslint-parser to v1.3.0 ([#845](https://github.com/DarkSheepSoftware/eslint/issues/845)) ([65c98f5](https://github.com/DarkSheepSoftware/eslint/commit/65c98f5c293edd781b1462f5170eefe68a13246a))
|
|
20
|
+
* **pkg:** update eslint monorepo to v9.22.0 ([#842](https://github.com/DarkSheepSoftware/eslint/issues/842)) ([8fbee60](https://github.com/DarkSheepSoftware/eslint/commit/8fbee60582d6b54b9ebda4c44a678f9d35ee8d2f))
|
|
21
|
+
* **pkg:** update typescript-eslint monorepo to v8.26.1 ([#844](https://github.com/DarkSheepSoftware/eslint/issues/844)) ([7748979](https://github.com/DarkSheepSoftware/eslint/commit/7748979499e10bdaa88d3d6958abef37f5ae6921))
|
|
22
|
+
|
|
23
|
+
## [6.8.2](https://github.com/DarkSheepSoftware/eslint/compare/v6.8.1...v6.8.2) (2025-02-20)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### ๐ฉน Fixes
|
|
27
|
+
|
|
28
|
+
* require `type` prefix in type imports ([564fbbf](https://github.com/DarkSheepSoftware/eslint/commit/564fbbfea2a58ff96e7751e953d0b58cf222f031))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### ๐งน Chores
|
|
32
|
+
|
|
33
|
+
* consistent-indexed-object-style style: record ([373c938](https://github.com/DarkSheepSoftware/eslint/commit/373c938bddbd33667e99b1028003323b02c349b1))
|
|
34
|
+
* eslint . --fix ([e05070c](https://github.com/DarkSheepSoftware/eslint/commit/e05070c8d3414fd9dd1001bb2081abedc02ad96c))
|
|
35
|
+
|
|
3
36
|
## [6.8.1](https://github.com/DarkSheepSoftware/eslint/compare/v6.8.0...v6.8.1) (2025-02-20)
|
|
4
37
|
|
|
5
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darksheep/eslint",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.9.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/DarkSheepSoftware/eslint"
|
|
@@ -24,32 +24,34 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@darksheep/environment": "3.1.0",
|
|
26
26
|
"@eslint-community/eslint-plugin-eslint-comments": "4.4.1",
|
|
27
|
-
"@eslint/
|
|
28
|
-
"@
|
|
29
|
-
"@
|
|
30
|
-
"@typescript-eslint/
|
|
27
|
+
"@eslint/compat": "1.2.7",
|
|
28
|
+
"@eslint/js": "9.22.0",
|
|
29
|
+
"@stylistic/eslint-plugin": "4.2.0",
|
|
30
|
+
"@typescript-eslint/eslint-plugin": "8.26.1",
|
|
31
|
+
"@typescript-eslint/parser": "8.26.1",
|
|
31
32
|
"editorconfig": "2.0.1",
|
|
32
|
-
"eslint-plugin-jsdoc": "50.6.
|
|
33
|
+
"eslint-plugin-jsdoc": "50.6.6",
|
|
33
34
|
"eslint-plugin-jsonc": "2.19.1",
|
|
34
|
-
"eslint-plugin-n": "17.
|
|
35
|
-
"eslint-plugin-package-json": "0.26.
|
|
36
|
-
"eslint-plugin-perfectionist": "4.
|
|
35
|
+
"eslint-plugin-n": "17.16.2",
|
|
36
|
+
"eslint-plugin-package-json": "0.26.3",
|
|
37
|
+
"eslint-plugin-perfectionist": "4.10.1",
|
|
37
38
|
"eslint-plugin-promise": "7.2.1",
|
|
38
39
|
"eslint-plugin-react": "7.37.4",
|
|
40
|
+
"eslint-plugin-react-native": "5.0.0",
|
|
39
41
|
"eslint-plugin-regexp": "2.7.0",
|
|
40
42
|
"eslint-plugin-security": "3.0.1",
|
|
41
43
|
"eslint-plugin-unicorn": "56.0.1",
|
|
42
44
|
"eslint-plugin-unused-imports": "4.1.4",
|
|
43
45
|
"eslint-plugin-yml": "1.17.0",
|
|
44
46
|
"jsonc-eslint-parser": "2.4.0",
|
|
45
|
-
"yaml-eslint-parser": "1.
|
|
47
|
+
"yaml-eslint-parser": "1.3.0"
|
|
46
48
|
},
|
|
47
49
|
"devDependencies": {
|
|
48
50
|
"@darksheep/eslint-formatter-github": "2.1.0",
|
|
49
51
|
"@types/node": "~22.13.0",
|
|
50
|
-
"eslint": "~9.
|
|
51
|
-
"type-fest": "~4.
|
|
52
|
-
"typescript": "~5.
|
|
52
|
+
"eslint": "~9.22.0",
|
|
53
|
+
"type-fest": "~4.37.0",
|
|
54
|
+
"typescript": "~5.8.0"
|
|
53
55
|
},
|
|
54
56
|
"peerDependenciesMeta": {
|
|
55
57
|
"eslint": {
|
|
@@ -59,12 +61,12 @@
|
|
|
59
61
|
"optional": true
|
|
60
62
|
}
|
|
61
63
|
},
|
|
62
|
-
"packageManager": "yarn@4.
|
|
64
|
+
"packageManager": "yarn@4.7.0",
|
|
63
65
|
"engines": {
|
|
64
66
|
"node": "^20 || ^22"
|
|
65
67
|
},
|
|
66
68
|
"volta": {
|
|
67
69
|
"node": "22.14.0",
|
|
68
|
-
"yarn": "4.
|
|
70
|
+
"yarn": "4.7.0"
|
|
69
71
|
}
|
|
70
72
|
}
|
package/src/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { createEslintNodeConfig } from './plugins/node.js';
|
|
|
13
13
|
import { createEslintPackageJsonConfig } from './plugins/package-json.js';
|
|
14
14
|
import { createEslintPerfectionistConfig } from './plugins/perfectionist.js';
|
|
15
15
|
import { createEslintPromiseConfig } from './plugins/promise.js';
|
|
16
|
+
import { createEslintReactNativeConfig } from './plugins/react-native.js';
|
|
16
17
|
import { createEslintReactConfig } from './plugins/react.js';
|
|
17
18
|
import { createEslintRegexpConfig } from './plugins/regexp.js';
|
|
18
19
|
import { createEslintSCAConfig } from './plugins/sca.js';
|
|
@@ -38,6 +39,7 @@ const configBuilders = [
|
|
|
38
39
|
createEslintPromiseConfig,
|
|
39
40
|
createEslintTypescriptConfig,
|
|
40
41
|
createEslintReactConfig,
|
|
42
|
+
createEslintReactNativeConfig,
|
|
41
43
|
createReactConfig,
|
|
42
44
|
createEslintSecurityConfig,
|
|
43
45
|
createEslintUnicornConfig,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { fixupPluginRules } from '@eslint/compat';
|
|
2
|
+
import reactnative from 'eslint-plugin-react-native';
|
|
3
|
+
|
|
4
|
+
import { getPackageJson } from '../utilities/package.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Get ESLint config for imports check.
|
|
8
|
+
* @param {URL} root - The root of the package being linted.
|
|
9
|
+
* @returns {Promise<import('eslint').Linter.Config[]>}
|
|
10
|
+
*/
|
|
11
|
+
export async function createEslintReactNativeConfig(root) {
|
|
12
|
+
const packageJson = await getPackageJson(root, 'react-native');
|
|
13
|
+
if (packageJson == null) {
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
name: 'react-native',
|
|
20
|
+
files: [ '**/*.jsx', '**/*.tsx' ],
|
|
21
|
+
languageOptions: {
|
|
22
|
+
parserOptions: {
|
|
23
|
+
ecmaFeatures: { jsx: true },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
plugins: { 'react-native': fixupPluginRules(reactnative) },
|
|
27
|
+
rules: {
|
|
28
|
+
// Trialing
|
|
29
|
+
'react-native/no-unused-styles': [ 'warn' ],
|
|
30
|
+
'react-native/no-inline-styles': [ 'warn' ],
|
|
31
|
+
'react-native/no-color-literals': [ 'warn' ],
|
|
32
|
+
|
|
33
|
+
// Stable
|
|
34
|
+
'react-native/no-raw-text': [ 'error', { skip: [ 'ThemedText' ] } ],
|
|
35
|
+
'react-native/no-single-element-style-arrays': [ 'error' ],
|
|
36
|
+
'react-native/split-platform-components': [ 'error' ],
|
|
37
|
+
|
|
38
|
+
// Perfectionist sorts these
|
|
39
|
+
'react-native/sort-styles': [ 'off' ],
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
}
|
|
@@ -91,12 +91,15 @@ export async function createEslintTypescriptConfig(root) {
|
|
|
91
91
|
'@typescript-eslint/class-literal-property-style': 'off',
|
|
92
92
|
'@typescript-eslint/class-methods-use-this': 'off',
|
|
93
93
|
'@typescript-eslint/consistent-generic-constructors': 'off',
|
|
94
|
-
'@typescript-eslint/consistent-indexed-object-style': [ 'error'
|
|
94
|
+
'@typescript-eslint/consistent-indexed-object-style': [ 'error' ],
|
|
95
95
|
'@typescript-eslint/consistent-return': 'off',
|
|
96
96
|
'@typescript-eslint/consistent-type-assertions': 'off',
|
|
97
97
|
'@typescript-eslint/consistent-type-definitions': [ 'error', 'type' ],
|
|
98
98
|
'@typescript-eslint/consistent-type-exports': [ 'error', { fixMixedExportsWithInlineTypeSpecifier: true } ],
|
|
99
|
-
'@typescript-eslint/consistent-type-imports': [ 'error', {
|
|
99
|
+
'@typescript-eslint/consistent-type-imports': [ 'error', {
|
|
100
|
+
fixStyle: 'inline-type-imports',
|
|
101
|
+
prefer: 'type-imports',
|
|
102
|
+
} ],
|
|
100
103
|
'@typescript-eslint/default-param-last': 'off',
|
|
101
104
|
'@typescript-eslint/dot-notation': 'error',
|
|
102
105
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
package/src/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
declare module '@eslint/js' {
|
|
7
|
-
import { ESLint } from 'eslint';
|
|
7
|
+
import { type ESLint } from 'eslint';
|
|
8
8
|
export default {
|
|
9
9
|
configs: {
|
|
10
10
|
all: WithRequired<ESLint.ConfigData, 'rules'>,
|
|
@@ -16,22 +16,22 @@ declare module '@eslint/js' {
|
|
|
16
16
|
type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
|
|
17
17
|
|
|
18
18
|
declare module '@eslint-community/eslint-plugin-eslint-comments' {
|
|
19
|
-
import { ESLint } from 'eslint';
|
|
19
|
+
import { type ESLint } from 'eslint';
|
|
20
20
|
export default {} as ESLint.Plugin;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
declare module 'eslint-plugin-perfectionist' {
|
|
24
|
-
import { ESLint } from 'eslint';
|
|
24
|
+
import { type ESLint } from 'eslint';
|
|
25
25
|
export default {} as ESLint.Plugin;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
declare module '@stylistic/eslint-plugin' {
|
|
29
|
-
import { ESLint } from 'eslint';
|
|
29
|
+
import { type ESLint } from 'eslint';
|
|
30
30
|
export default {} as WithRequired<ESLint.Plugin, 'environments'>;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
declare module 'eslint-plugin-promise' {
|
|
34
|
-
import { ESLint } from 'eslint';
|
|
34
|
+
import { type ESLint } from 'eslint';
|
|
35
35
|
export default {} as {
|
|
36
36
|
configs: {
|
|
37
37
|
recommended: WithRequired<ESLint.ConfigData, 'plugins' | 'rules'>;
|
|
@@ -41,12 +41,17 @@ declare module 'eslint-plugin-promise' {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
declare module 'eslint-plugin-react' {
|
|
44
|
-
import { ESLint } from 'eslint';
|
|
44
|
+
import { type ESLint } from 'eslint';
|
|
45
|
+
export default {} as ESLint.Plugin;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare module 'eslint-plugin-react-native' {
|
|
49
|
+
import { type ESLint } from 'eslint';
|
|
45
50
|
export default {} as ESLint.Plugin;
|
|
46
51
|
}
|
|
47
52
|
|
|
48
53
|
declare module 'eslint-plugin-security' {
|
|
49
|
-
import { ESLint } from 'eslint';
|
|
54
|
+
import { type ESLint } from 'eslint';
|
|
50
55
|
export default {} as {
|
|
51
56
|
configs: {
|
|
52
57
|
recommended: WithRequired<ESLint.ConfigData, 'plugins' | 'rules'>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get ESLint config for imports check.
|
|
3
|
+
* @param {URL} root - The root of the package being linted.
|
|
4
|
+
* @returns {Promise<import('eslint').Linter.Config[]>}
|
|
5
|
+
*/
|
|
6
|
+
export function createEslintReactNativeConfig(root: URL): Promise<import("eslint").Linter.Config[]>;
|