@hearthsim/eslint-config-typescript 0.3.2 → 2.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.
Files changed (3) hide show
  1. package/README.md +8 -6
  2. package/index.js +1 -28
  3. package/package.json +13 -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.
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:
@@ -26,6 +27,7 @@ $ yarn add -D eslint-plugin-react@^7.22.0 \
26
27
  Create or update your`.eslintrc.js`:
27
28
  ```js
28
29
  module.exports = {
30
+ root: true,
29
31
  extends: ["@hearthsim/eslint-config-typescript"],
30
32
  env: {
31
33
  browser: true,
package/index.js CHANGED
@@ -6,17 +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
- "prettier/@typescript-eslint",
14
11
  ],
15
- settings: {
16
- react: {
17
- version: "detect",
18
- },
19
- },
20
12
  overrides: [
21
13
  {
22
14
  files: ["**/*.js", "**/*.jsx"],
@@ -46,7 +38,7 @@ module.exports = {
46
38
  "jest/valid-title": "warn",
47
39
  // we prefer "it" over "test"
48
40
  "jest/consistent-test-it": ["warn", { fn: "it" }],
49
- "jest/lowercase-name": ["warn", { ignoreTopLevelDescribe: true }],
41
+ "jest/prefer-lowercase-title": ["warn", { ignoreTopLevelDescribe: true }],
50
42
  "jest/prefer-to-contain": "warn",
51
43
  "jest/prefer-to-have-length": "warn",
52
44
  },
@@ -105,24 +97,5 @@ module.exports = {
105
97
  "import/no-deprecated": "off",
106
98
  // can't deal with aliases
107
99
  "import/no-unresolved": "off",
108
- // we don't use this
109
- "react/display-name": "off",
110
- // not great, but otherwise we get false positives with <Trans> (localization)
111
- "react/jsx-key": "warn",
112
- // The following rule is very sensible, enforcing noopener is critical. However, we're usually okay with
113
- // exposing the referrer. Unfortunately it can't handle styled-components anchors, and cannot always detect
114
- // internal links.
115
- "react/jsx-no-target-blank": [
116
- "warn",
117
- {
118
- allowReferrer: true,
119
- },
120
- ],
121
- // our build chain can handle literals
122
- "react/no-unescaped-entities": "off",
123
- // doesn't work reliably with typescript (`FC<Props>` vs. `{} :Props`)
124
- "react/prop-types": "off",
125
- // we shouldn't usually have to worry about this
126
- "react/react-in-jsx-scope": "off",
127
100
  },
128
101
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hearthsim/eslint-config-typescript",
3
- "version": "0.3.2",
3
+ "version": "2.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,24 +10,27 @@
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",
17
+ "eslint-plugin-react": "^7.27.1",
18
+ "eslint-plugin-react-hooks": "^4.3.0",
19
19
  "prettier": ">=2.0.0",
20
20
  "typescript": ">=2.8.0"
21
21
  },
22
22
  "dependencies": {
23
- "@typescript-eslint/parser": "^4.15.0",
24
- "eslint-config-prettier": "^7.2.0"
23
+ "@typescript-eslint/parser": "5.4.0",
24
+ "eslint-config-prettier": "^8.3.0"
25
25
  },
26
26
  "devDependencies": {
27
- "eslint": "^7.21.0",
27
+ "eslint": "^8.0.0",
28
28
  "prettier": "^2.2.1",
29
29
  "typescript": "^4.0.0"
30
30
  },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
31
34
  "prettier": {
32
35
  "useTabs": true,
33
36
  "trailingComma": "all"