@modernpoacher/gremlins 0.0.250 → 0.0.252

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.
@@ -0,0 +1,184 @@
1
+ import globals from 'globals'
2
+ import standard from '@sequencemedia/eslint-config-standard/configs/recommended/merge'
3
+ import typescript from '@sequencemedia/eslint-config-typescript/configs/recommended/merge'
4
+ import babelParser from '@babel/eslint-parser'
5
+ import typescriptParser from '@typescript-eslint/parser'
6
+ import reactPlugin from 'eslint-plugin-react'
7
+ import storybookPlugin from 'eslint-plugin-storybook'
8
+
9
+ const reactParserOptions = {
10
+ ecmaFeatures: {
11
+ jsx: true
12
+ }
13
+ }
14
+
15
+ const reactPlugins = {
16
+ react: reactPlugin
17
+ }
18
+
19
+ const storybookPlugins = {
20
+ storybook: storybookPlugin
21
+ }
22
+
23
+ const reactRules = {
24
+ 'no-unused-vars': [
25
+ 'error',
26
+ {
27
+ varsIgnorePattern: 'React'
28
+ }
29
+ ],
30
+ quotes: [
31
+ 'error',
32
+ 'single'
33
+ ],
34
+ 'jsx-quotes': [
35
+ 'error',
36
+ 'prefer-single'
37
+ ],
38
+ 'react/jsx-indent': [
39
+ 'error',
40
+ 2,
41
+ {
42
+ checkAttributes: true,
43
+ indentLogicalExpressions: true
44
+ }
45
+ ]
46
+ }
47
+
48
+ const reactSettings = {
49
+ react: {
50
+ version: 'detect'
51
+ }
52
+ }
53
+
54
+ export default [
55
+ /**
56
+ * React config for all `jsx` and `tsx` files
57
+ */
58
+ {
59
+ ...reactPlugin.configs.flat.recommended,
60
+ settings: {
61
+ ...reactPlugin.configs.flat.recommended.settings,
62
+ ...reactSettings
63
+ }
64
+ },
65
+ /**
66
+ * Storybook config
67
+ */
68
+ ...storybookPlugin.configs['flat/recommended'],
69
+ /**
70
+ * Standard config
71
+ */
72
+ standard({
73
+ files: [
74
+ '**/*.{mjs,cjs,mts,cts}'
75
+ ],
76
+ ignores: [
77
+ 'src',
78
+ 'stories'
79
+ ],
80
+ languageOptions: {
81
+ globals: {
82
+ ...globals.node
83
+ }
84
+ }
85
+ }),
86
+ standard({
87
+ files: [
88
+ 'src/**/*.{mjs,cjs,mts,cts}',
89
+ 'stories/**/*.{mjs,cjs,mts,cts}'
90
+ ],
91
+ languageOptions: {
92
+ globals: {
93
+ ...globals.browser
94
+ }
95
+ }
96
+ }),
97
+ /**
98
+ * Standard config for all `jsx` and `tsx` files
99
+ */
100
+ standard({
101
+ files: [
102
+ 'src/**/*.tsx',
103
+ 'stories/**/*.jsx'
104
+ ],
105
+ languageOptions: {
106
+ parser: babelParser,
107
+ parserOptions: {
108
+ ...reactParserOptions,
109
+ project: null
110
+ },
111
+ globals: {
112
+ ...globals.browser
113
+ }
114
+ },
115
+ plugins: {
116
+ ...reactPlugins,
117
+ ...storybookPlugins
118
+ },
119
+ rules: {
120
+ ...reactRules
121
+ },
122
+ settings: {
123
+ ...reactSettings,
124
+ 'import/resolver': {
125
+ 'babel-module': {}
126
+ }
127
+ }
128
+ }),
129
+ /**
130
+ * TypeScript config
131
+ */
132
+ typescript({
133
+ files: [
134
+ '**/*.{mts,cts}'
135
+ ],
136
+ ignores: [
137
+ 'src'
138
+ ],
139
+ languageOptions: {
140
+ globals: {
141
+ ...globals.node,
142
+ GremlinsTypes: 'readonly'
143
+ }
144
+ }
145
+ }),
146
+ typescript({
147
+ files: [
148
+ 'src/**/*.{mts,cts}'
149
+ ],
150
+ languageOptions: {
151
+ globals: {
152
+ ...globals.browser
153
+ }
154
+ }
155
+ }),
156
+ /**
157
+ * TypeScript config for only `tsx` files
158
+ */
159
+ typescript({
160
+ files: [
161
+ 'src/**/*.tsx'
162
+ ],
163
+ languageOptions: {
164
+ parser: typescriptParser,
165
+ parserOptions: {
166
+ ...reactParserOptions,
167
+ projectService: true,
168
+ project: 'tsconfig.json'
169
+ },
170
+ globals: {
171
+ ...globals.browser
172
+ }
173
+ },
174
+ plugins: {
175
+ ...reactPlugins
176
+ },
177
+ rules: {
178
+ ...reactRules
179
+ },
180
+ settings: {
181
+ ...reactSettings
182
+ }
183
+ })
184
+ ]
package/index.d.mts ADDED
@@ -0,0 +1,9 @@
1
+ declare global {
2
+ namespace GremlinsTypes {
3
+ export type OnChangeType = () => void
4
+
5
+ export type OnClickType = () => void
6
+ }
7
+ }
8
+
9
+ export {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/gremlins",
3
- "version": "0.0.250",
3
+ "version": "0.0.252",
4
4
  "description": "Gremlins",
5
5
  "keywords": [
6
6
  "Gremlins",
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "main": "./src/index.cjs",
10
10
  "type": "module",
11
- "types": "./src/index.d.mts",
11
+ "types": "./index.d.mts",
12
12
  "author": {
13
13
  "name": "Jonathan Perry for Modern Poacher Limited",
14
14
  "email": "modernpoacher@modernpoacher.com",
@@ -26,7 +26,7 @@
26
26
  "build": "cross-env DEBUG=@modernpoacher/gremlins* webpack",
27
27
  "build-storybook": "storybook build",
28
28
  "build:watch": "cross-env DEBUG=@modernpoacher/gremlins* webpack --watch",
29
- "lint": "eslint . .storybook --ext .mjs,.cjs,.jsx,.mts,.cts",
29
+ "lint": "eslint",
30
30
  "lint:fix": "npm run lint -- --fix",
31
31
  "nvm": "bash nvm.sh",
32
32
  "prelint": "npm run nvm",
@@ -48,23 +48,26 @@
48
48
  "@babel/preset-env": "^7.26.0",
49
49
  "@babel/preset-react": "^7.26.3",
50
50
  "@babel/register": "^7.25.9",
51
- "@modernpoacher/design-system": "1.1.19",
51
+ "@modernpoacher/design-system": "1.1.21",
52
+ "@sequencemedia/eslint-config-standard": "^0.2.10",
53
+ "@sequencemedia/eslint-config-typescript": "^0.1.15",
52
54
  "@storybook/addon-actions": "7.6.20",
53
55
  "@storybook/addon-essentials": "7.6.20",
54
56
  "@storybook/addon-links": "7.6.20",
55
57
  "@storybook/react": "7.6.20",
56
58
  "@storybook/react-webpack5": "7.6.20",
57
59
  "@types/react": "^18.3.13",
58
- "@typescript-eslint/eslint-plugin": "7.18.0",
59
- "@typescript-eslint/parser": "7.18.0",
60
+ "@typescript-eslint/eslint-plugin": "^8.19.1",
61
+ "@typescript-eslint/parser": "^8.19.1",
60
62
  "autoprefixer": "^10.4.20",
61
63
  "clean-webpack-plugin": "^4.0.0",
62
64
  "core-js": "^3.39.0",
63
65
  "cross-env": "^7.0.3",
64
- "eslint": "8.57.1",
65
- "eslint-config-love": "47.0.0",
66
- "eslint-config-standard": "^17.1.0",
67
- "eslint-plugin-react": "^7.37.2",
66
+ "eslint": "^9.17.0",
67
+ "eslint-import-resolver-babel-module": "^5.3.2",
68
+ "eslint-plugin-react": "^7.37.3",
69
+ "eslint-plugin-storybook": "^0.11.2",
70
+ "globals": "^15.14.0",
68
71
  "husky": "^9.1.7",
69
72
  "jest": "^29.7.0",
70
73
  "mini-css-extract-plugin": "^2.9.2",
package/src/index.d.mts CHANGED
@@ -1,9 +1,3 @@
1
- declare namespace GremlinsTypes {
2
- export type OnChangeType = () => void
3
-
4
- export type OnClickType = () => void
5
- }
6
-
7
1
  declare module '#gremlins' {
8
2
  export { default as CheckboxGremlin } from '#gremlins/gremlins/checkbox'
9
3
  export { default as EmailGremlin } from '#gremlins/gremlins/email'