@shufflies/eslint-config 1.0.2 → 1.0.3

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.
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.recommended = recommended;
7
7
  const compat_1 = require("@eslint/compat");
8
8
  const js_1 = __importDefault(require("@eslint/js"));
9
+ const eslint_plugin_import_1 = __importDefault(require("eslint-plugin-import"));
9
10
  const eslint_plugin_simple_import_sort_1 = __importDefault(require("eslint-plugin-simple-import-sort"));
10
11
  const eslint_plugin_unicorn_1 = __importDefault(require("eslint-plugin-unicorn"));
11
12
  const typescript_eslint_1 = __importDefault(require("typescript-eslint"));
@@ -17,17 +18,26 @@ function recommended(args = {}) {
17
18
  });
18
19
  const result = [
19
20
  {
20
- ignores: gitIgnores.flat(),
21
+ name: ".gitignore contents",
22
+ ignores: gitIgnores.flat().concat("foo/"),
21
23
  },
22
- js_1.default.configs.recommended,
24
+ { name: "eslint recommended", ...js_1.default.configs.recommended },
23
25
  typescript_eslint_1.default.configs.recommended,
24
26
  eslint_plugin_unicorn_1.default.configs.recommended,
27
+ // eslint-plugin-import
28
+ eslint_plugin_import_1.default.flatConfigs.recommended,
29
+ eslint_plugin_import_1.default.flatConfigs.typescript,
25
30
  {
31
+ name: "override unicorn defaults",
26
32
  rules: {
27
33
  "unicorn/filename-case": "off",
34
+ // Don't force changing 'Props' to 'Properties' and
35
+ // 'el' to 'element' and so on.
36
+ "unicorn/prevent-abbreviations": "off",
28
37
  },
29
38
  },
30
39
  {
40
+ name: "override imports defaults",
31
41
  plugins: {
32
42
  "simple-import-sort": eslint_plugin_simple_import_sort_1.default,
33
43
  },
@@ -43,11 +53,11 @@ function recommended(args = {}) {
43
53
  // ✅ Group + sort import lines, sort named specifiers
44
54
  "simple-import-sort/imports": "error",
45
55
  "simple-import-sort/exports": "error",
46
- // Good hygiene
47
- "no-duplicate-imports": "error",
56
+ "import/no-unresolved": ["error", { ignore: ["eslint/config"] }],
48
57
  },
49
58
  },
50
59
  {
60
+ name: "override ts-eslint defaults",
51
61
  rules: {
52
62
  "@typescript-eslint/no-empty-object-type": "off",
53
63
  "@typescript-eslint/no-unused-vars": [
@@ -1,5 +1,6 @@
1
1
  import { includeIgnoreFile } from "@eslint/compat";
2
2
  import eslint from "@eslint/js";
3
+ import importPlugin from "eslint-plugin-import";
3
4
  import simpleImportSort from "eslint-plugin-simple-import-sort";
4
5
  import eslintPluginUnicorn from "eslint-plugin-unicorn";
5
6
  import tseslint from "typescript-eslint";
@@ -11,17 +12,26 @@ export function recommended(args = {}) {
11
12
  });
12
13
  const result = [
13
14
  {
14
- ignores: gitIgnores.flat(),
15
+ name: ".gitignore contents",
16
+ ignores: gitIgnores.flat().concat("foo/"),
15
17
  },
16
- eslint.configs.recommended,
18
+ { name: "eslint recommended", ...eslint.configs.recommended },
17
19
  tseslint.configs.recommended,
18
20
  eslintPluginUnicorn.configs.recommended,
21
+ // eslint-plugin-import
22
+ importPlugin.flatConfigs.recommended,
23
+ importPlugin.flatConfigs.typescript,
19
24
  {
25
+ name: "override unicorn defaults",
20
26
  rules: {
21
27
  "unicorn/filename-case": "off",
28
+ // Don't force changing 'Props' to 'Properties' and
29
+ // 'el' to 'element' and so on.
30
+ "unicorn/prevent-abbreviations": "off",
22
31
  },
23
32
  },
24
33
  {
34
+ name: "override imports defaults",
25
35
  plugins: {
26
36
  "simple-import-sort": simpleImportSort,
27
37
  },
@@ -37,11 +47,11 @@ export function recommended(args = {}) {
37
47
  // ✅ Group + sort import lines, sort named specifiers
38
48
  "simple-import-sort/imports": "error",
39
49
  "simple-import-sort/exports": "error",
40
- // Good hygiene
41
- "no-duplicate-imports": "error",
50
+ "import/no-unresolved": ["error", { ignore: ["eslint/config"] }],
42
51
  },
43
52
  },
44
53
  {
54
+ name: "override ts-eslint defaults",
45
55
  rules: {
46
56
  "@typescript-eslint/no-empty-object-type": "off",
47
57
  "@typescript-eslint/no-unused-vars": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shufflies/eslint-config",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {
@@ -56,6 +56,7 @@
56
56
  "dependencies": {
57
57
  "@eslint/compat": "^1.3.0",
58
58
  "@eslint/js": "^9.29.0",
59
+ "eslint-plugin-import": "^2.32.0",
59
60
  "eslint-plugin-simple-import-sort": "^12.1.1",
60
61
  "eslint-plugin-unicorn": "^59.0.1",
61
62
  "typescript-eslint": "^8.34.0"