@antfu/eslint-config 1.0.0-beta.2 → 1.0.0-beta.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
@@ -71,6 +71,7 @@ Add the following settings to your `settings.json`:
71
71
  // Silent the stylistic rules in you IDE, but still auto fix them
72
72
  "eslint.rules.customizations": [
73
73
  { "rule": "@stylistic/*", "severity": "off" },
74
+ { "rule": "style*", "severity": "off" },
74
75
  { "rule": "*-indent", "severity": "off" },
75
76
  { "rule": "*-spacing", "severity": "off" },
76
77
  { "rule": "*-spaces", "severity": "off" },
@@ -199,15 +200,15 @@ Check out the [configs](https://github.com/antfu/eslint-config/blob/main/src/con
199
200
 
200
201
  ## Plugins Renaming
201
202
 
202
- Since flat config support explicit provides the plugin names, we renamed some plugins to make them more consistent and hide the implementation details.
203
+ Since flat config requires us to explicitly provide the plugin names (instead of mandatory convention from npm package name), we renamed some plugins to make overall scope more consistent and easier to write.
203
204
 
204
205
  | Original Prefix | New Prefix | Source Plugin |
205
206
  | --------------- | ---------- | ------------- |
206
207
  | `i/*` | `import/*` | [eslint-plugin-i](https://github.com/un-es/eslint-plugin-i) |
207
- | `n/*` | `node` | [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n)
208
+ | `n/*` | `node/*` | [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n)
208
209
  | `@typescript-eslint/*` | `ts/*` | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) |
209
- | `@stylistic/js` | `style/*` | [@stylistic/eslint-plugin-js](https://github.com/eslint-stylistic/eslint-stylistic) |
210
- | `@stylistic/ts` | `style-ts/` | [@stylistic/eslint-plugin-ts](https://github.com/eslint-stylistic/eslint-stylistic) |
210
+ | `@stylistic/js/*` | `style/*` | [@stylistic/eslint-plugin-js](https://github.com/eslint-stylistic/eslint-stylistic) |
211
+ | `@stylistic/ts/*` | `style-ts/*` | [@stylistic/eslint-plugin-ts](https://github.com/eslint-stylistic/eslint-stylistic) |
211
212
 
212
213
  When you want to overrides rules, or disable them inline, you need to update to the new prefix:
213
214
 
package/dist/index.js CHANGED
@@ -683,6 +683,7 @@ var javascriptStylistic = [
683
683
  },
684
684
  rules: {
685
685
  "antfu/if-newline": "error",
686
+ "antfu/consistent-object-newline": "error",
686
687
  "comma-dangle": ["error", "always-multiline"],
687
688
  "curly": ["error", "multi-or-nest", "consistent"],
688
689
  "quotes": ["error", "single"],
@@ -745,7 +746,7 @@ var javascriptStylistic = [
745
746
  "style/no-tabs": "error",
746
747
  "style/no-trailing-spaces": "error",
747
748
  "style/no-whitespace-before-property": "error",
748
- "style/object-curly-newline": ["error", { consistent: true, multiline: true }],
749
+ "style/object-curly-newline": OFF,
749
750
  "style/object-curly-spacing": ["error", "always"],
750
751
  "style/object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
751
752
  "style/operator-linebreak": ["error", "before"],
@@ -898,6 +899,7 @@ function typescript(options) {
898
899
  "ts/no-extra-parens": ["error", "functions"],
899
900
  "ts/no-invalid-this": "error",
900
901
  "ts/no-loss-of-precision": "error",
902
+ "ts/no-invalid-void-type": OFF,
901
903
  "ts/no-non-null-assertion": OFF,
902
904
  "ts/no-redeclare": "error",
903
905
  "ts/no-require-imports": "error",
@@ -1095,8 +1097,7 @@ function vue(options = {}) {
1095
1097
  "vue/no-unused-refs": "error",
1096
1098
  "vue/no-useless-v-bind": "error",
1097
1099
  "vue/no-v-html": OFF,
1098
- "vue/no-v-text-v-html-on-component": OFF,
1099
- "vue/object-curly-newline": ["error", { consistent: true, multiline: true }],
1100
+ "vue/object-curly-newline": OFF,
1100
1101
  "vue/object-curly-spacing": ["error", "always"],
1101
1102
  "vue/object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
1102
1103
  "vue/object-shorthand": [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antfu/eslint-config",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.2",
4
+ "version": "1.0.0-beta.4",
5
5
  "packageManager": "pnpm@8.7.6",
6
6
  "description": "Anthony's ESLint config",
7
7
  "author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
@@ -30,13 +30,12 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@eslint-stylistic/metadata": "0.0.4",
33
- "@eslint/js": "^8.49.0",
34
33
  "@stylistic/eslint-plugin-js": "0.0.4",
35
34
  "@stylistic/eslint-plugin-ts": "0.0.4",
36
35
  "@typescript-eslint/eslint-plugin": "^6.7.2",
37
36
  "@typescript-eslint/parser": "^6.7.2",
38
37
  "eslint-define-config": "^1.23.0",
39
- "eslint-plugin-antfu": "^1.0.0-beta.2",
38
+ "eslint-plugin-antfu": "^1.0.0-beta.4",
40
39
  "eslint-plugin-eslint-comments": "^3.2.0",
41
40
  "eslint-plugin-i": "^2.28.1",
42
41
  "eslint-plugin-jsdoc": "^46.8.2",
@@ -58,11 +57,14 @@
58
57
  "@antfu/eslint-config": "workspace:*",
59
58
  "@antfu/ni": "^0.21.8",
60
59
  "@stylistic/eslint-plugin-migrate": "0.0.4",
60
+ "@types/fs-extra": "^11.0.2",
61
61
  "@types/node": "^20.6.3",
62
62
  "bumpp": "^9.2.0",
63
- "eslint": "^8.49.0",
63
+ "eslint": "^8.50.0",
64
64
  "eslint-plugin-sort-keys": "^2.3.5",
65
65
  "esno": "^0.17.0",
66
+ "fast-glob": "^3.3.1",
67
+ "fs-extra": "^11.1.1",
66
68
  "lint-staged": "^14.0.1",
67
69
  "rimraf": "^5.0.1",
68
70
  "simple-git-hooks": "^2.9.0",