@newhighsco/eslint-config 5.1.6 → 5.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.
Files changed (2) hide show
  1. package/eslint.config.js +5 -5
  2. package/package.json +9 -5
package/eslint.config.js CHANGED
@@ -10,9 +10,9 @@ import prettierRecommended from 'eslint-plugin-prettier/recommended'
10
10
  const gitignore = join(process.cwd(), '.gitignore')
11
11
  const compat = new FlatCompat()
12
12
  const ignore = existsSync(gitignore)
13
- const typescript = await import('typescript')
14
- .then(() => true)
15
- .catch(() => false)
13
+
14
+ const hasDependency = async dependency =>
15
+ await import(dependency).then(() => true).catch(() => false)
16
16
 
17
17
  export default defineConfig(
18
18
  [
@@ -32,7 +32,7 @@ export default defineConfig(
32
32
  extends: ['standard', 'plugin:prettier/recommended']
33
33
  },
34
34
  // Typescript
35
- typescript && {
35
+ (await hasDependency('typescript')) && {
36
36
  files: ['*.ts?(x)'],
37
37
  extends: ['love', 'plugin:prettier/recommended'],
38
38
  parserOptions: {
@@ -68,7 +68,7 @@ export default defineConfig(
68
68
  }
69
69
  },
70
70
  // Storybook
71
- {
71
+ (await hasDependency('storybook')) && {
72
72
  files: ['*.stories.*'],
73
73
  extends: [
74
74
  'plugin:storybook/recommended',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@newhighsco/eslint-config",
3
3
  "description": "New High Score shareable config for ESLint",
4
- "version": "5.1.6",
4
+ "version": "5.1.8",
5
5
  "author": "New High Score",
6
6
  "license": "ISC",
7
7
  "private": false,
@@ -22,7 +22,7 @@
22
22
  "files": [],
23
23
  "dependencies": {
24
24
  "@eslint/compat": "1.4.1",
25
- "@eslint/json": "0.13.2",
25
+ "@eslint/json": "0.14.0",
26
26
  "@eslint/eslintrc": "3.3.1",
27
27
  "@typescript-eslint/eslint-plugin": "7.18.0",
28
28
  "@typescript-eslint/parser": "7.18.0",
@@ -42,20 +42,24 @@
42
42
  "eslint-plugin-react": "7.37.5",
43
43
  "eslint-plugin-react-hooks": "7.0.1",
44
44
  "eslint-plugin-simple-import-sort": "12.1.1",
45
- "eslint-plugin-storybook": "0.12.0",
45
+ "eslint-plugin-storybook": "9.1.16",
46
46
  "eslint-plugin-testing-library": "7.13.3",
47
47
  "eslint-plugin-tsc": "2.0.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/react": "19.2.2",
51
- "eslint": "9.38.0"
51
+ "eslint": "9.39.1"
52
52
  },
53
53
  "peerDependencies": {
54
- "eslint": "9.38.0",
54
+ "eslint": "9.39.1",
55
55
  "prettier": "3.6.2",
56
+ "storybook": "9.1.16",
56
57
  "typescript": "5.9.3"
57
58
  },
58
59
  "peerDependenciesMeta": {
60
+ "storybook": {
61
+ "optional": true
62
+ },
59
63
  "typescript": {
60
64
  "optional": true
61
65
  }