@tommy-mitchell/eslint-config-xo 2.0.0-beta.10 → 2.0.0-beta.11

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/xo.js +17 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tommy-mitchell/eslint-config-xo",
3
- "version": "2.0.0-beta.10",
3
+ "version": "2.0.0-beta.11",
4
4
  "description": "Personal config for XO.",
5
5
  "license": "MIT",
6
6
  "repository": "tommy-mitchell/eslint-config-xo",
package/src/xo.js CHANGED
@@ -42,16 +42,31 @@ export default [{
42
42
  }, {
43
43
  files: "**/*.{ts,cts,mts,tsx}",
44
44
  rules: {
45
+ "@typescript-eslint/consistent-type-imports": ["error", {
46
+ disallowTypeAnnotations: false,
47
+ fixStyle: "inline-type-imports",
48
+ }],
45
49
  // https://github.com/xojs/eslint-config-xo-typescript/blob/v2.0.0/index.js#L384
46
- "@typescript-eslint/no-confusing-void-expression": ["error", { ignoreArrowShorthand: true }],
50
+ "@typescript-eslint/no-confusing-void-expression": ["error", {
51
+ ignoreArrowShorthand: true,
52
+ }],
47
53
  // https://github.com/xojs/eslint-config-xo-typescript/blob/v2.0.0/index.js#L707
48
54
  "@typescript-eslint/prefer-regexp-exec": "off",
55
+ "@typescript-eslint/strict-boolean-expressions": ["error", {
56
+ allowNullableBoolean: true,
57
+ allowNullableObject: true,
58
+ allowNullableString: true, // diff from xo
59
+ allowNumber: false,
60
+ allowString: true, // diff from xo
61
+ }],
49
62
  "perfectionist/sort-enums": "error",
50
63
  "perfectionist/sort-heritage-clauses": "error",
51
64
  "perfectionist/sort-interfaces": "error",
52
65
  "perfectionist/sort-intersection-types": "error",
53
66
  "perfectionist/sort-object-types": "error",
54
- "perfectionist/sort-union-types": ["error", { groups: ["unknown", "keyword", "nullish"] }],
67
+ "perfectionist/sort-union-types": ["error", {
68
+ groups: ["unknown", "keyword", "nullish"],
69
+ }],
55
70
  },
56
71
  settings: {
57
72
  n: { typescriptExtensionMap: [[".ts", ".ts"], [".tsx", ".tsx"]] },