@darksheep/eslint 6.8.2 → 7.0.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 CHANGED
@@ -1,5 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## [7.0.0](https://github.com/DarkSheepSoftware/eslint/compare/v6.9.0...v7.0.0) (2025-03-21)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **pkg:** update dependency eslint-plugin-unicorn to v57 ([#832](https://github.com/DarkSheepSoftware/eslint/issues/832))
9
+
10
+ ### 📦 Dependencies
11
+
12
+ * **pkg:** update dependency eslint-plugin-jsdoc to v50.6.7 ([#858](https://github.com/DarkSheepSoftware/eslint/issues/858)) ([19dc646](https://github.com/DarkSheepSoftware/eslint/commit/19dc64675488211a0a37d2d0875a8f14514fceaf))
13
+ * **pkg:** update dependency eslint-plugin-jsdoc to v50.6.8 ([#861](https://github.com/DarkSheepSoftware/eslint/issues/861)) ([7204780](https://github.com/DarkSheepSoftware/eslint/commit/720478072dee60856cb41de145f32c5709966a9f))
14
+ * **pkg:** update dependency eslint-plugin-package-json to v0.29.0 ([#859](https://github.com/DarkSheepSoftware/eslint/issues/859)) ([4db9007](https://github.com/DarkSheepSoftware/eslint/commit/4db9007b45c772c8debc89b2cf3da911d74a5a52))
15
+ * **pkg:** update dependency eslint-plugin-unicorn to v57 ([c015ff7](https://github.com/DarkSheepSoftware/eslint/commit/c015ff720e9753189f135d548220cb3c9ee85aff))
16
+ * **pkg:** update dependency eslint-plugin-unicorn to v57 ([#832](https://github.com/DarkSheepSoftware/eslint/issues/832)) ([c015ff7](https://github.com/DarkSheepSoftware/eslint/commit/c015ff720e9753189f135d548220cb3c9ee85aff))
17
+ * **pkg:** update typescript-eslint monorepo to v8.27.0 ([#862](https://github.com/DarkSheepSoftware/eslint/issues/862)) ([c3d80e8](https://github.com/DarkSheepSoftware/eslint/commit/c3d80e88f54bbff7011b39369e749f8721ae4f30))
18
+
19
+ ## [6.9.0](https://github.com/DarkSheepSoftware/eslint/compare/v6.8.2...v6.9.0) (2025-03-11)
20
+
21
+
22
+ ### 🌟 Features
23
+
24
+ * Add react native plugin ([#855](https://github.com/DarkSheepSoftware/eslint/issues/855)) ([d2c88ca](https://github.com/DarkSheepSoftware/eslint/commit/d2c88ca8de54aa233b93524dcc4409f414d21d3a))
25
+
26
+
27
+ ### 📦 Dependencies
28
+
29
+ * **pkg:** pin dependencies ([#856](https://github.com/DarkSheepSoftware/eslint/issues/856)) ([b7b2be4](https://github.com/DarkSheepSoftware/eslint/commit/b7b2be4f3921654b2df75b0e6329708fdbdd903f))
30
+ * **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))
31
+ * **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))
32
+ * **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))
33
+ * **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))
34
+ * **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))
35
+ * **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))
36
+ * **pkg:** update eslint monorepo to v9.22.0 ([#842](https://github.com/DarkSheepSoftware/eslint/issues/842)) ([8fbee60](https://github.com/DarkSheepSoftware/eslint/commit/8fbee60582d6b54b9ebda4c44a678f9d35ee8d2f))
37
+ * **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))
38
+
3
39
  ## [6.8.2](https://github.com/DarkSheepSoftware/eslint/compare/v6.8.1...v6.8.2) (2025-02-20)
4
40
 
5
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darksheep/eslint",
3
- "version": "6.8.2",
3
+ "version": "7.0.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/js": "9.20.0",
28
- "@stylistic/eslint-plugin": "4.0.1",
29
- "@typescript-eslint/eslint-plugin": "8.24.1",
30
- "@typescript-eslint/parser": "8.24.1",
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.27.0",
31
+ "@typescript-eslint/parser": "8.27.0",
31
32
  "editorconfig": "2.0.1",
32
- "eslint-plugin-jsdoc": "50.6.3",
33
+ "eslint-plugin-jsdoc": "50.6.8",
33
34
  "eslint-plugin-jsonc": "2.19.1",
34
- "eslint-plugin-n": "17.15.1",
35
- "eslint-plugin-package-json": "0.26.0",
36
- "eslint-plugin-perfectionist": "4.9.0",
35
+ "eslint-plugin-n": "17.16.2",
36
+ "eslint-plugin-package-json": "0.29.0",
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
- "eslint-plugin-unicorn": "56.0.1",
43
+ "eslint-plugin-unicorn": "57.0.0",
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.2.3"
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.20.0",
51
- "type-fest": "~4.35.0",
52
- "typescript": "~5.7.0"
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.6.0",
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.6.0"
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
+ }
package/src/types.d.ts CHANGED
@@ -45,6 +45,11 @@ declare module 'eslint-plugin-react' {
45
45
  export default {} as ESLint.Plugin;
46
46
  }
47
47
 
48
+ declare module 'eslint-plugin-react-native' {
49
+ import { type ESLint } from 'eslint';
50
+ export default {} as ESLint.Plugin;
51
+ }
52
+
48
53
  declare module 'eslint-plugin-security' {
49
54
  import { type ESLint } from 'eslint';
50
55
  export default {} as {
@@ -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[]>;