@jiakun-zhao/eslint-config 1.3.0 → 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 +1 -67
  2. package/dist/index.cjs +23 -41
  3. package/package.json +7 -9
package/README.md CHANGED
@@ -1,71 +1,5 @@
1
1
  ## @jiakun-zhao/eslint-config
2
-
3
- > Extends [@antfu/eslint-config](https://github.com/antfu/eslint-config).
4
-
5
- <br />
6
2
 
7
3
  ![npm](https://img.shields.io/npm/v/@jiakun-zhao/eslint-config?color=%236054ba)
8
4
 
9
- #### Usage
10
-
11
- 1. Install the package
12
-
13
- ```bash
14
- ni -D @jiakun-zhao/eslint-config
15
- ```
16
-
17
- 2. Add the following to your `package.json` file
18
-
19
- ```json
20
- {
21
- "eslintConfig": {
22
- "extends": "@jiakun-zhao"
23
- }
24
- }
25
- ```
26
-
27
- 3. Add the following to your `.vscode/settings.json` file
28
-
29
- ```json
30
- {
31
- "editor.codeActionsOnSave": {
32
- "source.fixAll.eslint": true
33
- },
34
- "editor.formatOnSave": false,
35
- // "prettier.enable": false,
36
- "eslint.validate": [
37
- "javascript",
38
- "javascriptreact",
39
- "typescript",
40
- "typescriptreact",
41
- "vue",
42
- "html",
43
- "markdown",
44
- "json",
45
- "jsonc",
46
- "yaml"
47
- ]
48
- }
49
- ```
50
-
51
- #### Other
52
-
53
- UnoCSS
54
-
55
- ```bash
56
- pnpm i @unocss/eslint-config
57
- pnpm i eslint-plugin-solid
58
- ```
59
-
60
- ```diff
61
- "eslintConfig": {
62
- + "plugins": [
63
- + "solid"
64
- + ],
65
- "extends": [
66
- "@jiakun-zhao",
67
- + "@unocss",
68
- + "plugin:solid/recommended"
69
- ]
70
- }
71
- ```
5
+ Extends [@antfu/eslint-config](https://github.com/antfu/eslint-config).
package/dist/index.cjs CHANGED
@@ -1,46 +1,28 @@
1
1
  'use strict';
2
2
 
3
- const index = {
4
- extends: [
5
- "@antfu",
6
- "plugin:react/recommended"
7
- ],
8
- rules: {
9
- "no-console": "warn",
10
- "brace-style": ["warn", "1tbs"],
11
- "@typescript-eslint/brace-style": ["warn", "1tbs"],
12
- "@typescript-eslint/ban-ts-comment": ["off"],
13
- // imports
14
- "unused-imports/no-unused-imports": "warn",
15
- // vue
16
- "vue/singleline-html-element-content-newline": "off",
17
- "vue/html-self-closing": "off",
18
- "vue/static-class-names-order": "warn",
19
- // react & jsx
20
- "jsx-quotes": ["error", "prefer-single"],
21
- "react/react-in-jsx-scope": "off",
22
- "react/no-unknown-property": "off",
23
- "react/self-closing-comp": "off",
24
- "react/destructuring-assignment": "off",
25
- "react/no-multi-comp": "off",
26
- "react/function-component-definition": "off",
27
- "react/display-name": "off",
28
- "react/button-has-type": "off",
29
- "react/no-children-prop": "off",
30
- "react/jsx-key": "off",
31
- "react/jsx-indent": ["error", 2],
32
- "react/jsx-indent-props": ["error", 2],
33
- "react/jsx-max-depth": "off",
34
- "react/jsx-filename-extension": "off",
35
- "react/jsx-no-literals": "off",
36
- "react/jsx-max-props-per-line": "off",
37
- "react/jsx-tag-spacing": ["error", { closingSlash: "never", beforeSelfClosing: "always", afterOpening: "never", beforeClosing: "never" }],
38
- "react/jsx-newline": "off",
39
- "react/jsx-one-expression-per-line": "off",
40
- "react/jsx-no-bind": "off",
41
- "react/jsx-curly-spacing": ["error", { when: "never", children: { when: "never" } }],
42
- "react/jsx-closing-bracket-location": "warn"
3
+ const antfu = require('@antfu/eslint-config');
4
+
5
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
6
+
7
+ const antfu__default = /*#__PURE__*/_interopDefaultCompat(antfu);
8
+
9
+ const index = antfu__default({
10
+ stylistic: {
11
+ overrides: {
12
+ "style/jsx-one-expression-per-line": "off"
13
+ }
14
+ },
15
+ typescript: {
16
+ overrides: {
17
+ "ts/ban-ts-comment": "off"
18
+ }
19
+ },
20
+ vue: {
21
+ overrides: {
22
+ "vue/html-self-closing": "off",
23
+ "vue/singleline-html-element-content-newline": "off"
24
+ }
43
25
  }
44
- };
26
+ });
45
27
 
46
28
  module.exports = index;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jiakun-zhao/eslint-config",
3
- "version": "1.3.0",
4
- "packageManager": "pnpm@8.8.0",
3
+ "version": "2.0.0",
4
+ "packageManager": "pnpm@8.15.4",
5
5
  "description": "Jiakun's ESLint config.",
6
6
  "author": "Jiakun Zhao <hi@zhaojiakun.com>",
7
7
  "license": "MIT",
@@ -18,15 +18,13 @@
18
18
  "eslint": ">=7.4.0"
19
19
  },
20
20
  "dependencies": {
21
- "@antfu/eslint-config": "^v0.43.1",
22
- "eslint-plugin-react": "^7.33.2"
21
+ "@antfu/eslint-config": "^2.8.0"
23
22
  },
24
23
  "devDependencies": {
25
- "@types/eslint": "^8.44.3",
26
- "@types/node": "^20.8.3",
27
- "bumpp": "^9.2.0",
28
- "eslint": "^8.51.0",
29
- "typescript": "^5.2.2",
24
+ "@types/node": "^20.11.25",
25
+ "bumpp": "^9.4.0",
26
+ "eslint": "^8.57.0",
27
+ "typescript": "^5.4.2",
30
28
  "unbuild": "^2.0.0"
31
29
  },
32
30
  "eslintConfig": {