@robinblomberg/eslint-config-robinblomberg 0.33.0 → 0.34.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/README.md CHANGED
@@ -8,14 +8,18 @@ npm install -D @robinblomberg/eslint-config-robinblomberg
8
8
 
9
9
  ## Configuration
10
10
 
11
- Create a file called **.eslintrc.js** at the project root:
11
+ Requires ESLint 9.x and Node's `require(esm)`/ESM support.
12
+
13
+ Create a file called **eslint.config.js** at the project root:
12
14
 
13
15
  ```js
14
- module.exports = {
15
- extends: '@robinblomberg/robinblomberg',
16
- };
16
+ import eslintConfigRobinBlomberg from '@robinblomberg/eslint-config-robinblomberg';
17
+
18
+ export default [...eslintConfigRobinBlomberg];
17
19
  ```
18
20
 
21
+ If your project isn't set up for ESM (no `"type": "module"` in package.json), name the file **eslint.config.mjs** instead.
22
+
19
23
  ## NPM scripts
20
24
 
21
25
  Add the following scripts to your package.json:
@@ -23,8 +27,8 @@ Add the following scripts to your package.json:
23
27
  ```json
24
28
  {
25
29
  "scripts": {
26
- "lint-scripts": "eslint \"**/*.{js,jsx,ts,tsx}\"",
27
- "lint-scripts-fix": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix"
30
+ "lint": "eslint \"**/*.{js,jsx,ts,tsx}\"",
31
+ "lint:fix": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix"
28
32
  }
29
33
  }
30
34
  ```
@@ -34,7 +38,7 @@ Adjust the paths according to your project/file structure as necessary (e.g. `"e
34
38
  To run a script, enter the following in your command line:
35
39
 
36
40
  ```sh
37
- npm run lint-scripts
41
+ npm run lint
38
42
  ```
39
43
 
40
44
  ## Formatting on save
package/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export default config;
2
+ /**
3
+ * @type {import('eslint').Linter.Config[]}
4
+ */
5
+ declare const config: import("eslint").Linter.Config[];
6
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";AAuBA;;GAEG;AACH,sBAFU,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CA6gDxC"}