@paratco/eslint-config 1.0.8 → 1.0.10

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.
@@ -49,4 +49,4 @@ jobs:
49
49
  - name: Publish
50
50
  run: npm publish --provenance --access public
51
51
  env:
52
- NODE_AUTH_TOKEN: ${{ secrets.NPM_KEY }}
52
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_WRITE_TOKEN }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paratco/eslint-config",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "author": "Paratco",
@@ -37,11 +37,11 @@
37
37
  "@stylistic/eslint-plugin": "^2.12.1",
38
38
  "@types/eslint__js": "^8.42.3",
39
39
  "eslint": "^9.17.0",
40
- "eslint-config-prettier": "^9.1.0",
40
+ "eslint-config-prettier": "^10.0.1",
41
41
  "eslint-import-resolver-typescript": "^3.7.0",
42
42
  "eslint-plugin-import-x": "^4.6.1",
43
43
  "eslint-plugin-react": "^7.37.3",
44
- "eslint-plugin-react-hooks": "5.1.0-rc-65e06cb7-20241218",
44
+ "eslint-plugin-react-hooks": "5.1.0",
45
45
  "eslint-plugin-react-refresh": "^0.4.16",
46
46
  "globals": "^15.14.0",
47
47
  "typescript-eslint": "^8.19.0"
@@ -5,5 +5,19 @@ export default {
5
5
 
6
6
  // https://eslint.org/docs/latest/rules/curly
7
7
  // Enforce consistent brace style for all control statements
8
- curly: ["warn", "all"]
8
+ curly: ["warn", "all"],
9
+
10
+ // https://eslint.org/docs/latest/rules/no-restricted-imports
11
+ // Disallow specified modules when loaded by import
12
+ "no-restricted-imports": [
13
+ "error",
14
+ {
15
+ patterns: [
16
+ {
17
+ regex: "(node:)?process",
18
+ message: "Please dont import node:process."
19
+ }
20
+ ]
21
+ }
22
+ ]
9
23
  };
@@ -138,7 +138,17 @@ export default {
138
138
  // https://typescript-eslint.io/rules/no-restricted-imports
139
139
  // Note: you must disable the base rule as it can report incorrect errors
140
140
  "no-restricted-imports": "off",
141
- "@typescript-eslint/no-restricted-imports": ["off"],
141
+ "@typescript-eslint/no-restricted-imports": [
142
+ "error",
143
+ {
144
+ patterns: [
145
+ {
146
+ regex: "(node:)?process",
147
+ message: "Please dont import node:process."
148
+ }
149
+ ]
150
+ }
151
+ ],
142
152
 
143
153
  // Disallow certain types
144
154
  // https://typescript-eslint.io/rules/no-restricted-types/
@@ -281,5 +291,5 @@ export default {
281
291
  // Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects
282
292
  // https://typescript-eslint.io/rules/prefer-optional-chain
283
293
  // Note: This rule is in the recommended rules. But we remove it.
284
- "@typescript-eslint/prefer-optional-chain": ["off"],
294
+ "@typescript-eslint/prefer-optional-chain": ["off"]
285
295
  };
@@ -1,52 +0,0 @@
1
- name: Publish Package To GitHub
2
-
3
- on:
4
- release:
5
- types: [published]
6
-
7
- jobs:
8
- build:
9
- runs-on:
10
- - ubuntu-latest
11
-
12
- permissions:
13
- packages: write
14
- contents: read
15
- id-token: write
16
-
17
- steps:
18
- - name: Check out the repo
19
- uses: actions/checkout@v4
20
-
21
- - name: Check build version
22
- uses: actions/github-script@v7
23
- with:
24
- script: |
25
- try {
26
- const fs = require("fs")
27
- const jsonString = fs.readFileSync("package.json")
28
- const package = JSON.parse(jsonString)
29
- if (package.version !== "${{ github.ref_name }}") {
30
- core.setFailed(`package.json version (${package.version}) not match version of release (${{ github.ref_name }})`)
31
- }
32
- } catch(err) {
33
- core.setFailed(err)
34
- }
35
-
36
- - name: Setup Node
37
- uses: actions/setup-node@v4
38
- with:
39
- node-version: 22
40
- check-latest: 'true'
41
- registry-url: https://npm.pkg.github.com/
42
-
43
- - name: Enable Yarn
44
- run: corepack enable
45
-
46
- - name: Install dependencies
47
- run: yarn install
48
-
49
- - name: Publish
50
- run: npm publish --provenance --access public --registry https://npm.pkg.github.com/
51
- env:
52
- NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}