@timobechtel/style 1.1.0 → 1.3.0

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.
@@ -76,8 +76,21 @@ module.exports = defineConfig({
76
76
  'import/namespace': 'off',
77
77
  'import/no-unresolved': 'off',
78
78
 
79
- // This is disabled as we feel that checking empty strings is a valid use
79
+ // This is disabled as I feel that checking empty strings is a valid use
80
80
  // of `||` over `??`.
81
81
  '@typescript-eslint/prefer-nullish-coalescing': 'off',
82
+
83
+ // Disallow Promises in places not designed to handle them.
84
+ '@typescript-eslint/no-misused-promises': [
85
+ 'error',
86
+ {
87
+ // Disabled as I feel that passing a async callback to a function expecting
88
+ // a void callback is a valid use case.
89
+ // e.g. fn.on('event', async () => {})
90
+ // Strictly requiring to return 'undefined' does not have a functional benefit,
91
+ // but makes the code more verbose.
92
+ checksVoidReturn: false,
93
+ },
94
+ ],
82
95
  },
83
96
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timobechtel/style",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "bin",
@@ -8,6 +8,9 @@ const overridableDefaults = {
8
8
  endOfLine: 'lf',
9
9
  tabWidth: 2,
10
10
  printWidth: 80,
11
+ // Why I'd generally prefer tabs, as they are a lot more customizable,
12
+ // I've found that in a lot of places, tabs are displayed as 8 spaces by default,
13
+ // which makes it hard to read on mobile devices. (e.g. the GitHub app)
11
14
  useTabs: false,
12
15
  };
13
16
 
@@ -1,23 +1,24 @@
1
1
  {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "Default",
4
- "compilerOptions": {
5
- "composite": false,
6
- "declaration": true,
7
- "declarationMap": true,
8
- "esModuleInterop": true,
9
- "forceConsistentCasingInFileNames": true,
10
- "inlineSources": false,
11
- "isolatedModules": true,
12
- "moduleResolution": "node",
13
- "noUnusedLocals": false,
14
- "noUnusedParameters": false,
15
- "preserveWatchOutput": true,
16
- "skipLibCheck": true,
17
- "strict": true,
18
- "strictNullChecks": true,
19
- "incremental": true,
20
- "resolveJsonModule": true
21
- },
22
- "exclude": ["node_modules"]
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Default",
4
+ "compilerOptions": {
5
+ "composite": false,
6
+ "declaration": true,
7
+ "declarationMap": true,
8
+ "esModuleInterop": true,
9
+ "forceConsistentCasingInFileNames": true,
10
+ "inlineSources": false,
11
+ "isolatedModules": true,
12
+ "moduleResolution": "node",
13
+ "noUnusedLocals": false,
14
+ "noUnusedParameters": false,
15
+ "noImplicitAny": true,
16
+ "preserveWatchOutput": true,
17
+ "skipLibCheck": true,
18
+ "strict": true,
19
+ "strictNullChecks": true,
20
+ "incremental": true,
21
+ "resolveJsonModule": true
22
+ },
23
+ "exclude": ["node_modules"]
23
24
  }