@mscharley/eslint-config 4.0.1 → 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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Change Log - @mscharley/eslint-config
2
2
 
3
+ ## 4.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - ab92718: Cleanup some of the testing rules
8
+ - 7d6a205: Fix readme for flat configurations
9
+
3
10
  ## 4.0.1
4
11
 
5
12
  ### Patch Changes
package/README.md CHANGED
@@ -20,15 +20,15 @@ $ npm install --save-dev @mscharley/eslint-config
20
20
  ## Usage
21
21
 
22
22
  ```js
23
- // .eslintrc.js
24
- module.exports = {
25
- root: true,
26
- extends: [
27
- '@mscharley', // Baseline rules for any TS or JS project.
28
- '@mscharley/eslint-config/node', // For projects running on NodeJS.
29
- // '@mscharley/eslint-config/react', // For projects running React.
30
- ],
31
- };
23
+ // eslint.config.js
24
+ import { configs, withStyles } from "@mscharley/eslint-config";
25
+
26
+ export const [
27
+ ...configs.recommended,
28
+ ...configs.node, // For projects running on NodeJS
29
+ // ...configs.react, // For projects running React
30
+ ...withStyles(), // Include formatting rules
31
+ ];
32
32
  ```
33
33
 
34
34
  ### Notes on Prettier
@@ -45,25 +45,6 @@ If using Prettier to format files other than TypeScript and JavaScript files the
45
45
  **/*.js
46
46
  ```
47
47
 
48
- ## Extras
49
-
50
- ### Deprecation warnings for JavaScript files
51
-
52
- As a general rule we can't enable the `deprecation/deprecation` rule for JavaScript files because this rule requires TypeScript type information to work. If you have a mixed TypeScript/JavaScript project then you can enable it for the JavaScript files inside your TypeScript project using the following override:
53
-
54
- ```js
55
- // .eslintrc.js
56
- module.exports = {
57
- overrides: [
58
- {
59
- // This must be a valid path inside your TypeScript source folders.
60
- files: ["src/**/*.{js,jsx}"],
61
- rules: { "deprecation/deprecation": "warn" },
62
- },
63
- ],
64
- };
65
- ```
66
-
67
48
  [gh-contrib]: https://github.com/mscharley/node-presets/graphs/contributors
68
49
  [gh-issues]: https://github.com/mscharley/node-presets/issues
69
50
  [license]: https://github.com/mscharley/node-presets/blob/main/LICENSE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mscharley/eslint-config",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "type": "module",
5
5
  "module": "./rules/index.js",
6
6
  "exports": {
package/rules/testing.js CHANGED
@@ -22,6 +22,7 @@ export default [
22
22
  files: jestFiles,
23
23
  rules: {
24
24
  '@typescript-eslint/consistent-type-assertions': 'off',
25
+ '@typescript-eslint/no-magic-numbers': 'off',
25
26
  'jest/prefer-todo': 'error',
26
27
  'jest/no-conditional-in-test': 'warn',
27
28
  'jest/no-untyped-mock-factory': 'error',
@@ -35,4 +36,10 @@ export default [
35
36
  ],
36
37
  },
37
38
  },
39
+ {
40
+ files: ['**/__utils__/**/*.ts'],
41
+ rules: {
42
+ 'jest/no-export': 'off',
43
+ },
44
+ },
38
45
  ];