@singlepixellab/eslint-config 2.2.0 → 2.2.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/eslint.config.js CHANGED
@@ -1,9 +1,9 @@
1
- import ignores from "./rules/ignores.js";
2
1
  import core from "./rules/core.js";
2
+ import ignores from "./rules/ignores.js";
3
3
  import imports from "./rules/imports.js";
4
- import react from "./rules/react.js";
5
- import prettier from "./rules/prettier.js";
6
4
  import jsdoc from "./rules/jsdoc.js";
5
+ import prettier from "./rules/prettier.js";
6
+ import react from "./rules/react.js";
7
7
  import styles from "./rules/styles.js";
8
8
  import typescript from "./rules/typescript.js";
9
9
 
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.2",
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,8 @@
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-node": "^0.3.10",
81
+ "eslint-import-resolver-typescript": "^4.4.4",
80
82
  "eslint-plugin-import": "^2.32.0",
81
83
  "eslint-plugin-jsdoc": "^62.7.1",
82
84
  "eslint-plugin-jsx-a11y": "^6.10.2",
package/rules/imports.js CHANGED
@@ -68,8 +68,30 @@ 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
+ "pathGroups": [
82
+ {
83
+ pattern: "~*/**",
84
+ group: "external",
85
+ position: "after",
86
+ },
87
+ ],
88
+ "groups": [
89
+ "builtin",
90
+ "external",
91
+ "internal",
92
+ "parent",
93
+ "sibling",
94
+ "index",
73
95
  ],
74
96
  },
75
97
  ],
package/rules/react.js CHANGED
@@ -1,5 +1,5 @@
1
- import reactPlugin from "eslint-plugin-react";
2
1
  import jsxA11y from "eslint-plugin-jsx-a11y";
2
+ import reactPlugin from "eslint-plugin-react";
3
3
  import reactHooks from "eslint-plugin-react-hooks";
4
4
 
5
5
  /** @type {import('eslint').Linter.Config[]} */
@@ -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
  },