@brybrant/eslint-config 1.0.3 → 1.2.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.
@@ -1,5 +1,5 @@
1
- import { ConfigWithExtends } from "@eslint/config-helpers";
2
- //#region eslint.config.d.ts
1
+ import { ConfigObject, ConfigWithExtends } from "@eslint/config-helpers";
2
+ //#region eslint.d.ts
3
3
  /**
4
4
  * ## ESLint Config Function
5
5
  *
@@ -11,9 +11,9 @@ import { ConfigWithExtends } from "@eslint/config-helpers";
11
11
  * 3. **ESLint config object(s)** *(rest parameter)*
12
12
  * 4. [my Prettier config](https://www.npmjs.com/@brybrant/prettier-config)
13
13
  * 5. {@link jsdocConfigs JSDoc ESLint config}
14
- *
15
14
  * @param configs - [ESLint config object(s)](https://eslint.org/docs/latest/use/configure/configuration-files#configuration-objects)
15
+ * @returns ESLint config array
16
16
  */
17
- declare const eslintConfig: (...configs: ConfigWithExtends[]) => ConfigWithExtends[];
17
+ declare const eslintConfig: (...configs: ConfigWithExtends[]) => ConfigObject[];
18
18
  //#endregion
19
19
  export { eslintConfig as default };
@@ -5,11 +5,10 @@ import eslintPluginJSDoc from "eslint-plugin-jsdoc";
5
5
  import eslintPluginPrettier from "eslint-plugin-prettier/recommended";
6
6
  import tseslint from "typescript-eslint";
7
7
  import prettierConfig from "@brybrant/prettier-config";
8
- //#region eslint.config.ts
8
+ //#region eslint.ts
9
9
  /** https://typescript-eslint.io/rules/ */
10
10
  const tseslintConfig = {
11
11
  extends: tseslint.configs.strictTypeChecked,
12
- files: ["./**/*.{ts,tsx,cts,mts}"],
13
12
  languageOptions: {
14
13
  parser: tseslint.parser,
15
14
  globals: globals.nodeBuiltin,
@@ -18,7 +17,7 @@ const tseslintConfig = {
18
17
  /** Required for rules which need type information */
19
18
  projectService: true,
20
19
  /** Root directory for relative TSConfig paths */
21
- tsconfigRootDir: import.meta.dirname
20
+ tsconfigRootDir: process.cwd()
22
21
  }
23
22
  },
24
23
  rules: { "@typescript-eslint/restrict-template-expressions": [1, {
@@ -70,17 +69,17 @@ const jsdocConfigs = [(
70
69
  * 3. **ESLint config object(s)** *(rest parameter)*
71
70
  * 4. [my Prettier config](https://www.npmjs.com/@brybrant/prettier-config)
72
71
  * 5. {@link jsdocConfigs JSDoc ESLint config}
73
- *
74
72
  * @param configs - [ESLint config object(s)](https://eslint.org/docs/latest/use/configure/configuration-files#configuration-objects)
73
+ * @returns ESLint config array
75
74
  */
76
75
  const eslintConfig = (...configs) => {
77
76
  return defineConfig([
78
- globalIgnores(["./dist/**/*"]),
77
+ globalIgnores(["**/dist/**/*"]),
79
78
  js.configs.recommended,
80
79
  tseslintConfig,
81
80
  ...configs,
82
81
  {
83
- files: ["./**/*.{js,ts,jsx,tsx,cjs,cts,mjs,mts}"],
82
+ files: ["./**/*.{js,ts,jsx,tsx,cjs,cts,mjs,mts,vue}"],
84
83
  plugins: eslintPluginPrettier.plugins,
85
84
  rules: {
86
85
  ...eslintPluginPrettier.rules,
package/package.json CHANGED
@@ -2,11 +2,11 @@
2
2
  "name": "@brybrant/eslint-config",
3
3
  "author": "brybrant",
4
4
  "license": "GPL-3.0-only",
5
- "version": "1.0.3",
5
+ "version": "1.2.0",
6
6
  "type": "module",
7
- "module": "./dist/eslint.config.js",
8
- "types": "./dist/eslint.config.d.ts",
9
- "exports": "./dist/eslint.config.js",
7
+ "module": "./dist/eslint.js",
8
+ "types": "./dist/eslint.d.ts",
9
+ "exports": "./dist/eslint.js",
10
10
  "files": [
11
11
  "dist"
12
12
  ],