@nexim/eslint-config 2.0.0-alpha.0 → 2.0.0-alpha.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/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.0.0-alpha.1](https://github.com/the-nexim/nanolib/compare/@nexim/eslint-config@2.0.0-alpha.0...@nexim/eslint-config@2.0.0-alpha.1) (2025-01-22)
7
+
8
+ **Note:** Version bump only for package @nexim/eslint-config
9
+
6
10
  ## [2.0.0-alpha.0](https://github.com/the-nexim/nanolib/compare/@nexim/eslint-config@1.1.1...@nexim/eslint-config@2.0.0-alpha.0) (2025-01-22)
7
11
 
8
12
  ### ⚠ BREAKING CHANGES
package/README.md CHANGED
@@ -5,32 +5,46 @@
5
5
  ![NPM Downloads](https://img.shields.io/npm/dm/@nexim/eslint-config)
6
6
  ![NPM License](https://img.shields.io/npm/l/@nexim/eslint-config)
7
7
 
8
- ## Overview
9
-
10
- Alwatr ECMAScript Style Guide as a ESLint [shareable configurations](http://eslint.org/docs/developer-guide/shareable-configs.html).
8
+ Nexim ECMAScript Style Guide as a ESLint [shareable configurations](http://eslint.org/docs/developer-guide/shareable-configs.html).
11
9
 
12
10
  ## Installation
13
11
 
14
12
  ```bash
15
- yarn add -D @nexim/eslint-config \
16
- eslint \
17
- @typescript-eslint/parser \
18
- @typescript-eslint/eslint-plugin \
19
- eslint-plugin-import \
20
- eslint-import-resolver-typescript
13
+ yarn add -D @nexim/eslint-config eslint @eslint/compat
21
14
  ```
22
15
 
23
16
  ## Usage
24
17
 
25
- Create a `.eslintrc.json` file in the root of your project:
18
+ Create a `eslint.config.mjs` file in the root of your project:
19
+
20
+ ```js
21
+ import { baseExtends, jsConfigs, tsConfig } from '@nexim/eslint-config';
22
+ import { fileURLToPath } from 'node:url';
23
+ import { includeIgnoreFile } from '@eslint/compat';
24
+ import path from 'node:path';
25
+
26
+ // pass gitignore file content as ignorePatterns
27
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
28
+ const gitignorePath = path.resolve(__dirname, '.gitignore');
29
+ const ignorePatterns = includeIgnoreFile(gitignorePath).ignores;
30
+
31
+ // add your custom folders to ignore
32
+ ignorePatterns?.push('.yarn');
33
+
34
+ export default [
35
+ ...baseExtends,
36
+ ...tsConfig,
37
+ ...jsConfigs,
38
+ {
39
+ ignores: ignorePatterns,
40
+ },
41
+ ];
42
+ ```
43
+
44
+ Run ESLint:
26
45
 
27
- ```json
28
- {
29
- "extends": "@nexim/eslint-config",
30
- "rules": {
31
- // Additional, per-project rules...
32
- }
33
- }
46
+ ```bash
47
+ eslint . --config eslint.config.mjs --cache
34
48
  ```
35
49
 
36
50
  ## Idea
package/dist/main.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /* @nexim/eslint-config v2.0.0-alpha.0 */
1
+ /* @nexim/eslint-config v2.0.0-alpha.1 */
2
2
 
3
3
  // src/lib/typescript-config.ts
4
4
  import * as globals from "globals";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexim/eslint-config",
3
- "version": "2.0.0-alpha.0",
3
+ "version": "2.0.0-alpha.1",
4
4
  "description": "Base Eslint configuration for Nexim projects.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -61,8 +61,9 @@
61
61
  "@stylistic/eslint-plugin": "^2.13.0",
62
62
  "eslint": "^9.18.0",
63
63
  "eslint-plugin-import": "^2.31.0",
64
+ "eslint-plugin-tsdoc": "^0.4.0",
64
65
  "globals": "^15.14.0",
65
- "typescript-eslint": "^8.20.0"
66
+ "typescript-eslint": "^8.21.0"
66
67
  },
67
68
  "devDependencies": {
68
69
  "@alwatr/nano-build": "^5.0.0",
@@ -70,7 +71,6 @@
70
71
  "@nexim/typescript-config": "^2.0.0",
71
72
  "@types/eslint": "^9.6.1",
72
73
  "@types/node": "^22.10.7",
73
- "eslint-plugin-tsdoc": "^0.4.0",
74
74
  "typescript": "^5.7.3",
75
75
  "wireit": "^0.14.9"
76
76
  },
@@ -123,5 +123,5 @@
123
123
  "service": true
124
124
  }
125
125
  },
126
- "gitHead": "d14a2efd431e585a4d43b396fe84909121456ffe"
126
+ "gitHead": "ed72ebc29e13003729801c36d67fe371a62b4937"
127
127
  }