forked from microsoft/FluidFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
56 lines (50 loc) · 1.45 KB
/
.eslintrc.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/
module.exports = {
extends: [require.resolve("@fluidframework/eslint-config-fluid/strict"), "prettier"],
parserOptions: {
project: ["./tsconfig.json"],
},
rules: {
// Rule is reported in a lot of places where it would be invalid to follow the suggested pattern
"@typescript-eslint/class-literal-property-style": "off",
// Comparing general input strings against system-known values (via enums) is used commonly to support
// extensibility.
"@typescript-eslint/no-unsafe-enum-comparison": "off",
// Useful for developer accessibility
"unicorn/prevent-abbreviations": [
"error",
{
allowList: {
// Industry-standard index variable name.
i: true,
},
},
],
"unicorn/prefer-module": "off",
"unicorn/prefer-negative-index": "off",
"unicorn/no-array-push-push": "off",
// This package is exclusively used in a Node.js context
"import/no-nodejs-modules": "off",
},
overrides: [
{
// Overrides for test files
files: ["src/**/test/**"],
plugins: ["chai-expect", "chai-friendly"],
extends: ["plugin:chai-expect/recommended", "plugin:chai-friendly/recommended"],
rules: {
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: true,
},
],
// Handled by chai-friendly instead.
"@typescript-eslint/no-unused-expressions": "off",
},
},
],
};