11{
2+ "root": true,
23 "extends": [
3- "semistandard",
4- "plugin:promise/recommended",
4+ "eslint:recommended",
5+ "plugin:prettier/recommended",
6+ "plugin:@typescript-eslint/eslint-recommended",
57 "plugin:@typescript-eslint/recommended"
68 ],
9+ "env": {
10+ "node": true,
11+ "mocha": true,
12+ "es6": true
13+ },
14+ "parserOptions": {
15+ "ecmaVersion": 2019
16+ },
17+ "plugins": [
18+ "@typescript-eslint",
19+ "prettier"
20+ ],
21+ "parser": "@typescript-eslint/parser",
722 "rules": {
8- "@typescript-eslint/no-explicit-any": 0,
9- "@typescript-eslint/no-empty-function": 0,
10- "no-return-assign": 0,
11- "space-before-function-paren": ["error", "never"]
12- }
13- }
23+ "no-restricted-properties": [
24+ "error",
25+ {
26+ "object": "describe",
27+ "property": "only"
28+ },
29+ {
30+ "object": "it",
31+ "property": "only"
32+ },
33+ {
34+ "object": "context",
35+ "property": "only"
36+ }
37+ ],
38+ "prettier/prettier": "error",
39+ "no-console": "error",
40+ "valid-typeof": "error",
41+ "eqeqeq": [
42+ "error",
43+ "always",
44+ {
45+ "null": "ignore"
46+ }
47+ ],
48+ "strict": [
49+ "error",
50+ "global"
51+ ],
52+ "no-restricted-syntax": [
53+ "error",
54+ {
55+ "selector": "TSEnumDeclaration",
56+ "message": "Do not declare enums"
57+ },
58+ {
59+ "selector": "BinaryExpression[operator=/[=!]==/] Identifier[name='undefined']",
60+ "message": "Do not strictly check undefined"
61+ },
62+ {
63+ "selector": "BinaryExpression[operator=/[=!]==/] Literal[raw='null']",
64+ "message": "Do not strictly check null"
65+ },
66+ {
67+ "selector": "BinaryExpression[operator=/[=!]==?/] Literal[value='undefined']",
68+ "message": "Do not strictly check typeof undefined (NOTE: currently this rule only detects the usage of 'undefined' string literal so this could be a misfire)"
69+ }
70+ ],
71+ "@typescript-eslint/no-require-imports": "off",
72+ "@typescript-eslint/no-unused-vars": [
73+ "error",
74+ {
75+ "argsIgnorePattern": "^_",
76+ "caughtErrorsIgnorePattern": "^_",
77+ "destructuredArrayIgnorePattern": "^_",
78+ "varsIgnorePattern": "^_"
79+ }
80+ ]
81+ },
82+ "overrides": [
83+ {
84+ "files": [
85+ "lib/*.js"
86+ ],
87+ "parserOptions": {
88+ "ecmaVersion": 2019,
89+ "sourceType": "commonjs"
90+ }
91+ },
92+ {
93+ "files": [
94+ "test/**/*ts"
95+ ],
96+ "rules": {
97+ // chat `expect(..)` style chaining is considered
98+ // an unused expression
99+ "@typescript-eslint/no-unused-expressions": "off"
100+ }
101+ },
102+ {
103+ // json configuration files
104+ "files": [
105+ ".*.json"
106+ ],
107+ "rules": {
108+ "@typescript-eslint/no-unused-expressions": "off"
109+ }
110+ }
111+ ]
112+ }
0 commit comments