@will-stone/eslint-config 0.0.4 → 0.0.6

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,17 @@
1
1
  # @will-stone/eslint-config
2
2
 
3
+ ## 0.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 1ab951c: Fixed `jest` global not available in mocks.
8
+
9
+ ## 0.0.5
10
+
11
+ ### Patch Changes
12
+
13
+ - 4f97233: Fixed requiring use-strict in files that don't need it.
14
+
3
15
  ## 0.0.4
4
16
 
5
17
  ### Patch Changes
package/eslint-config.js CHANGED
@@ -142,18 +142,25 @@ export default [
142
142
  },
143
143
 
144
144
  // Jest
145
- {
146
- files: ['**/*.{spec,test}.{js,cjs,mjs,jsx,ts,tsx}'],
147
- languageOptions: {
148
- globals: testingFramework === 'jest' && globals.jest,
149
- },
150
- plugins: testingFramework === 'jest' && {
151
- jest: jestPlugin,
152
- },
153
- rules: testingFramework === 'jest' && jestRules,
154
- },
155
- {
156
- files: ['**/*.{spec,test}.{ts,tsx}'],
157
- rules: testingFramework === 'jest' && jestTsRules,
158
- },
145
+ ...(testingFramework === 'jest'
146
+ ? [
147
+ {
148
+ files: ['**/__mocks__/', '**/*.{spec,test}.{js,cjs,mjs,jsx,ts,tsx}'],
149
+ languageOptions: {
150
+ globals: globals.jest,
151
+ },
152
+ },
153
+ {
154
+ files: ['**/*.{spec,test}.{js,cjs,mjs,jsx,ts,tsx}'],
155
+ plugins: {
156
+ jest: jestPlugin,
157
+ },
158
+ rules: jestRules,
159
+ },
160
+ {
161
+ files: ['**/*.{spec,test}.{ts,tsx}'],
162
+ rules: jestTsRules,
163
+ },
164
+ ]
165
+ : []),
159
166
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@will-stone/eslint-config",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Will Stone's ESLint config, using the Flat Config style.",
5
5
  "keywords": [
6
6
  "ESLint"
package/rules/built-in.js CHANGED
@@ -642,9 +642,8 @@ export default {
642
642
  // All comments must have a space after the //
643
643
  // This also allows /// reference comments
644
644
  'spaced-comment': ['warn', 'always', { markers: ['/'] }],
645
- // As modules are used nearly all of the time, this probably isn't required,
646
- // but leaving it on just in case.
647
- 'strict': 'warn',
645
+ // Generally gets in the way as it's difficult to know when this may be required.
646
+ 'strict': 'off',
648
647
  // Using description promotes easier debugging.
649
648
  // ✅ var foo = Symbol("some description")
650
649
  'symbol-description': 'error',