@samitouri / QOS-React-2 / commits / 1de6c5aea2

[eslint] Don't lint generated files

drive by fix multi line comments in .eslintrc

Sathya Gunasekaran committed Apr 2, 2024 at 12:03 UTC 1de6c5aea207ac2beac375aa80287acfcfb567a0
1 file changed +33 -17
compiler/packages/babel-plugin-react-forget/.eslintrc.js
+33 -17
@@ -9,44 +9,56 @@
9 module.exports = {
10 extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
11 rules: {
12 - // We prefer using const where variables are not reassigned, but occassional mistakes
13 - // aren't a major issue
12 + /*
13 + * We prefer using const where variables are not reassigned, but occassional mistakes
14 + * aren't a major issue
15 + */
16 "prefer-const": "off",
17
18 // Not valuable enough to enable
19 "no-useless-escape": "off",
20
19 - // There are valid use cases for loops with constant conditions where the body contains the
20 - // break
21 + /*
22 + * There are valid use cases for loops with constant conditions where the body contains the
23 + * break
24 + */
25 "no-constant-condition": "off",
26
27 // eslint only knows about builtin control flow (eg throw, return, break) and not custom ones
28 // like invariant.
29 "no-fallthrough": "off",
30
27 - // Low-value: this fires even for declarations that capture references which wouldn't be as
28 - // obvious if the declaration was lifted to the parent root
31 + /*
32 + * Low-value: this fires even for declarations that capture references which wouldn't be as
33 + * obvious if the declaration was lifted to the parent root
34 + */
35 "no-inner-declarations": "off",
36
37 "multiline-comment-style": ["error", "starred-block"],
38
39 "@typescript-eslint/no-empty-function": "off",
40
35 - // Explicitly casting to/through any is sometimes required, often for error messages to
36 - // assertExhaustive()
41 + /*
42 + * Explicitly casting to/through any is sometimes required, often for error messages to
43 + * assertExhaustive()
44 + */
45 "@typescript-eslint/no-explicit-any": "off",
46
39 - // We use non-null assertions carefully. Ideally, there would be a TS option to codegen
40 - // a non-null check at the assertion site.
47 + /*
48 + * We use non-null assertions carefully. Ideally, there would be a TS option to codegen
49 + * a non-null check at the assertion site.
50 + */
51 "@typescript-eslint/no-non-null-assertion": "off",
52
53 // Being explicit provides value in cases where inference may later change
54 "@typescript-eslint/no-inferrable-types": "off",
55 "@typescript-eslint/explicit-function-return-type": "error",
56
47 - // Unused variables are frequently a bug. Prefix unused variables with an _ to fix, but note
48 - // that eslint won't warn you that an underscore prefixed variable is used and that the prefix
49 - // should be dropped.
57 + /*
58 + * Unused variables are frequently a bug. Prefix unused variables with an _ to fix, but note
59 + * that eslint won't warn you that an underscore prefixed variable is used and that the prefix
60 + * should be dropped.
61 + */
62 "@typescript-eslint/no-unused-vars": [
63 "error",
64 {
@@ -67,10 +79,14 @@ module.exports = {
79 parser: "@typescript-eslint/parser",
80 plugins: ["@typescript-eslint"],
81 root: true,
70 - ignorePatterns: ["src/__tests__/**/*", "src/**/*.d.ts"],
71 -
72 - // If rules need to be disabled then the rule is insufficiently high signal
73 - // and should be diasbled altogether or customized (in either case via a standalone PR)
82 + ignorePatterns: ["src/__tests__/**/*", "src/**/*.d.ts", "dist/**/*"],
83 + env: {
84 + node: true,
85 + },
86 + /*
87 + * If rules need to be disabled then the rule is insufficiently high signal
88 + * and should be diasbled altogether or customized (in either case via a standalone PR)
89 + */
90 noInlineConfig: true,
91 reportUnusedDisableDirectives: true,
92 };