@clipboard-health/eslint-config 2.4.14 → 3.0.1
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/CHANGELOG.md +13 -0
- package/package.json +1 -1
- package/src/deprecated.d.ts +211 -0
- package/src/deprecated.d.ts.map +1 -0
- package/src/deprecated.js +325 -0
- package/src/deprecated.js.map +1 -0
- package/src/index.d.ts +35 -197
- package/src/index.d.ts.map +1 -1
- package/src/index.js +77 -304
- package/src/index.js.map +1 -1
- package/src/{xo-react.d.ts → react.d.ts} +1 -1
- package/src/react.d.ts.map +1 -0
- package/src/{xo-react.js → react.js} +2 -2
- package/src/react.js.map +1 -0
- package/src/xo-react.d.ts.map +0 -1
- package/src/xo-react.js.map +0 -1
- package/src/xo.d.ts +0 -53
- package/src/xo.d.ts.map +0 -1
- package/src/xo.js +0 -91
- package/src/xo.js.map +0 -1
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/eslint-config/src/index.js"],"names":[],"mappings":";AAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/eslint-config/src/index.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf,OAAO,EAAE;QACP,aAAa;QACb,oCAAoC;QACpC,yBAAyB;QACzB,mBAAmB;QACnB,2BAA2B;QAC3B,sBAAsB;QACtB,yCAAyC;QACzC,6BAA6B;QAC7B,4BAA4B;QAC5B,4BAA4B;QAC5B,UAAU;QACV,IAAI;QACJ,qBAAqB;KACtB;IACD,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,OAAO,EAAE,CAAC,eAAe,CAAC;QAC1B,eAAe,EAAE,SAAS;KAC3B;IACD,OAAO,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,oBAAoB,EAAE,SAAS,CAAC;IACnE,KAAK,EAAE;QACL,wGAAwG;QAC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BAAkB,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC;QAE3C,2BAA2B;QAC3B,4BAA4B,EAAE,MAAM;QACpC,4BAA4B,EAAE,MAAM;QAEpC,qCAAqC;QACrC,2BAA2B,EAAE,KAAK;QAClC,yBAAyB,EAAE,KAAK;QAEhC,8CAA8C;QAC9C,+BAA+B,EAAE;YAC/B,OAAO;YACP,EAAE,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE;SACrD;KACF;IACD,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE;CAC7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../../packages/eslint-config/src/react.js"],"names":[],"mappings":""}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
module.exports = {
|
|
3
|
-
extends: ["./
|
|
3
|
+
extends: ["./index", "xo-react/space"],
|
|
4
4
|
parserOptions: {
|
|
5
5
|
project: ["tsconfig.json"],
|
|
6
6
|
tsconfigRootDir: __dirname,
|
|
7
7
|
},
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=
|
|
9
|
+
//# sourceMappingURL=react.js.map
|
package/src/react.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../../packages/eslint-config/src/react.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf,OAAO,EAAE,CAAC,SAAS,EAAE,gBAAgB,CAAC;IACtC,aAAa,EAAE;QACb,OAAO,EAAE,CAAC,eAAe,CAAC;QAC1B,eAAe,EAAE,SAAS;KAC3B;CACF,CAAC"}
|
package/src/xo-react.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xo-react.d.ts","sourceRoot":"","sources":["../../../../packages/eslint-config/src/xo-react.js"],"names":[],"mappings":""}
|
package/src/xo-react.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xo-react.js","sourceRoot":"","sources":["../../../../packages/eslint-config/src/xo-react.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf,OAAO,EAAE,CAAC,MAAM,EAAE,gBAAgB,CAAC;IACnC,aAAa,EAAE;QACb,OAAO,EAAE,CAAC,eAAe,CAAC;QAC1B,eAAe,EAAE,SAAS;KAC3B;CACF,CAAC"}
|
package/src/xo.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
declare const _extends: string[];
|
|
2
|
-
export { _extends as extends };
|
|
3
|
-
export declare const parser: string;
|
|
4
|
-
export declare namespace parserOptions {
|
|
5
|
-
const project: string[];
|
|
6
|
-
const tsconfigRootDir: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const plugins: string[];
|
|
9
|
-
export declare const rules: {
|
|
10
|
-
"@typescript-eslint/consistent-type-definitions": string[];
|
|
11
|
-
"@typescript-eslint/naming-convention": string;
|
|
12
|
-
"security/detect-object-injection": string;
|
|
13
|
-
"@typescript-eslint/no-unused-vars": (string | {
|
|
14
|
-
argsIgnorePattern: string;
|
|
15
|
-
})[];
|
|
16
|
-
"no-return-await": string;
|
|
17
|
-
"@typescript-eslint/return-await": string[];
|
|
18
|
-
"capitalized-comments": (string | {
|
|
19
|
-
ignorePattern: string;
|
|
20
|
-
})[];
|
|
21
|
-
curly: string;
|
|
22
|
-
"class-methods-use-this": string;
|
|
23
|
-
"import/extensions": string;
|
|
24
|
-
"n/no-missing-import": string;
|
|
25
|
-
"n/no-unpublished-import": string;
|
|
26
|
-
"unicorn/prefer-module": string;
|
|
27
|
-
"import/no-extraneous-dependencies": string;
|
|
28
|
-
"import/no-unresolved": string;
|
|
29
|
-
"import/prefer-default-export": string;
|
|
30
|
-
"new-cap": (string | {
|
|
31
|
-
newIsCap: boolean;
|
|
32
|
-
capIsNew: boolean;
|
|
33
|
-
})[];
|
|
34
|
-
"no-only-tests/no-only-tests": string;
|
|
35
|
-
"no-restricted-syntax": (string | {
|
|
36
|
-
selector: string;
|
|
37
|
-
message: string;
|
|
38
|
-
})[];
|
|
39
|
-
"no-shadow": string;
|
|
40
|
-
"simple-import-sort/imports": string;
|
|
41
|
-
"simple-import-sort/exports": string;
|
|
42
|
-
"unicorn/no-array-for-each": string;
|
|
43
|
-
"unicorn/no-array-reduce": string;
|
|
44
|
-
"unicorn/prevent-abbreviations": (string | {
|
|
45
|
-
ignore: RegExp[];
|
|
46
|
-
})[];
|
|
47
|
-
};
|
|
48
|
-
export declare namespace settings {
|
|
49
|
-
namespace node {
|
|
50
|
-
const version: string;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=xo.d.ts.map
|
package/src/xo.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xo.d.ts","sourceRoot":"","sources":["../../../../packages/eslint-config/src/xo.js"],"names":[],"mappings":""}
|
package/src/xo.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
module.exports = {
|
|
3
|
-
extends: [
|
|
4
|
-
"airbnb-base",
|
|
5
|
-
"plugin:eslint-comments/recommended",
|
|
6
|
-
"plugin:jest/recommended",
|
|
7
|
-
"plugin:jest/style",
|
|
8
|
-
"plugin:import/recommended",
|
|
9
|
-
"plugin:n/recommended",
|
|
10
|
-
"plugin:no-use-extend-native/recommended",
|
|
11
|
-
"plugin:security/recommended",
|
|
12
|
-
"plugin:sonarjs/recommended",
|
|
13
|
-
"plugin:unicorn/recommended",
|
|
14
|
-
"prettier",
|
|
15
|
-
"xo",
|
|
16
|
-
"xo-typescript/space",
|
|
17
|
-
],
|
|
18
|
-
parser: "@typescript-eslint/parser",
|
|
19
|
-
parserOptions: {
|
|
20
|
-
project: ["tsconfig.json"],
|
|
21
|
-
tsconfigRootDir: __dirname,
|
|
22
|
-
},
|
|
23
|
-
plugins: ["jest", "no-only-tests", "simple-import-sort", "sonarjs"],
|
|
24
|
-
rules: {
|
|
25
|
-
// See https://github.com/microsoft/TypeScript/wiki/Performance#preferring-interfaces-over-intersections
|
|
26
|
-
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
|
27
|
-
// Too many false positives
|
|
28
|
-
"@typescript-eslint/naming-convention": "off",
|
|
29
|
-
"security/detect-object-injection": "off",
|
|
30
|
-
// Prefer an escape hatch instead of an outright ban
|
|
31
|
-
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
|
|
32
|
-
// Prefer debugging ease over an extra microtask by requiring `return await`.
|
|
33
|
-
// `no-return-await` states "This can make debugging more difficult."
|
|
34
|
-
"no-return-await": "off",
|
|
35
|
-
"@typescript-eslint/return-await": ["error", "always"],
|
|
36
|
-
// Ignore `sonar-disable`/`sonar-enable` comments
|
|
37
|
-
"capitalized-comments": ["error", "always", { ignorePattern: "sonar" }],
|
|
38
|
-
// Prevent bugs
|
|
39
|
-
curly: "error",
|
|
40
|
-
// Recommends using static fields instead of moving to a function
|
|
41
|
-
"class-methods-use-this": "off",
|
|
42
|
-
// Our libraries don't use ESM
|
|
43
|
-
"import/extensions": "off",
|
|
44
|
-
"n/no-missing-import": "off",
|
|
45
|
-
"n/no-unpublished-import": "off",
|
|
46
|
-
"unicorn/prefer-module": "off",
|
|
47
|
-
// Rely on `"n/no-extraneous-import"` instead
|
|
48
|
-
"import/no-extraneous-dependencies": "off",
|
|
49
|
-
// Doesn't play well with NX/monorepos
|
|
50
|
-
"import/no-unresolved": "off",
|
|
51
|
-
// Prefer named exports
|
|
52
|
-
"import/prefer-default-export": "off",
|
|
53
|
-
// Allow PascalCase for Decorators
|
|
54
|
-
"new-cap": ["warn", { newIsCap: true, capIsNew: false }],
|
|
55
|
-
/* Don't allow `.only` in tests to prevent it from making it
|
|
56
|
-
into `main` and circumventing our tests. */
|
|
57
|
-
"no-only-tests/no-only-tests": "error",
|
|
58
|
-
// Adapter from Airbnb's config, but allows ForOfStatement.
|
|
59
|
-
// See https://github.com/airbnb/javascript/blob/0f3ca32323b8d5770de3301036e65511c6d18e00/packages/eslint-config-airbnb-base/rules/style.js#L340-L358
|
|
60
|
-
"no-restricted-syntax": [
|
|
61
|
-
"error",
|
|
62
|
-
{
|
|
63
|
-
selector: "ForInStatement",
|
|
64
|
-
message: "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.",
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
selector: "LabeledStatement",
|
|
68
|
-
message: "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.",
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
selector: "WithStatement",
|
|
72
|
-
message: "`with` is disallowed in strict mode because it makes code impossible to predict and optimize.",
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
// False positive on `enum`s
|
|
76
|
-
"no-shadow": "off",
|
|
77
|
-
// Sort imports and exports
|
|
78
|
-
"simple-import-sort/imports": "warn",
|
|
79
|
-
"simple-import-sort/exports": "warn",
|
|
80
|
-
// "Better readability" is subjective
|
|
81
|
-
"unicorn/no-array-for-each": "off",
|
|
82
|
-
"unicorn/no-array-reduce": "off",
|
|
83
|
-
// Allow common, well understood abbreviations
|
|
84
|
-
"unicorn/prevent-abbreviations": [
|
|
85
|
-
"error",
|
|
86
|
-
{ ignore: [/config/i, /params/i, /props/i, /ref/i] },
|
|
87
|
-
],
|
|
88
|
-
},
|
|
89
|
-
settings: { node: { version: ">=18.15.0" } },
|
|
90
|
-
};
|
|
91
|
-
//# sourceMappingURL=xo.js.map
|
package/src/xo.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xo.js","sourceRoot":"","sources":["../../../../packages/eslint-config/src/xo.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf,OAAO,EAAE;QACP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