@hearthsim/eslint-config-typescript 2.0.2 → 3.0.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.
@@ -5,25 +5,28 @@ on:
5
5
  tags:
6
6
  - 'v*.*.*'
7
7
 
8
+ permissions:
9
+ contents: read
10
+ id-token: write
11
+
8
12
  jobs:
9
13
  build:
10
14
  runs-on: ubuntu-latest
11
15
  steps:
12
- - uses: actions/checkout@v2
13
- - uses: actions/setup-node@v1
16
+ - uses: actions/checkout@v4
17
+ - uses: actions/setup-node@v4
14
18
  with:
15
- node-version: 12
19
+ node-version: 22
16
20
  - run: yarn install --frozen-lockfile
17
21
 
18
22
  publish-npm:
19
23
  needs: build
20
24
  runs-on: ubuntu-latest
21
25
  steps:
22
- - uses: actions/checkout@v2
23
- - uses: actions/setup-node@v1
26
+ - uses: actions/checkout@v4
27
+ - uses: actions/setup-node@v4
24
28
  with:
25
- node-version: 12
29
+ node-version: 22
26
30
  registry-url: https://registry.npmjs.org/
27
- - run: yarn publish --access public
28
- env:
29
- NODE_AUTH_TOKEN: ${{secrets.NPM_HEARTHSIM_TOKEN}}
31
+ - run: npm install -g npm@latest
32
+ - run: npm publish --access public
package/index.js CHANGED
@@ -24,8 +24,6 @@ module.exports = {
24
24
  "plugin:jest/recommended",
25
25
  ],
26
26
  rules: {
27
- // describe/it blocks will always breaks this
28
- "max-lines-per-function": "off",
29
27
  // enforce describe around "it" blocks
30
28
  "jest/require-top-level-describe": "error",
31
29
  // acceptable as long as it's only imported from other tests
@@ -47,8 +45,9 @@ module.exports = {
47
45
  rules: {
48
46
  "@typescript-eslint/no-explicit-any": "off",
49
47
  "@typescript-eslint/explicit-function-return-type": "off",
50
- "@typescript-eslint/no-empty-interface": "warn",
51
- "@typescript-eslint/ban-types": [
48
+ // allowObjectTypes is off here since bare `{}` is instead handled below with our custom message
49
+ "@typescript-eslint/no-empty-object-type": ["warn", { allowObjectTypes: "always" }],
50
+ "@typescript-eslint/no-restricted-types": [
52
51
  "warn",
53
52
  {
54
53
  types: {
@@ -57,7 +56,6 @@ module.exports = {
57
56
  "If you're trying to do something like React.FC<{}>, use React.FC instead",
58
57
  },
59
58
  },
60
- extendDefaults: true,
61
59
  },
62
60
  ],
63
61
  // non-null assertions aren't great, but sometimes a last resort
@@ -72,8 +70,6 @@ module.exports = {
72
70
  "@typescript-eslint/no-unused-vars": "off",
73
71
  // while these aren't great, if someone explicitly uses them let's allow them
74
72
  "@typescript-eslint/ban-ts-comment": "off",
75
- // functions should be kept compact and logical
76
- "max-lines-per-function": ["warn", { max: 200, skipComments: true }],
77
73
  // no case declarations are not necessarily a bug, however they can lead to misused variables
78
74
  "no-case-declarations": "warn",
79
75
  "no-empty-pattern": "warn",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hearthsim/eslint-config-typescript",
3
- "version": "2.0.2",
3
+ "version": "3.0.0",
4
4
  "description": "HearthSim's presets for ESLint, with Typescript support.",
5
5
  "repository": "git@github.com:HearthSim/eslint-config-typescript.git",
6
6
  "author": "Benedict Etzel <benedict@hearthsim.net>",
@@ -10,21 +10,21 @@
10
10
  "format": "prettier --write *.js"
11
11
  },
12
12
  "peerDependencies": {
13
- "@typescript-eslint/eslint-plugin": "^5.4.0",
14
- "eslint": "^6.8.0 || ^7.2.0 || ^8.0.0",
13
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
14
+ "eslint": "^8.57.0 || ^9.0.0",
15
15
  "eslint-plugin-import": "^2.25.3",
16
16
  "eslint-plugin-jest": "^25.2.4",
17
17
  "prettier": ">=2.0.0",
18
- "typescript": ">=2.8.0"
18
+ "typescript": ">=4.8.4"
19
19
  },
20
20
  "dependencies": {
21
- "@typescript-eslint/parser": "5.4.0",
21
+ "@typescript-eslint/parser": "8.62.1",
22
22
  "eslint-config-prettier": "^8.3.0"
23
23
  },
24
24
  "devDependencies": {
25
- "eslint": "^8.0.0",
25
+ "eslint": "^8.57.0",
26
26
  "prettier": "^2.2.1",
27
- "typescript": "^4.0.0"
27
+ "typescript": "^5.0.0"
28
28
  },
29
29
  "publishConfig": {
30
30
  "access": "public"