eslint-config-jc 2.1.1 → 2.2.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.
package/README.md CHANGED
@@ -36,15 +36,6 @@ ESLint config:
36
36
  }
37
37
  ```
38
38
 
39
- Prettier config:
40
-
41
- ```json
42
- {
43
- "bracketSameLine": true,
44
- "trailingComma": "all"
45
- }
46
- ```
47
-
48
39
  ## Configuration philosophy
49
40
 
50
41
  When analyzing whether a rule should be `error`, `warn`, or `off`, the following assumptions are made:
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "eslint-config-jc",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "Josh-Cena's personal coding style",
5
5
  "main": "index.js",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/jc-verse/eslint-config-jc.git"
8
+ "url": "git+https://github.com/jc-verse/js-style-guide.git",
9
+ "directory": "packages/eslint-config"
9
10
  },
10
11
  "keywords": [
11
12
  "eslint",
@@ -14,9 +15,9 @@
14
15
  "author": "Joshua Chen",
15
16
  "license": "MIT",
16
17
  "bugs": {
17
- "url": "https://github.com/jc-verse/eslint-config-jc/issues"
18
+ "url": "https://github.com/jc-verse/js-style-guide/issues"
18
19
  },
19
- "homepage": "https://github.com/jc-verse/eslint-config-jc#readme",
20
+ "homepage": "https://jc-verse.github.io/js-style-guide/",
20
21
  "exports": {
21
22
  ".": "./index.js",
22
23
  "./base": "./rules/base.js",
@@ -26,17 +27,28 @@
26
27
  "./typescript": "./rules/typescript.js",
27
28
  "./typescript-typecheck": "./rules/typescript-typecheck.js"
28
29
  },
30
+ "dependencies": {
31
+ "eslint-config-prettier": "^8.5.0"
32
+ },
29
33
  "peerDependencies": {
30
- "@typescript-eslint/eslint-plugin": "^5.10.2",
31
- "@typescript-eslint/parser": "^5.10.2",
32
- "eslint": "^8.2.0",
34
+ "@typescript-eslint/eslint-plugin": "^5.18.0",
35
+ "@typescript-eslint/parser": "^5.18.0",
36
+ "eslint": "^8.13.0",
33
37
  "eslint-plugin-header": "^3.1.1",
34
- "eslint-plugin-import": "^2.25.3",
38
+ "eslint-plugin-import": "^2.26.0",
35
39
  "eslint-plugin-jsx-a11y": "^6.5.1",
36
- "eslint-plugin-react": "^7.27.0",
37
- "eslint-plugin-react-hooks": "^4.3.0"
40
+ "eslint-plugin-react": "^7.29.4",
41
+ "eslint-plugin-react-hooks": "^4.4.0"
38
42
  },
39
- "dependencies": {
40
- "eslint-config-prettier": "^8.3.0"
43
+ "peerDependenciesMeta": {
44
+ "eslint-plugin-jsx-a11y": {
45
+ "optional": true
46
+ },
47
+ "eslint-plugin-react": {
48
+ "optional": true
49
+ },
50
+ "eslint-plugin-react-hooks": {
51
+ "optional": true
52
+ }
41
53
  }
42
54
  }
package/rules/base.js CHANGED
@@ -159,7 +159,7 @@ module.exports = {
159
159
 
160
160
  "no-compare-neg-zero": "error",
161
161
 
162
- "no-cond-assign": "error",
162
+ "no-cond-assign": ["error", "always"],
163
163
 
164
164
  // Fixable, so better report this. Prettier doesn't fix it all the time
165
165
  "no-confusing-arrow": "error",
@@ -170,7 +170,7 @@ module.exports = {
170
170
  // Also checked by TypeScript
171
171
  "no-const-assign": "error",
172
172
 
173
- "no-constant-condition": "error",
173
+ "no-constant-condition": ["error", { checkLoops: true }],
174
174
 
175
175
  "no-constructor-return": "error",
176
176
 
@@ -133,7 +133,7 @@ module.exports = {
133
133
 
134
134
  "@typescript-eslint/no-require-imports": "error",
135
135
 
136
- "@typescript-eslint/no-shadow": "error",
136
+ "@typescript-eslint/no-shadow": ["error", { ignoreOnInitialization: true }],
137
137
 
138
138
  "@typescript-eslint/no-this-alias": "warn",
139
139