eslint-config-gorgon 0.0.2 → 0.0.4

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
@@ -1,7 +1,7 @@
1
1
  ### Install
2
2
 
3
3
  ```zsh
4
- pnpm i -D eslint-config-grogon-lint
4
+ pnpm i -D eslint-config-grogon
5
5
  ```
6
6
 
7
7
  ### Start
@@ -11,7 +11,29 @@ in your eslintrc file
11
11
  ```json
12
12
  // .eslintrc
13
13
  {
14
- "extends": ["gorgon-lint"]
14
+ "extends": ["gorgon"]
15
+ }
16
+ ```
17
+
18
+ edit your .vscode file
19
+
20
+ ```json
21
+ // ./vscode/settings.json
22
+ {
23
+ "editor.formatOnSave": true, // use prettier
24
+ "editor.codeActionsOnSave": {
25
+ "source.fixAll.eslint": true // use eslint
26
+ }
27
+ }
28
+ ```
29
+
30
+ ```json
31
+ // ./vscode/extensions.json
32
+ {
33
+ "recommendations": [
34
+ "dbaeumer.vscode-eslint",
35
+ "rvest.vs-code-prettier-eslint"
36
+ ]
15
37
  }
16
38
  ```
17
39
 
@@ -20,14 +42,15 @@ in your eslintrc file
20
42
  - eslint
21
43
  - typescript
22
44
  - react
45
+ - prettier
23
46
  - ...more lint
24
47
 
25
48
  Dont want install more deps ?
26
49
 
27
50
  Just two steps ~
28
51
 
29
- 1. `pnpm i -D eslint-config-grogon-lint`
30
- 2. create `.eslintrc` file and set `"extends": ["gorgon-lint"]`
52
+ 1. `pnpm i -D eslint-config-grogon`
53
+ 2. create `.eslintrc` file and set `"extends": ["gorgon"]`
31
54
 
32
55
  ### How it work
33
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-gorgon",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "main": "src/index.js",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -12,15 +12,15 @@
12
12
  "src/*"
13
13
  ],
14
14
  "dependencies": {
15
- "@typescript-eslint/eslint-plugin": "^5.56.0",
16
- "@typescript-eslint/parser": "^5.56.0",
15
+ "@typescript-eslint/eslint-plugin": "^5.57.1",
16
+ "@typescript-eslint/parser": "^5.57.1",
17
17
  "eslint-config-airbnb": "^19.0.4",
18
18
  "eslint-config-airbnb-typescript": "^17.0.0",
19
- "eslint-config-prettier": "^8.8.0",
20
19
  "eslint-plugin-simple-import-sort": "^10.0.0"
21
20
  },
22
21
  "devDependencies": {
23
- "eslint": "^8.36.0",
24
- "typescript": "^5.0.2"
22
+ "eslint": "^8.37.0",
23
+ "eslint-config-prettier": "^8.8.0",
24
+ "typescript": "^5.0.3"
25
25
  }
26
26
  }
package/src/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  const extendsList = [
2
2
  './rules/base.js',
3
3
  './rules/imports.js',
4
+ './rules/prettier.js',
4
5
  './rules/typescript.js',
5
6
  ].map((item) => require.resolve(item));
6
7
 
package/src/rules/base.js CHANGED
@@ -6,10 +6,11 @@ const config = {
6
6
  ],
7
7
  rules: {
8
8
  // handle console
9
- 'no-console': 'warn',
9
+ 'no-console': 1,
10
10
  // by ts
11
11
  'react/require-default-props': 0,
12
- 'import/extensions': 0
12
+ 'import/extensions': 0,
13
+ 'import/no-anonymous-default-export': [2, { 'allowObject': true }]
13
14
  },
14
15
  };
15
16