forked from microsoft/accessibility-insights-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
40 lines (40 loc) · 1.44 KB
/
.eslintrc.js
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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
module.exports = {
env: {
es2017: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:security/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module', // Allows for the use of imports
project: './tsconfig.json',
ecmaVersion: 8,
},
plugins: ['@typescript-eslint', 'security'],
rules: {
// Too many false positives; see https://github.com/nodesecurity/eslint-plugin-security/issues/21#issuecomment-326031625
'security/detect-object-injection': 'off',
},
overrides: [
{
files: ['src/**/*.spec.ts'],
rules: {
// Test stubs are allowed to use "as any" assignments/calls/returns
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-unsafe-argument': 'off',
},
},
],
ignorePatterns: ['**/*.js'],
};