eslint-config-complete 1.0.0 → 1.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-complete",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "A sharable ESLint config for TypeScript projects.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -21,12 +21,12 @@
21
21
  "license": "MIT",
22
22
  "author": "Zamiell",
23
23
  "type": "module",
24
+ "main": "./src/index.js",
24
25
  "files": [
25
- "configs",
26
- "base.js",
27
26
  "LICENSE",
28
27
  "package.json",
29
- "README.md"
28
+ "README.md",
29
+ "src"
30
30
  ],
31
31
  "scripts": {
32
32
  "lint": "tsx ./scripts/lint.ts"
@@ -1,12 +1,12 @@
1
1
  import ESLintPluginComplete from "eslint-plugin-complete";
2
2
  import tseslint from "typescript-eslint";
3
- import { baseESLint } from "./configs/base-eslint.js";
4
- import { baseImportX } from "./configs/base-import-x.js";
5
- import { baseJSDoc } from "./configs/base-jsdoc.js";
6
- import { baseN } from "./configs/base-n.js";
7
- import { baseStylistic } from "./configs/base-stylistic.js";
8
- import { baseTypeScriptESLint } from "./configs/base-typescript-eslint.js";
9
- import { baseUnicorn } from "./configs/base-unicorn.js";
3
+ import { baseESLint } from "./baseConfigs/base-eslint.js";
4
+ import { baseImportX } from "./baseConfigs/base-import-x.js";
5
+ import { baseJSDoc } from "./baseConfigs/base-jsdoc.js";
6
+ import { baseN } from "./baseConfigs/base-n.js";
7
+ import { baseStylistic } from "./baseConfigs/base-stylistic.js";
8
+ import { baseTypeScriptESLint } from "./baseConfigs/base-typescript-eslint.js";
9
+ import { baseUnicorn } from "./baseConfigs/base-unicorn.js";
10
10
 
11
11
  // Hot-patch "eslint-plugin-complete" to convert errors to warnings.
12
12
  for (const config of ESLintPluginComplete.configs.recommended) {
@@ -25,7 +25,7 @@ for (const config of ESLintPluginComplete.configs.recommended) {
25
25
  * Rule modifications are split out into different files for better organization (based on the
26
26
  * originating plugin) .
27
27
  */
28
- export const base = tseslint.config(
28
+ export const completeConfigBase = tseslint.config(
29
29
  ...baseESLint,
30
30
  ...baseTypeScriptESLint,
31
31
  ...baseStylistic,
package/src/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { completeConfigBase } from "./base.js";
2
+ export { completeConfigMonorepo } from "./monorepo.js";
@@ -0,0 +1,33 @@
1
+ import tseslint from "typescript-eslint";
2
+
3
+ /**
4
+ * This ESLint config is meant to be used in monorepos that install dependencies at the root (in
5
+ * addition to the `completeBase` config).
6
+ */
7
+ export const completeConfigMonorepo = tseslint.config(
8
+ {
9
+ files: ["**/scripts/*.{js,cjs,mjs,ts,cts,mts}"],
10
+ rules: {
11
+ // The dependencies that are used in monorepo package scripts are often installed at the root
12
+ // of the monorepo (instead of as a "devDependency" in the package's "package.json" file).
13
+ "import-x/no-extraneous-dependencies": "off",
14
+ },
15
+ },
16
+
17
+ {
18
+ files: ["eslint.config.mjs"],
19
+ rules: {
20
+ // ESLint configs in monorepos often intentionally import from the "src" subdirectory (because
21
+ // the config files are JavaScript so they cannot use tsconfig-paths).
22
+ "@typescript-eslint/no-restricted-imports": "off",
23
+
24
+ // ESLint configs in monorepos often intentionally import from the "packages" subdirectory
25
+ // (because the config files are JavaScript so they cannot use tsconfig-paths).
26
+ "import-x/no-relative-packages": "off",
27
+
28
+ // ESLint configs in monorepos will import from "typescript-eslint" (and potentially other
29
+ // plugins), which is often installed at root of the monorepo.
30
+ "import-x/no-extraneous-dependencies": "off",
31
+ },
32
+ },
33
+ );
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes