-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathtypescript.js
40 lines (37 loc) · 955 Bytes
/
typescript.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.
// Licensed under the MIT License.
"use strict";
const pluginTypescript = require("@typescript-eslint/eslint-plugin");
module.exports = () => {
return [
{
languageOptions: {
parserOptions: {
ecmaVersion: 6,
sourceType: "module",
ecmaFeatures: {
jsx: true
}
}
}
},
{
files: ["**/*.{ts,tsx}"],
languageOptions: {
parserOptions: {
parser: "@typescript-eslint/parser"
}
},
plugins: {
"@typescript-eslint": pluginTypescript
},
rules: {
"@typescript-eslint/no-implied-eval": "error",
// @typescript-eslint/no-implied-eval offers more accurate results for typescript.
// thus we turn the more generic rule off for ts and tsx files.
// This also avoids duplicate hits.
"no-implied-eval": "off"
}
}
];
};