@open-turo/eslint-config-typescript 2.2.0 → 2.4.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.
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": [
3
+ "github>open-turo/renovate-config#v1",
4
+ "github>open-turo/renovate-config:npm#v1"
5
+ ]
6
+ }
@@ -13,12 +13,13 @@ jobs:
13
13
  uses: actions/checkout@v3
14
14
  with:
15
15
  fetch-depth: 0
16
+ persist-credentials: false
16
17
  - name: Semantic release
17
18
  id: release
18
- uses: cycjimmy/semantic-release-action@v2
19
+ uses: cycjimmy/semantic-release-action@v3
19
20
  with:
20
21
  extra_plugins: |
21
- semantic-release-github-pullrequest
22
+ @open-turo/semantic-release-config
22
23
  env:
23
24
  GITHUB_TOKEN: ${{ secrets.OPEN_TURO_GITHUB_TOKEN }}
24
25
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,23 @@
1
+ name: Update dependencies
2
+ concurrency: update-dependencies
3
+
4
+ on:
5
+ schedule:
6
+ # Every day at midnight
7
+ - cron: "0 0 * * *"
8
+ workflow_dispatch:
9
+ issue_comment:
10
+ types:
11
+ - edited
12
+ pull_request:
13
+ types:
14
+ - edited
15
+
16
+ jobs:
17
+ update-dependencies:
18
+ runs-on: ubuntu-latest
19
+ name: Update dependencies
20
+ steps:
21
+ - uses: open-turo/action-renovate@v1
22
+ with:
23
+ github-token: ${{ secrets.OPEN_TURO_GITHUB_TOKEN }}
package/.releaserc.json CHANGED
@@ -1,26 +1,3 @@
1
1
  {
2
- "branches": ["main", "next"],
3
- "plugins": [
4
- "@semantic-release/commit-analyzer",
5
- "@semantic-release/release-notes-generator",
6
- [
7
- "@semantic-release/npm",
8
- {
9
- "tarballDir": "pack"
10
- }
11
- ],
12
- [
13
- "@semantic-release/github",
14
- {
15
- "assets": "pack/*.tgz"
16
- }
17
- ],
18
- [
19
- "semantic-release-github-pullrequest",
20
- {
21
- "assets": ["package.json", "README.md", "package-lock.json"],
22
- "baseRef": "main"
23
- }
24
- ]
25
- ]
2
+ "extends": "@open-turo/semantic-release-config/lib/npm"
26
3
  }
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Turo eslint configuration for typescript.
4
4
 
