forked from microsoft/FluidFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
34 lines (31 loc) · 1023 Bytes
/
.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
/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/
module.exports = {
extends: [require.resolve("@fluidframework/eslint-config-fluid"), "prettier"],
parserOptions: {
project: ["./tsconfig.json", "./src/test/tsconfig.json"],
},
rules: {
// TODO: remove these overrides and fix violations
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
// This library uses and serializes "utf-8".
"unicorn/text-encoding-identifier-case": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
},
overrides: [
{
// Rules only for test files
files: ["*.spec.ts", "src/test/**"],
rules: {
// It's valuable for tests to validate handling of `null` values, regardless of our API policies.
"unicorn/no-null": "off",
// Fine for tests to use `__dirname`
"unicorn/prefer-module": "off",
},
},
],
};