@fenge/eslint-config 0.1.1 → 0.1.2

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.
@@ -1,7 +1,7 @@
1
1
  import process from "node:process";
2
2
  import * as fengeTsPlugin from "@fenge/eslint-plugin-ts";
3
3
  import tsParser from "@typescript-eslint/parser";
4
- import deprecationPlugin from "eslint-plugin-deprecation";
4
+ import deprecationPlugin from "eslint-plugin-deprecation"; // TODO: Remove this plugin and use `@typescript-eslint/no-deprecated` when eslint upgraded to 9.
5
5
  import { javascript } from "./javascript.js";
6
6
 
7
7
  export function typescript(project?: string) {
@@ -3,8 +3,8 @@ import { describe, it } from "node:test";
3
3
  import config from "./eslint.config.js";
4
4
 
5
5
  await describe("eslint.config", async () => {
6
- await it("length of default export should be 9", () => {
7
- assert.strictEqual(config.length, 9);
6
+ await it("length of default export should be 10", () => {
7
+ assert.strictEqual(config.length, 10);
8
8
  });
9
9
  await it("no warns", () => {
10
10
  config.forEach((configItem) => {
@@ -19,6 +19,84 @@ await describe("eslint.config", async () => {
19
19
  }
20
20
  });
21
21
  });
22
+
23
+ await it("should not contain deprecated rules", async () => {
24
+ const deprecatedRules = [
25
+ "array-bracket-newline",
26
+ "array-bracket-spacing",
27
+ "array-element-newline",
28
+ "arrow-parens",
29
+ "arrow-spacing",
30
+ "block-spacing",
31
+ "brace-style",
32
+ "comma-dangle",
33
+ "comma-spacing",
34
+ "comma-style",
35
+ "computed-property-spacing",
36
+ "dot-location",
37
+ "eol-last",
38
+ "func-call-spacing",
39
+ "function-call-argument-newline",
40
+ "function-paren-newline",
41
+ "generator-star-spacing",
42
+ "implicit-arrow-linebreak",
43
+ "indent",
44
+ "jsx-quotes",
45
+ "key-spacing",
46
+ "keyword-spacing",
47
+ "linebreak-style",
48
+ "lines-between-class-members",
49
+ "lines-around-comment",
50
+ "max-len",
51
+ "max-statements-per-line",
52
+ "multiline-ternary",
53
+ "new-parens",
54
+ "newline-per-chained-call",
55
+ "no-confusing-arrow",
56
+ "no-extra-parens",
57
+ "no-extra-semi",
58
+ "no-floating-decimal",
59
+ "no-mixed-operators",
60
+ "no-mixed-spaces-and-tabs",
61
+ "no-multi-spaces",
62
+ "no-multiple-empty-lines",
63
+ "no-tabs",
64
+ "no-trailing-spaces",
65
+ "no-whitespace-before-property",
66
+ "nonblock-statement-body-position",
67
+ "object-curly-newline",
68
+ "object-curly-spacing",
69
+ "object-property-newline",
70
+ "one-var-declaration-per-line",
71
+ "operator-linebreak",
72
+ "padded-blocks",
73
+ "padding-line-between-statements",
74
+ "quote-props",
75
+ "quotes",
76
+ "rest-spread-spacing",
77
+ "semi",
78
+ "semi-spacing",
79
+ "semi-style",
80
+ "space-before-blocks",
81
+ "space-before-function-paren",
82
+ "space-in-parens",
83
+ "space-infix-ops",
84
+ "space-unary-ops",
85
+ "spaced-comment",
86
+ "switch-colon-spacing",
87
+ "template-curly-spacing",
88
+ "template-tag-spacing",
89
+ "wrap-iife",
90
+ "wrap-regex",
91
+ "yield-star-spacing",
92
+ ];
93
+ for (const configItem of config) {
94
+ const containingDeprecatedRules = Object.keys(
95
+ "rules" in configItem && configItem.rules ? configItem.rules : {},
96
+ ).filter((rule) => deprecatedRules.includes(rule));
97
+ assert.deepStrictEqual(containingDeprecatedRules, []);
98
+ }
99
+ });
22
100
  });
23
101
 
24
102
  function getValueString(value: unknown): string {