@robinbobin/eslint-config-react 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.
package/README.md CHANGED
@@ -4,4 +4,6 @@ Install the following packages:
4
4
 
5
5
  pnpm i --save-dev @robinbobin/eslint-config-react eslint@^9.39.1
6
6
 
7
- Refer to [this section](https://github.com/RobinBobin/eslint-config/blob/main/README.md#config_eslint.config.js).
7
+ The script invoked during `postinstall` copies a sample ESLint config to your project root dir, naming the file `eslint.config.js_<number>`. Don't forget to delete the `_<number>` part from the file name. You can copy this sample config manually if you don't want to let `postinstall` execute:
8
+
9
+ cp node_modules/@robinbobin/eslint-config-react/eslint.config.js_ ./eslint.config.js
@@ -0,0 +1,4 @@
1
+ import parentConfig from '@robinbobin/eslint-config-react'
2
+ import { defineConfig } from 'eslint/config'
3
+
4
+ export default defineConfig(parentConfig)
package/package.json CHANGED
@@ -22,7 +22,9 @@
22
22
  },
23
23
  "files": [
24
24
  "eslint.config.js",
25
- "js"
25
+ "eslint.config.js_",
26
+ "js",
27
+ "postinstall.sh"
26
28
  ],
27
29
  "homepage": "https://github.com/RobinBobin/eslint-config-react#readme",
28
30
  "keywords": [
@@ -36,6 +38,8 @@
36
38
  "url": "git+https://github.com/RobinBobin/eslint-config-react.git"
37
39
  },
38
40
  "type": "module",
39
- "version": "1.0.2",
40
- "scripts": {}
41
+ "version": "1.0.3",
42
+ "scripts": {
43
+ "postinstall": "chmod u+x postinstall.sh && ./postinstall.sh"
44
+ }
41
45
  }
package/postinstall.sh ADDED
@@ -0,0 +1,2 @@
1
+ #!/bin/bash
2
+ cp ./eslint.config.js_ $INIT_CWD/eslint.config.js_`date +%s%N`