@hs-web-team/eslint-config-node 3.3.2 → 4.0.2

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/.prettierrc.json CHANGED
@@ -1,4 +1,5 @@
1
1
  {
2
+ "plugins": ["prettier-plugin-gherkin"],
2
3
  "semi": true,
3
4
  "singleQuote": true,
4
5
  "tabWidth": 2,
package/.stylelintrc.json CHANGED
@@ -11,10 +11,8 @@
11
11
  }
12
12
  ],
13
13
  "scss/dollar-variable-pattern": null,
14
- "scss/at-import-no-partial-leading-underscore": null,
15
14
  "selector-class-pattern": null,
16
15
  "declaration-block-no-redundant-longhand-properties": null,
17
- "scss/at-import-partial-extension": null,
18
16
  "alpha-value-notation": null,
19
17
  "scss/percent-placeholder-pattern": null,
20
18
  "scss/at-mixin-argumentless-call-parentheses": null,
package/browser.js CHANGED
@@ -7,7 +7,7 @@ import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
7
7
 
8
8
  // Base rules adapted from the browser config
9
9
  const baseRules = {
10
- 'comma-dangle': 'warn',
10
+ 'comma-dangle': ['warn', 'always-multiline'],
11
11
  'no-param-reassign': ['warn', { props: false }],
12
12
  'arrow-parens': 0,
13
13
  'no-plusplus': 0,
@@ -19,8 +19,8 @@ const baseRules = {
19
19
  allow: [
20
20
  '_hsg',
21
21
  '_hsq',
22
- ]
23
- }
22
+ ],
23
+ },
24
24
  ],
25
25
  'no-trailing-spaces': ['error', { skipBlankLines: true }],
26
26
  'no-unused-expressions': ['warn', { allowTernary: true }],
@@ -29,15 +29,15 @@ const baseRules = {
29
29
  {
30
30
  code: 120,
31
31
  ignoreStrings: true,
32
- ignoreTemplateLiterals: true
33
- }
32
+ ignoreTemplateLiterals: true,
33
+ },
34
34
  ],
35
35
  'operator-linebreak': 0,
36
36
  'implicit-arrow-linebreak': 0,
37
37
  indent: 0,
38
38
  'object-curly-newline': 0,
39
39
  'function-paren-newline': 0,
40
- 'nonblock-statement-body-position': 0
40
+ 'nonblock-statement-body-position': 0,
41
41
  };
42
42
 
43
43
  // React-specific rules
@@ -50,10 +50,10 @@ const reactRules = {
50
50
  2,
51
51
  {
52
52
  component: true,
53
- html: false
54
- }
53
+ html: false,
54
+ },
55
55
  ],
56
- 'react/forbid-prop-types': 0
56
+ 'react/forbid-prop-types': 0,
57
57
  };
58
58
 
59
59
  // Common ignore patterns
@@ -63,13 +63,13 @@ const commonIgnores = [
63
63
  '**/build/**',
64
64
  '**/.next/**',
65
65
  '**/coverage/**',
66
- 'eslint.config.js'
66
+ 'eslint.config.js',
67
67
  ];
68
68
 
69
69
  export default [
70
70
  // Global ignores
71
71
  {
72
- ignores: commonIgnores
72
+ ignores: commonIgnores,
73
73
  },
74
74
  // Base config for all JavaScript files
75
75
  js.configs.recommended,
@@ -85,17 +85,17 @@ export default [
85
85
  // Custom browser globals from original config
86
86
  $: true,
87
87
  jQuery: true,
88
- Invoca: true
88
+ Invoca: true,
89
89
  },
90
90
  parserOptions: {
91
91
  ecmaFeatures: {
92
- jsx: true
93
- }
94
- }
92
+ jsx: true,
93
+ },
94
+ },
95
95
  },
96
96
  rules: {
97
- ...baseRules
98
- }
97
+ ...baseRules,
98
+ },
99
99
  },
100
100
  // React configuration
101
101
  {
@@ -103,24 +103,24 @@ export default [
103
103
  plugins: {
104
104
  react: reactPlugin,
105
105
  'react-hooks': reactHooksPlugin,
106
- 'jsx-a11y': jsxA11yPlugin
106
+ 'jsx-a11y': jsxA11yPlugin,
107
107
  },
108
108
  settings: {
109
109
  react: {
110
- version: 'detect'
111
- }
110
+ version: 'detect',
111
+ },
112
112
  },
113
113
  rules: {
114
114
  ...reactPlugin.configs.recommended.rules,
115
115
  ...reactHooksPlugin.configs.recommended.rules,
116
116
  ...jsxA11yPlugin.configs.recommended.rules,
117
- ...reactRules
118
- }
117
+ ...reactRules,
118
+ },
119
119
  },
120
120
  // TypeScript config
121
121
  ...tseslint.configs.recommended.map(config => ({
122
122
  ...config,
123
- files: ['**/*.{ts,mts,cts,tsx}']
123
+ files: ['**/*.{ts,mts,cts,tsx}'],
124
124
  })),
125
125
  {
126
126
  files: ['**/*.{ts,mts,cts,tsx}'],
@@ -133,17 +133,17 @@ export default [
133
133
  ...globals.jest,
134
134
  $: true,
135
135
  jQuery: true,
136
- Invoca: true
136
+ Invoca: true,
137
137
  },
138
138
  parserOptions: {
139
139
  ecmaFeatures: {
140
- jsx: true
141
- }
142
- }
140
+ jsx: true,
141
+ },
142
+ },
143
143
  },
144
144
  rules: {
145
- ...baseRules
146
- }
145
+ ...baseRules,
146
+ },
147
147
  },
148
148
  // React configuration for TypeScript files
149
149
  {
@@ -151,18 +151,18 @@ export default [
151
151
  plugins: {
152
152
  react: reactPlugin,
153
153
  'react-hooks': reactHooksPlugin,
154
- 'jsx-a11y': jsxA11yPlugin
154
+ 'jsx-a11y': jsxA11yPlugin,
155
155
  },
156
156
  settings: {
157
157
  react: {
158
- version: 'detect'
159
- }
158
+ version: 'detect',
159
+ },
160
160
  },
161
161
  rules: {
162
162
  ...reactPlugin.configs.recommended.rules,
163
163
  ...reactHooksPlugin.configs.recommended.rules,
164
164
  ...jsxA11yPlugin.configs.recommended.rules,
165
- ...reactRules
166
- }
167
- }
165
+ ...reactRules,
166
+ },
167
+ },
168
168
  ];
package/index.js CHANGED
@@ -20,8 +20,8 @@ const baseRules = {
20
20
  allow: [
21
21
  '__dirname',
22
22
  '__filename',
23
- ]
24
- }
23
+ ],
24
+ },
25
25
  ],
26
26
  'no-confusing-arrow': 0,
27
27
  'import/no-unresolved': 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hs-web-team/eslint-config-node",
3
- "version": "3.3.2",
3
+ "version": "4.0.2",
4
4
  "description": "HubSpot Marketing WebTeam shared configurations for ESLint, Prettier, Stylelint, and Cypress",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -74,6 +74,7 @@
74
74
  "jiti": "^2.7.0",
75
75
  "js-yaml": "^4.1.1",
76
76
  "prettier": "^3.8.3",
77
+ "prettier-plugin-gherkin": "4.0.0",
77
78
  "typescript-eslint": "^8.60.0"
78
79
  },
79
80
  "peerDependencies": {