5
5
  [![Release](https://img.shields.io/github/v/release/open-turo/eslint-config-typescript)](https://github.com/open-turo/eslint-config-typescript/releases/)
6
- [![Tests pass/fail](https://img.shields.io/github/workflow/status/open-turo/eslint-config-typescript/CI)](https://github.com/open-turo/eslint-config-typescript/actions/)
6
+ [![Tests pass/fail](https://img.shields.io/github/actions/workflow/status/open-turo/eslint-config-typescript/ci.yaml)](https://github.com/open-turo/eslint-config-typescript/actions/)
7
7
  [![License](https://img.shields.io/github/license/open-turo/eslint-config-typescript)](./LICENSE)
8
8
  [![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](https://github.com/dwyl/esta/issues)
9
9
  ![CI](https://github.com/open-turo/eslint-config-typescript/actions/workflows/release.yaml/badge.svg)
package/index.js CHANGED
@@ -2,10 +2,12 @@ module.exports = {
2
2
  root: true,
3
3
  env: {
4
4
  es2022: true,
5
+ jest: true,
5
6
  },
6
7
  parser: "@typescript-eslint/parser",
7
8
  plugins: [
8
9
  "@typescript-eslint",
10
+ "eslint-plugin-jest",
9
11
  "import",
10
12
  "jest",
11
13
  "json",
@@ -36,6 +38,17 @@ module.exports = {
36
38
  project: "./tsconfig.json",
37
39
  sourceType: "module",
38
40
  },
41
+ overrides: [
42
+ {
43
+ files: ["test/**"],
44
+ plugins: ["jest"],
45
+ rules: {
46
+ // this turns the original rule off *only* for test files, for jest compatibility
47
+ "@typescript-eslint/unbound-method": "off",
48
+ "jest/unbound-method": "error",
49
+ },
50
+ },
51
+ ],
39
52
  rules: {
40
53
  "import/default": "off",
41
54
  "import/named": "off",
@@ -66,6 +79,8 @@ module.exports = {
66
79
  argsIgnorePattern: "^_",
67
80
  },
68
81
  ],
82
+ "@typescript-eslint/prefer-ts-expect-error": "error",
83
+ "@typescript-eslint/unbound-method": "error",
69
84
  },
70
85
  settings: {
71
86
  "import/parsers": {
package/legacy.js CHANGED
@@ -1,13 +1,14 @@
1
1
  module.exports = {
2
2
  root: true,
3
3
  env: {
4
- es6: true,
4
+ es2022: true,
5
5
  jest: true,
6
6
  },
7
7
  parser: "@typescript-eslint/parser",
8
8
  ignorePatterns: ["jest.config.js"],
9
9
  plugins: [
10
10
  "@typescript-eslint",
11
+ "eslint-plugin-jest",
11
12
  "import",
12
13
  "jest",
13
14
  "json",
@@ -17,7 +18,6 @@ module.exports = {
17
18
  "sonarjs",
18
19
  "sort-destructure-keys",
19
20
  "typescript-sort-keys",
20
- "eslint-plugin-jest",
21
21
  ],
22
22
  extends: [
23
23
  "eslint:recommended",
@@ -88,6 +88,7 @@ module.exports = {
88
88
  ],
89
89
  "@typescript-eslint/unbound-method": "error",
90
90
  "@typescript-eslint/no-unnecessary-type-assertion": "error",
91
+ "@typescript-eslint/prefer-ts-expect-error": "error",
91
92
  // Any-related TS rules are turned to warn to allow building "non-TS-native" packages w/ many occurrences of them
92
93
  "@typescript-eslint/no-unsafe-argument": ["warn"],
93
94
  "@typescript-eslint/no-unsafe-return": ["warn"],
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "devDependencies": {
5
5
  "@commitlint/cli": "^17.0.0",
6
6
  "@open-turo/commitlint-config-conventional": "^1.0.2",
7
- "@semantic-release/git": "^10.0.1",
7
+ "@open-turo/semantic-release-config": "^1.0.1",
8
8
  "@typescript-eslint/eslint-plugin": "^5.20.0",
9
9
  "@typescript-eslint/parser": "^5.20.0",
10
10
  "eslint": "^8.18.0",
@@ -20,8 +20,7 @@
20
20
  "eslint-plugin-typescript-sort-keys": "^2.1.0",
21
21
  "eslint-plugin-unicorn": "^45.0.0",
22
22
  "prettier": "^2.5.1",
23
- "semantic-release": "^19.0.2",
24
- "semantic-release-github-pullrequest": "^1.3.0"
23
+ "semantic-release": "^19.0.2"
25
24
  },
26
25
  "engines": {
27
26
  "node": ">= 14"
@@ -54,5 +53,5 @@
54
53
  "access": "public"
55
54
  },
56
55
  "repository": "https://github.com/open-turo/eslint-config-typescript",
57
- "version": "2.2.0"
56
+ "version": "2.4.0"
58
57
  }
@@ -1,12 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: npm
4
- directory: /
5
- reviewers:
6
- - "open-turo/node"
7
- schedule:
8
- interval: weekly
9
- commit-message:
10
- prefix: build(deps)
11
- prefix-development: build(dev-deps)
12
- include: scope