-
Notifications
You must be signed in to change notification settings - Fork 1
/
ts.js
34 lines (31 loc) · 875 Bytes
/
ts.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
import { rules } from "./rules/ts.js";
import tslint from "typescript-eslint";
const ts = {
files: ["**/*.ts"],
...tslint.configs.base,
rules,
};
ts.languageOptions.parserOptions = {
// It's undefined for now, but just in case.
...ts.languageOptions.parserOptions,
project: true,
};
export default [
ts,
{
files: ["**/*.d.ts"],
rules: {
// Easier than fixing the hand-generated peg.d.ts
"init-declarations": "off",
"no-unused-vars": "off",
"no-use-before-define": "off",
"one-var": "off",
"@typescript-eslint/init-declarations": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-empty-object-type": "off",
"@typescript-eslint/no-shadow": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/prefer-function-type": "off",
},
},
];