@hearthsim/eslint-config-typescript 1.0.0 → 2.0.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.
Files changed (3) hide show
  1. package/README.md +7 -6
  2. package/index.js +1 -27
  3. package/package.json +8 -10
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # @hearthsim/eslint-config-typescript
2
2
 
3
- This repository contains the HearthSim common ESLint configuration with Typescript and React support.
3
+ This repository contains the HearthSim common ESLint configuration with Typescript support.
4
+
5
+ For included React support use [@HearthSim/eslint-config-typescript-react](https://github.com/HearthSim/eslint-config-typescript-react) instead.
4
6
 
5
7
  ## Setup
6
8
 
@@ -14,11 +16,10 @@ $ yarn add -D eslint @hearthsim/eslint-config-typescript
14
16
  Plugins are resolved relative to the final project and must thus installed explicitly as part of the project:
15
17
 
16
18
  ```bash
17
- $ yarn add -D eslint-plugin-react@^7.22.0 \
18
- eslint-plugin-react-hooks@^4.2.0 \
19
- eslint-plugin-import@^2.22.1 \
20
- eslint-plugin-jest@^24.1.3 \
21
- @typescript-eslint/eslint-plugin@^4.15.1
19
+ $ yarn add -D \
20
+ @typescript-eslint/eslint-plugin@5.4.0 \
21
+ eslint-plugin-import@2.25.3 \
22
+ eslint-plugin-jest@25.2.4
22
23
  ```
23
24
 
24
25
  3. Configure ESLint:
package/index.js CHANGED
@@ -6,16 +6,9 @@ module.exports = {
6
6
  "plugin:import/errors",
7
7
  "plugin:import/warnings",
8
8
  "plugin:import/typescript",
9
- "plugin:react/recommended",
10
- "plugin:react-hooks/recommended",
11
9
  // prettier always need to be last
12
10
  "prettier",
13
11
  ],
14
- settings: {
15
- react: {
16
- version: "detect",
17
- },
18
- },
19
12
  overrides: [
20
13
  {
21
14
  files: ["**/*.js", "**/*.jsx"],
@@ -45,7 +38,7 @@ module.exports = {
45
38
  "jest/valid-title": "warn",
46
39
  // we prefer "it" over "test"
47
40
  "jest/consistent-test-it": ["warn", { fn: "it" }],
48
- "jest/lowercase-name": ["warn", { ignoreTopLevelDescribe: true }],
41
+ "jest/prefer-lowercase-title": ["warn", { ignoreTopLevelDescribe: true }],
49
42
  "jest/prefer-to-contain": "warn",
50
43
  "jest/prefer-to-have-length": "warn",
51
44
  },
@@ -104,24 +97,5 @@ module.exports = {
104
97
  "import/no-deprecated": "off",
105
98
  // can't deal with aliases
106
99
  "import/no-unresolved": "off",
107
- // we don't use this
108
- "react/display-name": "off",
109
- // not great, but otherwise we get false positives with <Trans> (localization)
110
- "react/jsx-key": "warn",
111
- // The following rule is very sensible, enforcing noopener is critical. However, we're usually okay with
112
- // exposing the referrer. Unfortunately it can't handle styled-components anchors, and cannot always detect
113
- // internal links.
114
- "react/jsx-no-target-blank": [
115
- "warn",
116
- {
117
- allowReferrer: true,
118
- },
119
- ],
120
- // our build chain can handle literals
121
- "react/no-unescaped-entities": "off",
122
- // doesn't work reliably with typescript (`FC<Props>` vs. `{} :Props`)
123
- "react/prop-types": "off",
124
- // we shouldn't usually have to worry about this
125
- "react/react-in-jsx-scope": "off",
126
100
  },
127
101
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hearthsim/eslint-config-typescript",
3
- "version": "1.0.0",
3
+ "version": "2.0.1",
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,19 @@
10
10
  "format": "prettier --write *.js"
11
11
  },
12
12
  "peerDependencies": {
13
- "@typescript-eslint/eslint-plugin": "^4.15.0",
14
- "eslint": "^5.16.0 || ^6.8.0 || ^7.2.0",
15
- "eslint-plugin-import": "^2.22.1",
16
- "eslint-plugin-jest": "^24.1.0",
17
- "eslint-plugin-react": "^7.22.0",
18
- "eslint-plugin-react-hooks": "^4.2.0",
13
+ "@typescript-eslint/eslint-plugin": "5.4.0",
14
+ "eslint": "^6.8.0 || ^7.2.0 || ^8.0.0",
15
+ "eslint-plugin-import": "^2.25.3",
16
+ "eslint-plugin-jest": "^25.2.4",
19
17
  "prettier": ">=2.0.0",
20
18
  "typescript": ">=2.8.0"
21
19
  },
22
20
  "dependencies": {
23
- "@typescript-eslint/parser": "^5.0.0",
24
- "eslint-config-prettier": "^8.0.0"
21
+ "@typescript-eslint/parser": "5.4.0",
22
+ "eslint-config-prettier": "^8.3.0"
25
23
  },
26
24
  "devDependencies": {
27
- "eslint": "^7.21.0",
25
+ "eslint": "^8.0.0",
28
26
  "prettier": "^2.2.1",
29
27
  "typescript": "^4.0.0"
30
28
  },