@singlepixellab/eslint-config 2.2.0 → 2.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singlepixellab/eslint-config",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "The ESLint rules and configs used by Single Pixel Lab",
5
5
  "author": "Single Pixel Lab",
6
6
  "keywords": [
@@ -77,6 +77,7 @@
77
77
  "@eslint/js": "^9.39.4",
78
78
  "@stylistic/eslint-plugin": "^5.10.0",
79
79
  "eslint-config-prettier": "^10.1.8",
80
+ "eslint-import-resolver-typescript": "^4.4.4",
80
81
  "eslint-plugin-import": "^2.32.0",
81
82
  "eslint-plugin-jsdoc": "^62.7.1",
82
83
  "eslint-plugin-jsx-a11y": "^6.10.2",
package/rules/imports.js CHANGED
@@ -68,8 +68,34 @@ export default [
68
68
  "import/order": [
69
69
  "error",
70
70
  {
71
- groups: [
72
- ["builtin", "external", "internal", "parent", "sibling", "index"],
71
+ "alphabetize": {
72
+ order: "asc",
73
+ caseInsensitive: true,
74
+ },
75
+ "distinctGroup": false,
76
+ "newlines-between": "always",
77
+ "named": {
78
+ enabled: true,
79
+ types: "types-last",
80
+ },
81
+ "sortTypesGroup": true,
82
+ "pathGroups": [
83
+ {
84
+ pattern: "~*/**",
85
+ group: "external",
86
+ position: "after",
87
+ },
88
+ ],
89
+ "groups": [
90
+ [
91
+ "builtin",
92
+ "external",
93
+ "internal",
94
+ "parent",
95
+ "sibling",
96
+ "index",
97
+ "type",
98
+ ],
73
99
  ],
74
100
  },
75
101
  ],
package/rules/react.js CHANGED
@@ -64,9 +64,11 @@ export default [
64
64
  // Enforce or disallow spaces around equal sign
65
65
  "react/jsx-equals-spacing": "off",
66
66
 
67
- // No jsx extension
68
- // https://github.com/facebook/create-react-app/issues/87#issuecomment-234627904
69
- "react/jsx-filename-extension": ["error", { extensions: [".js"] }],
67
+ // Restrict file extensions that may contain JSX
68
+ "react/jsx-filename-extension": [
69
+ "error",
70
+ { extensions: [".js", ".tsx"] },
71
+ ],
70
72
 
71
73
  // Enforce shorthand or standard form for React fragments
72
74
  "react/jsx-fragments": ["warn", "syntax"],
@@ -30,7 +30,7 @@ export default [
30
30
  caughtErrorsIgnorePattern: "^_",
31
31
  destructuredArrayIgnorePattern: "^_",
32
32
  varsIgnorePattern: "^_",
33
- ignoreRestSiblings: true
33
+ ignoreRestSiblings: true,
34
34
  },
35
35
  ],
36
36
  },